On Thu, Nov 24, 2016 at 01:07:04AM +0000, Joseph Myers wrote:
> On Wed, 23 Nov 2016, Michael Meissner wrote:
> 
> > Since some of the embedded hosts use powerpc-*-linux<whatever>, 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  <meiss...@linux.vnet.ibm.com>

        * 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

Reply via email to