Re: [PATCH] Turn on gnu-indirect-function by default on PowerPC servers
On Fri, Dec 02, 2016 at 04:09:22PM -0500, Michael Meissner wrote: > On Thu, Nov 24, 2016 at 01:07:04AM +, Joseph Myers wrote: > This patch enables --enable-gnu-indirect-function on all PowerPC linux > systems, > except for targetting Android or uclib. It is exactly the same code as we use > in the i[34567]86-*-linux, x86_64-*-linux*, s390-*-linux*, and s390x-*-linux* > systems. Given the ifunc support is not generated unless the user uses it, it > should not affect other PowerPC users. > > Is this patch ok to check into the trunk? Assuming you tested it, okay. Thanks, Segher > 2016-12-02 Michael Meissner > > * config.gcc (powerpc*-*-linux*): Set gnu-indirect-function by > default on PowerPC linux systems.
Re: [PATCH] Turn on gnu-indirect-function by default on PowerPC servers
On Fri, 2 Dec 2016, Michael Meissner wrote: > This patch enables --enable-gnu-indirect-function on all PowerPC linux > systems, > except for targetting Android or uclib. It is exactly the same code as we use > in the i[34567]86-*-linux, x86_64-*-linux*, s390-*-linux*, and s390x-*-linux* > systems. Given the ifunc support is not generated unless the user uses it, it > should not affect other PowerPC users. > > Is this patch ok to check into the trunk? This is not a review, but doing things the same as on other architectures makes sense to me. -- Joseph S. Myers jos...@codesourcery.com
Re: [PATCH] Turn on gnu-indirect-function by default on PowerPC servers
On Thu, Nov 24, 2016 at 01:07:04AM +, Joseph Myers wrote: > On Wed, 23 Nov 2016, Michael Meissner wrote: > > > Since some of the embedded hosts use powerpc-*-linux, I only set > > the > > default if the target is a 64-bit PowerPC system. I tested the compiler > > manually to verify that ifunc support was enabled, and it was. I did a > > boostrap build/check cycle on a little endian power8 system and there were > > regressions. Can I install the patch on the trunk? > > > > Note, the documentation for the --enable-gnu-indirect-option does not list > > which systems current enable the option, so I did not modify the > > documentation. > > I don't think this should have anything to do with embedded/server, or > about whether it's configured for 32-bit or 64-bit default. > powerpc-linux-gnu --enable-targets=all -m64 should behave the same as > powerpc64-linux-gnu. Since I don't test the embedded environments, I was just trying to cautious about changes that affect other PowerPC users. This patch enables --enable-gnu-indirect-function on all PowerPC linux systems, except for targetting Android or uclib. It is exactly the same code as we use in the i[34567]86-*-linux, x86_64-*-linux*, s390-*-linux*, and s390x-*-linux* systems. Given the ifunc support is not generated unless the user uses it, it should not affect other PowerPC users. Is this patch ok to check into the trunk? 2016-12-02 Michael Meissner * config.gcc (powerpc*-*-linux*): Set gnu-indirect-function by default on PowerPC linux systems. Index: gcc/config.gcc === --- gcc/config.gcc (svn+ssh://meiss...@gcc.gnu.org/svn/gcc/trunk/gcc/config.gcc) (revision 243202) +++ gcc/config.gcc (.../gcc/config.gcc)(working copy) @@ -2443,6 +2443,14 @@ powerpc*-*-linux*) if test x${enable_secureplt} = xyes; then tm_file="rs6000/secureplt.h ${tm_file}" fi + # Assume modern glibc if not targeting Android nor uclibc. + case ${target} in + *-*-*android*|*-*-*uclibc*|*-*-*musl*) + ;; + *) + default_gnu_indirect_function=yes + ;; + esac ;; powerpc-wrs-vxworks|powerpc-wrs-vxworksae|powerpc-wrs-vxworksmils) tm_file="${tm_file} elfos.h freebsd-spec.h rs6000/sysv4.h" -- Michael Meissner, IBM IBM, M/S 2506R, 550 King Street, Littleton, MA 01460-6245, USA email: meiss...@linux.vnet.ibm.com, phone: +1 (978) 899-4797
Re: [PATCH] Turn on gnu-indirect-function by default on PowerPC servers
On Wed, 23 Nov 2016, Michael Meissner wrote: > Since some of the embedded hosts use powerpc-*-linux, I only set the > default if the target is a 64-bit PowerPC system. I tested the compiler > manually to verify that ifunc support was enabled, and it was. I did a > boostrap build/check cycle on a little endian power8 system and there were > regressions. Can I install the patch on the trunk? > > Note, the documentation for the --enable-gnu-indirect-option does not list > which systems current enable the option, so I did not modify the > documentation. I don't think this should have anything to do with embedded/server, or about whether it's configured for 32-bit or 64-bit default. powerpc-linux-gnu --enable-targets=all -m64 should behave the same as powerpc64-linux-gnu. We have information about the target glibc version in configure.ac, determined from the --with-glibc-version option (in the case of bootstrapping a cross toolchain) or from target headers when available (native and non-bootstrap cross builds). That's the right information to test (based on whatever version of glibc got the required support for the given architecture). (The relevant configure.ac code is after config.gcc is processed. Maybe have a config.gcc setting to say "enable if glibc >= this version" and then rearrange the configure.ac code so glibc versions are processed before enable-gnu-indirect-function?) -- Joseph S. Myers jos...@codesourcery.com