[Buildroot] [PATCH 2/2] package/tcf-agent: fix uClibc-ng compile on ARM

Thomas Petazzoni thomas.petazzoni at bootlin.com
Thu Aug 17 09:59:17 UTC 2023


On Tue, 15 Aug 2023 05:36:14 +0200
Waldemar Brodkorb <wbx at openadk.org> wrote:

> > What is the situation with musl?  
> 
> Musl works fine with static and shared without this patch.
> How should a v2 look like? 

Is there a reason why uClibc-ng doesn't support getauxval() with static
linking? If musl does it, probably it can be done?

Otherwise, if we want to stick to that, it could be:

# Some good explanation goes here
ifeq ($(BR2_STATIC_LIBS)$(BR2_TOOLCHAIN_USES_UCLIBC)$(BR2_ARM_INSTRUCTIONS_THUMB),yyy)
TCF_AGENT_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -marm"
endif

> > Also, shouldn't the horrible "#  define USE_getauxval
> > (defined(__GLIBC__) && (__GLIBC__ > 2 || (__GLIBC__ == 2 &&
> > __GLIBC_MINOR__ >= 16)) || (defined(__UCLIBC__) &&
> > defined(__HAVE_SHARED__)))" be turned into a proper CMake test ?  
> 
> That might be something upstream should do. :)

Well, we generally try to have upstreamable patches in Buildroot, and
the project seems relatively active
(https://git.eclipse.org/c/tcf/org.eclipse.tcf.agent.git/log/), so
there is a good chance to get our patch merged.

Best regards,

Thomas
-- 
Thomas Petazzoni, co-owner and CEO, Bootlin
Embedded Linux and Kernel engineering and training
https://bootlin.com



More information about the buildroot mailing list