Add a stub getenv() implementation.
This is not strictly necessary to build libunwind (it can be built with -DNDEBUG), but it will be handy while it is debugged. It can be removed afterwards.
This commit is contained in:
parent
b2710e437c
commit
24463a168a
|
@ -1,7 +1,7 @@
|
|||
MSCDIR=../..
|
||||
include $(MSCDIR)/software/common.mak
|
||||
|
||||
OBJECTS=exception.o libc.o errno.o crc16.o crc32.o console.o system.o id.o uart.o time.o qsort.o strtod.o spiflash.o
|
||||
OBJECTS=exception.o libc.o errno.o crc16.o crc32.o console.o environ.o system.o id.o uart.o time.o qsort.o strtod.o spiflash.o
|
||||
|
||||
all: crt0-$(CPU).o libbase.a libbase-nofloat.a
|
||||
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
||||
char *getenv(const char *varname) {
|
||||
if(!strcmp(varname, "LIBUNWIND_PRINT_APIS") ||
|
||||
!strcmp(varname, "LIBUNWIND_PRINT_UNWINDING")) {
|
||||
return "1";
|
||||
} else {
|
||||
return NULL;
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue