aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hongjiu.lu@intel.com>2015-06-25 21:31:04 +0000
committerH.J. Lu <hjl@gcc.gnu.org>2015-06-25 14:31:04 -0700
commit4115076d89d75a8ad4673df344645a05ad94c3c3 (patch)
tree27308f4225224d29173aed5360b3a20ef56889b1
parentf08899397420db710610435f8b7fe1ac90867634 (diff)
downloadgcc-4115076d89d75a8ad4673df344645a05ad94c3c3.zip
gcc-4115076d89d75a8ad4673df344645a05ad94c3c3.tar.gz
gcc-4115076d89d75a8ad4673df344645a05ad94c3c3.tar.bz2
Validate -pie if PIE is enabled by default
When PIE is enabled by default, -pie is treated as nop in driver. We should simply validate it, instead of issue an error. * gcc.c (driver_handle_option): Validate -pie if PIE is enabled by default. From-SVN: r224987
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/gcc.c5
2 files changed, 10 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 4f65eef..2ca6043 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2015-06-25 H.J. Lu <hongjiu.lu@intel.com>
+
+ * gcc.c (driver_handle_option): Validate -pie if PIE is enabled
+ by default.
+
2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations.
diff --git a/gcc/gcc.c b/gcc/gcc.c
index d77c6c5..0f29b78 100644
--- a/gcc/gcc.c
+++ b/gcc/gcc.c
@@ -3893,6 +3893,11 @@ driver_handle_option (struct gcc_options *opts,
save_switch ("-o", 1, &arg, validated, true);
return true;
+#ifdef ENABLE_DEFAULT_PIE
+ case OPT_pie:
+ /* -pie is turned on by default. */
+#endif
+
case OPT_static_libgcc:
case OPT_shared_libgcc:
case OPT_static_libgfortran: