aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/lto/ChangeLog6
-rw-r--r--gcc/lto/lto-lang.c2
2 files changed, 7 insertions, 1 deletions
diff --git a/gcc/lto/ChangeLog b/gcc/lto/ChangeLog
index 7a298d6..dbb69a2 100644
--- a/gcc/lto/ChangeLog
+++ b/gcc/lto/ChangeLog
@@ -1,3 +1,9 @@
+2016-03-17 H.J. Lu <hongjiu.lu@intel.com>
+
+ PR lto/70258
+ * lto-lang.c (lto_post_options): Set flag_pic to flag_pie for
+ PIE.
+
2016-03-08 Jakub Jelinek <jakub@redhat.com>
* lto-symtab.h (lto_symtab_prevail_decl): Fix spelling
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 */