aboutsummaryrefslogtreecommitdiff
path: root/gcc/gcc.c
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 /gcc/gcc.c
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
Diffstat (limited to 'gcc/gcc.c')
-rw-r--r--gcc/gcc.c5
1 files changed, 5 insertions, 0 deletions
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: