summaryrefslogtreecommitdiff
path: root/apps/import
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-09-05 16:05:29 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-09-05 16:05:29 -0600
commit2dc9308e9154086f30ad320f67be5bf6ecbd310b (patch)
tree02d2f3b453d54e3f9ed5e9dbf6e6b084d02eca1f /apps/import
parent5c571020f21f0127929621ed1c7afc290f1d5077 (diff)
downloadpx4-nuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.tar.gz
px4-nuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.tar.bz2
px4-nuttx-2dc9308e9154086f30ad320f67be5bf6ecbd310b.zip
Need to add CRT0 to every Makefile in apps/examples/tests
Diffstat (limited to 'apps/import')
-rw-r--r--apps/import/Make.defs16
1 files changed, 16 insertions, 0 deletions
diff --git a/apps/import/Make.defs b/apps/import/Make.defs
index 3d12fd368..4ac269f19 100644
--- a/apps/import/Make.defs
+++ b/apps/import/Make.defs
@@ -155,10 +155,12 @@ ifeq ($(WINTOOL),y)
# Windows-native toolchains
ARCHINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}"
ARCHXXINCLUDES = -I. -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include}" -isystem "${shell cygpath -w $(TOPDIR)$(DELIM)include$(DELIM)cxx}"
+ ARCHCRT0OBJ = "${shell cygpath -w $(TOPDIR)$(DELIM)startup$(DELIM)crt0$(OBJEXT)}"
else
# Linux/Cygwin-native toolchain
ARCHINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include
ARCHXXINCLUDES = -I. -isystem $(TOPDIR)$(DELIM)include -isystem $(TOPDIR)$(DELIM)include$(DELIM)cxx
+ ARCHCRT0OBJ = $(TOPDIR)$(DELIM)startup$(DELIM)crt0$(OBJEXT)
endif
CFLAGS = $(ARCHCFLAGS) $(ARCHWARNINGS) $(ARCHOPTIMIZATION) $(ARCHCPUFLAGS) $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
@@ -167,6 +169,11 @@ CPICFLAGS = $(ARCHPICFLAGS) $(CFLAGS)
CXXFLAGS = $(ARCHCXXFLAGS) $(ARCHWARNINGSXX) $(ARCHOPTIMIZATION) $(ARCHXXINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES) -pipe
CXXPICFLAGS = $(ARCHPICFLAGS) $(CXXFLAGS)
+# ELF module definitions
+
+CELFFLAGS = $(CFLAGS) -mlong-calls # --target1-abs
+CXXELFFLAGS = $(CXXFLAGS) -mlong-calls # --target1-abs
+
# C Pre-processor
CPPFLAGS = $(ARCHINCLUDES) $(ARCHDEFINES) $(EXTRADEFINES)
@@ -192,3 +199,12 @@ ifneq ($(LIBGCC),)
LDLIBPATH += -L ${shell dirname $(LIBGCC)}
LDLIBS += -lgcc
endif
+
+# ELF module definitions
+
+LDELFFLAGS = -r -e _start -Bstatic
+ifeq ($(WINTOOL),y)
+ LDELFFLAGS += -T "${shell cygpath -w $(TOPDIR)/scripts/gnu-elf.ld}"
+else
+ LDELFFLAGS += -T $(TOPDIR)/scripts/gnu-elf.ld
+endif