This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH v2 1/9] Add configure check to test if gcc supports attribute ifunc.
- From: Stefan Liebler <stli at linux dot vnet dot ibm dot com>
- To: libc-alpha at sourceware dot org
- Cc: fweimer at redhat dot com, murphyp at linux dot vnet dot ibm dot com, schwab at linux-m68k dot org, joseph_myers at mentor dot com
- Date: Wed, 17 Aug 2016 12:37:36 +0200
- Subject: Re: [PATCH v2 1/9] Add configure check to test if gcc supports attribute ifunc.
- Authentication-results: sourceware.org; auth=none
- References: <1470667145-18563-1-git-send-email-stli@linux.vnet.ibm.com>
Hi,
as information: I filed the following bugzilla "Bug 20478 - libc_ifunc
macro and similar usages leads to false debug-information."
(https://sourceware.org/bugzilla/show_bug.cgi?id=20478)
How to proceed with this patchset?
My suggestion is to check for gcc-attribute-ifunc support while
configuring glibc.
If it is available (currently on intel, s390 and on fedora/rhel for
power and arm) the gcc-attribute-ifunc will be used for ifunc-macros to
get rid of the false debug-information.
If it is not available the current approach for ifunc-macros will be
used instead. This way the debug-information is not correct, but it does
not break current configurations without the gcc-support.
Furthermore the "assembler hacks" for ifunc-handling are not scattered
in multiple files but are used only indirect via ifunc-macros and can
simply removed in libc-symbols.h in future.
If glibc is configured with --enable-multi-arch then configure will dump
a warning that gcc does not support attribute ifunc and it can be
enabled by configuring gcc with --enable-gnu-indirect-function.
I'll add a note in INSTALL/NEWS file that a gcc with ifunc support is
recommended for multi-arch glibcs and how it can be enabled.
After the patchset is committed I can write a note to the Distribution
Maintainers listed in
https://sourceware.org/glibc/wiki/MAINTAINERS#Distribution_Maintainers
to enable ifunc in their gccs. Furthermore I can file a bug against gcc
to enable ifunc support in <gcc-src>/gcc/config.gcc on architectures
which support ifunc in binutils.
If we have consensus about this approach, I'll prepare/post a further
version of the patchset.
Bye
Stefan