summaryrefslogtreecommitdiff
path: root/apps/import
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-05 15:35:41 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-05 15:35:41 -0600
commit5c571020f21f0127929621ed1c7afc290f1d5077 (patch)
tree8d784c64725adc4384a4cd6df7f4faf2058071f5 /apps/import
parent294d526ed22c1aafa8b419f51632f31a673657aa (diff)
downloadnuttx-5c571020f21f0127929621ed1c7afc290f1d5077.tar.gz
nuttx-5c571020f21f0127929621ed1c7afc290f1d5077.tar.bz2
nuttx-5c571020f21f0127929621ed1c7afc290f1d5077.zip
Add libgcc to the set of libraries to link against
Diffstat (limited to 'apps/import')
-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