From: H.J. Lu Date: Thu, 25 Jun 2015 21:31:04 +0000 (+0000) Subject: Validate -pie if PIE is enabled by default X-Git-Tag: basepoints/gcc-7~6077 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4115076d89d75a8ad4673df344645a05ad94c3c3;p=thirdparty%2Fgcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4f65eef75f3d..2ca60430fc97 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2015-06-25 H.J. Lu + + * gcc.c (driver_handle_option): Validate -pie if PIE is enabled + by default. + 2015-06-25 Andrew MacLeod * function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations. diff --git a/gcc/gcc.c b/gcc/gcc.c index d77c6c5692ad..0f29b7870fb0 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: