RTEMS | Ensure -msoft-float is seen in linking via make (!825)

Martin Werner (@martinerikwerner) gitlab at rtems.org
Wed Nov 5 00:55:03 UTC 2025




Martin Werner commented on a discussion: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/825#note_135665


This does not change the behaviour when using pkgconfig, that already works as it should, as seen by the -mcpu=leon3 flag (same place as -msoft-float would go, if it was included in ABI_FLAGS) being included in the linking command when building via your quick_pc/Makefile example.

This change instead addresses the "custom make" build interface, where the Makefile would look something like this:

```
TARGET=sparc-rtems7
BSP=leon3
PREFIX=~/utv/rtems-bsps/rtems/7/

RTEMS_MAKEFILE_PATH = $(PREFIX)/$(TARGET)/$(BSP)

include $(RTEMS_MAKEFILE_PATH)/Makefile.inc
include $(RTEMS_CUSTOM)
include $(RTEMS_ROOT)/make/leaf.cfg

all: hello.exe

hello.exe: hello.o
	$(CC) -o hello.exe $< $(LDFLAGS)

clean:
	rm -f hello.exe hello.o
```

And currently this will not include ABI_FLAGS when linking.

It might be that using the "custom make" build interface like this without using the dedicated $(make-exe) macro (which does pull in ABI_FLAGS) is an unsupported use-case. But given that it is available with no clear warning signs, it might be worth fixing?

(We use this "custom make" interface at $(dayjob), and I have previously spent some time trying to figure out why I was getting hard-float newlib at link-time when I was otherwise building the application and BSP with soft-float.)

-- 
View it on GitLab: https://gitlab.rtems.org/rtems/rtos/rtems/-/merge_requests/825#note_135665
You're receiving this email because of your account on gitlab.rtems.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/bugs/attachments/20251105/a5f61718/attachment.htm>


More information about the bugs mailing list