Add libgcc to the set of libraries to link against

This commit is contained in:
Gregory Nutt 2014-09-05 15:35:41 -06:00
parent 5cd3325f7e
commit a03bd2f1e7

View File

@ -183,3 +183,12 @@ else
endif
LDLIBS = -lnuttx
# Try to get the path to libgcc.a. Of course, this only works for GCC
# toolchains.
LIBGCC = "${shell "$(CC)" $(ARCHCPUFLAGS) -print-libgcc-file-name 2>/dev/null}"
ifneq ($(LIBGCC),)
LDLIBPATH += -L ${shell dirname $(LIBGCC)}
LDLIBS += -lgcc
endif