aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJakub Jelinek <jakub@redhat.com>2023-12-06 09:54:03 +0100
committerJakub Jelinek <jakub@redhat.com>2023-12-06 09:54:03 +0100
commit895a70f012b8c1b8e80ecc584c1d7ded014bc2bc (patch)
tree4a935eab3b969e00cc6bfb7a3b235dee76510113
parent6e84dafcc72d1cd6d028b42f1801e092a91d3214 (diff)
downloadgcc-895a70f012b8c1b8e80ecc584c1d7ded014bc2bc.zip
gcc-895a70f012b8c1b8e80ecc584c1d7ded014bc2bc.tar.gz
gcc-895a70f012b8c1b8e80ecc584c1d7ded014bc2bc.tar.bz2
driver: Fix bootstrap with --enable-default-pie
On IRC Iain mentioned bootstrap is broken for him presumably since r14-5791 -fhardened addition. I think it is only a problem with --enable-default-pie when the case OPT_pie: wants to fall through into case OPT_r: and warns. Before the patch validated = true; was set up if ENABLE_DEFAULT_PIE for OPT_pie, and for -fhardened as documented I think we want to set any_link_options_p = true; for it too: /* True if -r, -shared, -pie, or -no-pie were specified on the command line. */ static bool any_link_options_p; 2023-12-06 Jakub Jelinek <jakub@redhat.com> * gcc.cc (driver_handle_option): Add /* FALLTHROUGH */ comment between OPT_pie and OPT_r cases.
-rw-r--r--gcc/gcc.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/gcc/gcc.cc b/gcc/gcc.cc
index 9f21ad9..03ec6e1 100644
--- a/gcc/gcc.cc
+++ b/gcc/gcc.cc
@@ -4617,6 +4617,7 @@ driver_handle_option (struct gcc_options *opts,
/* -pie is turned on by default. */
validated = true;
#endif
+ /* FALLTHROUGH */
case OPT_r:
case OPT_shared:
case OPT_no_pie: