diff options
author | H.J. Lu <hongjiu.lu@intel.com> | 2016-03-17 11:07:10 +0000 |
---|---|---|
committer | H.J. Lu <hjl@gcc.gnu.org> | 2016-03-17 04:07:10 -0700 |
commit | ea913779b0921886a8d8503263f27e3ddfc1831b (patch) | |
tree | 20821b0ae8514bf944facf2b9ea5b63d7a2b720a /gcc/lto/lto-lang.c | |
parent | 0c8b64cb587dbe83a0660878c69d7ff96589673c (diff) | |
download | gcc-ea913779b0921886a8d8503263f27e3ddfc1831b.zip gcc-ea913779b0921886a8d8503263f27e3ddfc1831b.tar.gz gcc-ea913779b0921886a8d8503263f27e3ddfc1831b.tar.bz2 |
Set flag_pic to flag_pie for PIE in LTO
Since PIE implies PIC, we should set flag_pic to flag_pie for PIE in
LTO.
PR lto/70258
* lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
PIE.
From-SVN: r234284
Diffstat (limited to 'gcc/lto/lto-lang.c')
-rw-r--r-- | gcc/lto/lto-lang.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c index 691e9e2..b5efe3a 100644 --- a/gcc/lto/lto-lang.c +++ b/gcc/lto/lto-lang.c @@ -836,7 +836,7 @@ lto_post_options (const char **pfilename ATTRIBUTE_UNUSED) /* 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; + flag_pic = flag_pie; break; case LTO_LINKER_OUTPUT_EXEC: /* Normal executable */ |