[PATCH] support: add __address_diff function

Yury Khrustalev yury.khrustalev@arm.com
Thu Mar 26 13:54:52 GMT 2026


On Wed, Mar 25, 2026 at 05:40:20PM +0100, Florian Weimer wrote:
> >
> > ...
> >
> > I can't find any existing example of adding to 'libsupport-routines'
> > anywhere under 'sysdeps'. I tried doing it, and corresponding object is
> > not included in the libsupport static library.
> 
> Ahh.  Easiest way is to make it an out-of-line definition every, so the
> .c file already exists in support/.
> 
> Alternatively, you could add it like this:
> 
> ifeq ($(subdir), support)
> libsupport-sysdep_routines += \
>   support_pointer_arith \
>   # sysdep_routines
> endif
> 
> in sysdeps/aarch64/Makefile.  We use this for libm and libmvec, so I
> assume it actually works.
> 

Thank you, I've made it working (see v2 [1]). The problem was that I
needed to make this change in 'support/address-diff.h':

- libsupport-static-only-routines := $(libsupport-routines)
+ libsupport-static-only-routines = $(libsupport-routines) $(libsupport-sysdep_routines)

Since libsupport is static-only library, it uses only $(libsupport-static-only-routines)
and that hadn't include $(libsupport-sysdep_routines) before.

This change doesn't break anything else, so hopefully, v2 is OK in this
regard.

Cheers,
Yury

[1]: https://inbox.sourceware.org/libc-alpha/20260326135049.2254482-1-yury.khrustalev@arm.com/



More information about the Libc-alpha mailing list