From 94b6691fd1ac57c3b70bd03e376c8170c8920a9e Mon Sep 17 00:00:00 2001 From: Carlos Eduardo Seo Date: Wed, 9 Dec 2015 18:48:04 -0200 Subject: [PATCH] powerpc: Export __parse_hwcap_and_convert_at_platform to libc.a. Commit 67385a01d229751569b6aac067ffdcd813a15d7a added a new feature for powerpc, where we store HWCAP/Platform bits in the TCB. In the dynamic linking case, we use the versioned symbol '__parse_hwcap_and_convert_at_platform' to verify if this feature is available. However, the same symbol was not exported to libc.a, making it not possible for GCC to check for it prior to link time. 2015-12-15 Carlos Eduardo Seo * sysdeps/powerpc/hwcapinfo.c: Export symbol __parse_hwcap_and_convert_at_platform to libc.a. --- sysdeps/powerpc/hwcapinfo.c | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/sysdeps/powerpc/hwcapinfo.c b/sysdeps/powerpc/hwcapinfo.c index a115ffc..b885f1c 100644 --- a/sysdeps/powerpc/hwcapinfo.c +++ b/sysdeps/powerpc/hwcapinfo.c @@ -74,3 +74,11 @@ __tcb_parse_hwcap_and_convert_at_platform (void) versioned_symbol (ld, __tcb_parse_hwcap_and_convert_at_platform, \ __parse_hwcap_and_convert_at_platform, GLIBC_2_23); #endif + +/* Export __parse_hwcap_and_convert_at_platform in libc.a. This is used by + GCC to make sure that the HWCAP/Platform bits are stored in the TCB when + using __builtin_cpu_is()/__builtin_cpu_supports() in the static case. */ +#ifndef SHARED +weak_alias (__tcb_parse_hwcap_and_convert_at_platform, \ + __parse_hwcap_and_convert_at_platform); +#endif -- 2.5.4 (Apple Git-61)