[rtems commit] i386/smp: Have ld use incremental build for appstart.o

Joel Sherrill joel at rtems.org
Fri Mar 16 16:02:11 UTC 2018

Module:    rtems
Branch:    master
Commit:    51614c0130cb405ff4cdab8c361ad7d63bf5e6fe
Changeset: http://git.rtems.org/rtems/commit/?id=51614c0130cb405ff4cdab8c361ad7d63bf5e6fe

Author:    Amaan Cheval <amaan.cheval at gmail.com>
Date:      Tue Mar 13 22:02:14 2018 +0530

i386/smp: Have ld use incremental build for appstart.o

With HAS_SMP set, we have:

  libbsp_a_LIBADD += appstart.$(OBJEXT)

When trying to build appstart.o, however, we link start.o with appcpustart.o
through the linkcmds script, which leaves several symbols unresolved, and
without the "-r" (or -i) flag, this throws undefined reference errors.

This change requires us to re-run the ./bootstrap script to regenerate
Makefile.in, and therefore the Makefile for the particular BSP as well.

Complete log of errors available here:

Updates #3331


 c/src/lib/libbsp/i386/pc386/Makefile.am | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/c/src/lib/libbsp/i386/pc386/Makefile.am b/c/src/lib/libbsp/i386/pc386/Makefile.am
index 0acce55..a8b4691 100644
--- a/c/src/lib/libbsp/i386/pc386/Makefile.am
+++ b/c/src/lib/libbsp/i386/pc386/Makefile.am
@@ -154,7 +154,7 @@ appcpustart.$(OBJEXT): start/start16.S
 appstart.$(OBJEXT): appcpustart.$(OBJEXT)
-	$(LD) -N -T $(top_srcdir)/startup/linkcmds \
+	$(LD) -r -N -T $(top_srcdir)/startup/linkcmds \
 	    -Ttext 0x70000 -e app_processor_start -nostdlib \
 	    -o appstart_tmp.exe $<
 	$(OBJCOPY) -O binary appstart_tmp.exe appstart.bin

More information about the vc mailing list