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...@intel.com> PR target/59492 * config/i386/i386.c (ix86_function_specific_restore): Don't change -fPIC. 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;