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.
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
--- /dev/null
+#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;
+ }
+}