Commit 4115076d by H.J. Lu Committed by H.J. Lu

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
parent f0889939
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> 2015-06-25 Andrew MacLeod <amacleod@redhat.com>
* function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations. * function.h (ipa_opt_pass, ipa_opt_pass_d): Move forward declarations.
......
...@@ -3893,6 +3893,11 @@ driver_handle_option (struct gcc_options *opts, ...@@ -3893,6 +3893,11 @@ driver_handle_option (struct gcc_options *opts,
save_switch ("-o", 1, &arg, validated, true); save_switch ("-o", 1, &arg, validated, true);
return true; return true;
#ifdef ENABLE_DEFAULT_PIE
case OPT_pie:
/* -pie is turned on by default. */
#endif
case OPT_static_libgcc: case OPT_static_libgcc:
case OPT_shared_libgcc: case OPT_shared_libgcc:
case OPT_static_libgfortran: case OPT_static_libgfortran:
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment