diff mbox

PATCH: PR target/59492: Don't change -fPIC

Message ID 20131213144103.GA18660@intel.com
State New
Headers show

Commit Message

H.J. Lu Dec. 13, 2013, 2:41 p.m. UTC
We can't change -fPIC underneath in x86 backend while middle-end is unchanged.  
This patch restores opts->x_flag_pic from global flag_pic.  OK to install?

Thanks.


H.J.
---
2013-12-12   H.J. Lu  <hongjiu.lu@intel.com>

	PR target/59492
	* config/i386/i386.c (ix86_function_specific_restore): Don't
	change -fPIC.

Comments

Uros Bizjak Dec. 14, 2013, 9:33 a.m. UTC | #1
On Fri, Dec 13, 2013 at 3:41 PM, H.J. Lu <hongjiu.lu@intel.com> wrote:
> We can't change -fPIC underneath in x86 backend while middle-end is unchanged.
> This patch restores opts->x_flag_pic from global flag_pic.  OK to install?
>
> 2013-12-12   H.J. Lu  <hongjiu.lu@intel.com>
>
>         PR target/59492
>         * config/i386/i386.c (ix86_function_specific_restore): Don't
>         change -fPIC.

Is it possible to add x32 testcase from the PR without too much troubles?

Uros.
diff mbox

Patch

diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 9fd6baa..2d79ee6 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -4333,6 +4333,9 @@  ix86_function_specific_restore (struct gcc_options *opts,
   unsigned int ix86_arch_mask;
   int i;
 
+  /* We don't change -fPIC.  */
+  opts->x_flag_pic = flag_pic;
+
   ix86_arch = (enum processor_type) ptr->arch;
   ix86_schedule = (enum attr_cpu) ptr->schedule;
   ix86_tune = (enum processor_type) ptr->tune;