[Bug lto/70258] [6 Regression] flag_pic is cleared for PIE in lto_post_options

hjl.tools at gmail dot com gcc-bugzilla@gcc.gnu.org
Wed Mar 16 17:29:00 GMT 2016


https://gcc.gnu.org/bugzilla/show_bug.cgi?id=70258

H.J. Lu <hjl.tools at gmail dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |NEW
   Last reconfirmed|                            |2016-03-16
                 CC|                            |hubicka at ucw dot cz
   Target Milestone|---                         |6.0
            Summary|-fPIE/-fPIC isn't passed to |[6 Regression] flag_pic is
                   |lto                         |cleared for PIE in
                   |                            |lto_post_options
     Ever confirmed|0                           |1

--- Comment #2 from H.J. Lu <hjl.tools at gmail dot com> ---
r230915 changed lto_post_options to

   case LTO_LINKER_OUTPUT_PIE: /* PIE binary */
      /* If -fPIC or -fPIE was used at compile time, be sure that
         flag_pie is 2.  */
      flag_pie = MAX (flag_pie, flag_pic);
      flag_pic = 0; <<<<<<<<<<< This is wrong since PIE implies PIC.
      break;


More information about the Gcc-bugs mailing list