This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git


The following commit(s) were added to refs/heads/master by this push:
     new 24f08da8b3b boards: Link libgcc after the user libraries of a 
protected build.
24f08da8b3b is described below

commit 24f08da8b3b24b26e08999f5335a70d6fa23f351
Author: Marco Casaroli <[email protected]>
AuthorDate: Mon Oct 19 11:40:20 2026 +0200

    boards: Link libgcc after the user libraries of a protected build.
    
    Five boards linked libgcc inside the group of the user libraries of a
    protected build: at32f437-mini, qemu-armv7r, stm32f4discovery,
    lm3s6965-ek and fvp-armv8r.  Inside the group, the linker takes a
    function from libgcc as soon as the applications refer to it, before it
    scans libc again.  So a function that both libc and libgcc define comes
    from libgcc.
    
    Link libgcc after the group, as the other boards do.  Today no function
    in these images is in both, so the images keep the same archive members,
    and only the place of the libgcc code changes.
    
    [skip-cmake-parity]
    
    Assisted-by: Claude Code:claude-opus-5-5
    Signed-off-by: Marco Casaroli <[email protected]>
---
 boards/arm/at32/at32f437-mini/kernel/Makefile       | 2 +-
 boards/arm/qemu/qemu-armv7r/kernel/Makefile         | 2 +-
 boards/arm/stm32f4/stm32f4discovery/kernel/Makefile | 2 +-
 boards/arm/tiva/lm3s6965-ek/kernel/Makefile         | 2 +-
 boards/arm64/fvp-v8r/fvp-armv8r/kernel/Makefile     | 2 +-
 5 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/boards/arm/at32/at32f437-mini/kernel/Makefile 
b/boards/arm/at32/at32f437-mini/kernel/Makefile
index 40d0819717e..26ec8edecef 100644
--- a/boards/arm/at32/at32f437-mini/kernel/Makefile
+++ b/boards/arm/at32/at32f437-mini/kernel/Makefile
@@ -58,7 +58,7 @@ $(COBJS): %$(OBJEXT): %.c
 # Create the nuttx_user.elf file containing all of the user-mode code
 
 nuttx_user.elf: $(OBJS)
-       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) $(USER_LIBGCC) --end-group
+       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) --end-group $(USER_LIBGCC)
 
 $(TOPDIR)$(DELIM)nuttx_user.elf: nuttx_user.elf
        @echo "LD: nuttx_user.elf"
diff --git a/boards/arm/qemu/qemu-armv7r/kernel/Makefile 
b/boards/arm/qemu/qemu-armv7r/kernel/Makefile
index 3e133508d5a..e5577a8d0be 100644
--- a/boards/arm/qemu/qemu-armv7r/kernel/Makefile
+++ b/boards/arm/qemu/qemu-armv7r/kernel/Makefile
@@ -60,7 +60,7 @@ $(addsuffix .tmp,$(USER_LDSCRIPT)): $(USER_LDSCRIPT)
 # Create the nuttx_user file containing all of the user-mode code
 
 nuttx_user: $(OBJS) $(addsuffix .tmp,$(USER_LDSCRIPT))
-       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) $(USER_LIBGCC) --end-group
+       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) --end-group $(USER_LIBGCC)
        $(Q) $(call DELFILE, $(addsuffix .tmp,$(USER_LDSCRIPT)))
 
 $(TOPDIR)$(DELIM)nuttx_user: nuttx_user
diff --git a/boards/arm/stm32f4/stm32f4discovery/kernel/Makefile 
b/boards/arm/stm32f4/stm32f4discovery/kernel/Makefile
index 94250906043..583b6c279f9 100644
--- a/boards/arm/stm32f4/stm32f4discovery/kernel/Makefile
+++ b/boards/arm/stm32f4/stm32f4discovery/kernel/Makefile
@@ -58,7 +58,7 @@ $(COBJS): %$(OBJEXT): %.c
 # Create the nuttx_user.elf file containing all of the user-mode code
 
 nuttx_user.elf: $(OBJS)
-       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) $(USER_LIBGCC) --end-group
+       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) --end-group $(USER_LIBGCC)
 
 $(TOPDIR)$(DELIM)nuttx_user.elf: nuttx_user.elf
        @echo "LD: nuttx_user.elf"
diff --git a/boards/arm/tiva/lm3s6965-ek/kernel/Makefile 
b/boards/arm/tiva/lm3s6965-ek/kernel/Makefile
index 830437daf7d..814a49ea663 100644
--- a/boards/arm/tiva/lm3s6965-ek/kernel/Makefile
+++ b/boards/arm/tiva/lm3s6965-ek/kernel/Makefile
@@ -58,7 +58,7 @@ $(COBJS): %$(OBJEXT): %.c
 # Create the nuttx_user.elf file containing all of the user-mode code
 
 nuttx_user.elf: $(OBJS)
-       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) $(USER_LIBGCC) --end-group
+       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) --end-group $(USER_LIBGCC)
 
 $(TOPDIR)$(DELIM)nuttx_user.elf: nuttx_user.elf
        @echo "LD: nuttx_user.elf"
diff --git a/boards/arm64/fvp-v8r/fvp-armv8r/kernel/Makefile 
b/boards/arm64/fvp-v8r/fvp-armv8r/kernel/Makefile
index 292836fa287..0e0eb516811 100644
--- a/boards/arm64/fvp-v8r/fvp-armv8r/kernel/Makefile
+++ b/boards/arm64/fvp-v8r/fvp-armv8r/kernel/Makefile
@@ -60,7 +60,7 @@ $(addsuffix .tmp,$(USER_LDSCRIPT)): $(USER_LDSCRIPT)
 # Create the nuttx_user file containing all of the user-mode code
 
 nuttx_user: $(OBJS) $(addsuffix .tmp,$(USER_LDSCRIPT))
-       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) $(USER_LIBGCC) --end-group
+       $(Q) $(LD) -o $@ $(USER_LDFLAGS) $(USER_LIBPATHS) $(OBJS) --start-group 
$(USER_LDLIBS) --end-group $(USER_LIBGCC)
 
 $(TOPDIR)$(DELIM)nuttx_user: nuttx_user
        @echo "LD: nuttx_user"

Reply via email to