From 7fccd9286b7ee399dea52d0526766623eaee3c22 Mon Sep 17 00:00:00 2001 From: patacongo Date: Sun, 8 Apr 2012 13:03:26 +0000 Subject: Include libgcc.a inside of the group of recursively linked libraries in all Makefiles git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4573 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/ChangeLog | 7 +++++++ nuttx/arch/arm/src/Makefile | 2 +- nuttx/arch/avr/src/Makefile | 2 +- nuttx/arch/hc/src/Makefile | 2 +- nuttx/arch/mips/src/Makefile | 2 +- nuttx/arch/sh/src/Makefile | 2 +- nuttx/arch/sim/src/Makefile | 2 +- nuttx/arch/x86/src/Makefile | 2 +- 8 files changed, 14 insertions(+), 7 deletions(-) diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog index 2b33ec0d3..da3106df8 100644 --- a/nuttx/ChangeLog +++ b/nuttx/ChangeLog @@ -2635,3 +2635,10 @@ drivers/Kconfig, drivers/mtd/Kconfig, drivers/input/Kconfig drivers/analog/Kconfig, drivers/lcd/Kconfig: Updated kernel configuration support provided by Lzyy. + * arch/arm/src/Makefile, arch/x86/src/Makefile, arch/avr/src/Makefile, + arch/mips/src/Makefile, arch/sim/src/Makefile, arch/hc/src/Makefile, + arch/sh/src/Makefile: The libgcc.a in newer versions of GCC now + have an dependency on an external implementation of export(). This + required modification to the Makefiles that do the final link: Now + libgcc.a must be included within the group of libraries that are + search recursively. \ No newline at end of file diff --git a/nuttx/arch/arm/src/Makefile b/nuttx/arch/arm/src/Makefile index 3d4f30043..9f019862a 100644 --- a/nuttx/arch/arm/src/Makefile +++ b/nuttx/arch/arm/src/Makefile @@ -110,7 +110,7 @@ board/libboard$(LIBEXT): nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage diff --git a/nuttx/arch/avr/src/Makefile b/nuttx/arch/avr/src/Makefile index 6bcb8707b..7034ef8f4 100644 --- a/nuttx/arch/avr/src/Makefile +++ b/nuttx/arch/avr/src/Makefile @@ -115,7 +115,7 @@ board/libboard$(LIBEXT): nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group @$(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/hc/src/Makefile b/nuttx/arch/hc/src/Makefile index 63b8df643..c8d98cf59 100755 --- a/nuttx/arch/hc/src/Makefile +++ b/nuttx/arch/hc/src/Makefile @@ -106,7 +106,7 @@ board/libboard$(LIBEXT): nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage diff --git a/nuttx/arch/mips/src/Makefile b/nuttx/arch/mips/src/Makefile index 5c763da1e..8d7b940c6 100644 --- a/nuttx/arch/mips/src/Makefile +++ b/nuttx/arch/mips/src/Makefile @@ -104,7 +104,7 @@ board/libboard$(LIBEXT): nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group @$(NM) $(NUTTX)$(EXEEXT) | \ grep -v '\(compiled\)\|\(\$(OBJEXT)$$\)\|\( [aUw] \)\|\(\.\.ng$$\)\|\(LASH[RL]DI\)' | \ sort > $(TOPDIR)/System.map diff --git a/nuttx/arch/sh/src/Makefile b/nuttx/arch/sh/src/Makefile index 4a6f3eb9c..1e260d83b 100644 --- a/nuttx/arch/sh/src/Makefile +++ b/nuttx/arch/sh/src/Makefile @@ -84,7 +84,7 @@ board/libboard$(LIBEXT): nuttx: $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx" @$(LD) --entry=__start $(LDFLAGS) $(LDPATHES) -L$(BOARDDIR) -o $(TOPDIR)/$@ $(HEAD_OBJ) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) @export flashloc=`$(OBJDUMP) --all-headers $(TOPDIR)/$@ | grep _eronly | cut -d' ' -f1`; \ $(OBJCOPY) --adjust-section-vma=.data=0x$$flashloc $(TOPDIR)/$@ $(TOPDIR)/$@.flashimage diff --git a/nuttx/arch/sim/src/Makefile b/nuttx/arch/sim/src/Makefile index 8a228ec39..d74e1c005 100644 --- a/nuttx/arch/sim/src/Makefile +++ b/nuttx/arch/sim/src/Makefile @@ -172,7 +172,7 @@ Cygwin-names.dat: nuttx-names.dat nuttx.rel : libarch$(LIBEXT) board/libboard$(LIBEXT) $(HOSTOS)-names.dat $(LINKOBJS) @echo "LD: nuttx.rel" - @$(LD) -r $(LDLINKFLAGS) $(LDPATHS) -o $@ $(REQUIREDOBJS) --start-group $(LDLIBS) --end-group $(EXTRA_LIBS) + @$(LD) -r $(LDLINKFLAGS) $(LDPATHS) -o $@ $(REQUIREDOBJS) --start-group $(LDLIBS) $(EXTRA_LIBS) --end-group @$(OBJCOPY) --redefine-syms=$(HOSTOS)-names.dat $@ # Generate the final NuttX binary by linking the host-specific objects with the NuttX diff --git a/nuttx/arch/x86/src/Makefile b/nuttx/arch/x86/src/Makefile index 122126296..c4077b5cc 100644 --- a/nuttx/arch/x86/src/Makefile +++ b/nuttx/arch/x86/src/Makefile @@ -112,7 +112,7 @@ board/libboard$(LIBEXT): nuttx$(EXEEXT): $(HEAD_OBJ) board/libboard$(LIBEXT) @echo "LD: nuttx$(EXEEXT)" @$(LD) --entry=__start $(LDFLAGS) $(LIBPATHS) -o $(NUTTX)$(EXEEXT) $(HEAD_OBJ) $(EXTRA_OBJS) \ - --start-group $(LDLIBS) -lboard --end-group $(EXTRA_LIBS) $(LIBGCC) + --start-group $(LDLIBS) -lboard $(EXTRA_LIBS) $(LIBGCC) --end-group ifeq ($(CONFIG_BOOT_RUNFROMFLASH),y) @export flashloc=`$(OBJDUMP) --all-headers $(NUTTX)$(EXEEXT) | grep _eronly | cut -d' ' -f1`; \ $(OBJCOPY) $(OBJCOPYARGS) --adjust-section-vma=.data=0x$$flashloc $(NUTTX)$(EXEEXT) $(NUTTX).flashimage -- cgit v1.2.3