From 5c571020f21f0127929621ed1c7afc290f1d5077 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Fri, 5 Sep 2014 15:35:41 -0600 Subject: Add libgcc to the set of libraries to link against --- apps/import/Make.defs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'apps/import') diff --git a/apps/import/Make.defs b/apps/import/Make.defs index efa6820fd..3d12fd368 100644 --- a/apps/import/Make.defs +++ b/apps/import/Make.defs @@ -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 -- cgit v1.2.3