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
This commit is contained in:
H.J. Lu 2015-06-25 21:31:04 +00:00 committed by H.J. Lu
parent f088993974
commit 4115076d89
2 changed files with 10 additions and 0 deletions

View File

@ -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.

View File

@ -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: