summaryrefslogtreecommitdiff
path: root/apps/import/Make.defs
diff options
context:
space:
mode:
Diffstat (limited to 'apps/import/Make.defs')
-rw-r--r--apps/import/Make.defs9
1 files changed, 9 insertions, 0 deletions
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