[committed] Fix s390 bootstrap problem
Ulrich Weigand
uweigand@de.ibm.com
Fri Dec 9 01:08:00 GMT 2005
Hello,
the attribute((weakref)) changes to gthread.h would cause
bootstrap failure on s390-ibm-linux because of an attempt
to do a sibcall via PLT to a non-local function.
This was caused by s390_function_ok_for_sibcall relying
on TREE_PUBLIC to check for non-local functions, which is
no longer correct. The patch below changes this to use
targetm.binds_local_p instead.
Bootstrapped/regtested on s390-ibm-linux and s390x-ibm-linux,
applied to mainline.
Bye,
Ulrich
ChangeLog:
* config/s390/s390.c (s390_function_ok_for_sibcall): Use
targetm.binds_local_p to check for local function calls.
Index: gcc/config/s390/s390.c
===================================================================
*** gcc/config/s390/s390.c (revision 108253)
--- gcc/config/s390/s390.c (working copy)
*************** s390_function_ok_for_sibcall (tree decl,
*** 8574,8580 ****
/* The 31 bit PLT code uses register 12 (GOT pointer - caller saved)
which would have to be restored before the sibcall. */
! if (!TARGET_64BIT && flag_pic && decl && TREE_PUBLIC (decl))
return false;
/* Register 6 on s390 is available as an argument register but unfortunately
--- 8574,8580 ----
/* The 31 bit PLT code uses register 12 (GOT pointer - caller saved)
which would have to be restored before the sibcall. */
! if (!TARGET_64BIT && flag_pic && decl && !targetm.binds_local_p (decl))
return false;
/* Register 6 on s390 is available as an argument register but unfortunately
--
Dr. Ulrich Weigand
Linux on zSeries Development
Ulrich.Weigand@de.ibm.com
More information about the Gcc-patches
mailing list