public inbox for gcc-cvs@sourceware.org help / color / mirror / Atom feed
From: Olivier Hainque <hainque@gcc.gnu.org> To: gcc-cvs@gcc.gnu.org Subject: [gcc r12-6205] Register --sysroot in the driver switches table Date: Tue, 4 Jan 2022 10:17:19 +0000 (GMT) [thread overview] Message-ID: <20220104101719.CB02F3858424@sourceware.org> (raw) https://gcc.gnu.org/g:48e2d9b7b88dabed336cd098cd212d0e53c5125f commit r12-6205-g48e2d9b7b88dabed336cd098cd212d0e53c5125f Author: Olivier Hainque <hainque@adacore.com> Date: Mon Dec 20 17:47:24 2021 +0000 Register --sysroot in the driver switches table This change adjusts the processing of --sysroot to save the option in the internal "switches" array, which lets self-specs test for it and provide a default value possibly dependent on environment variables, as in --with-specs=%{!-sysroot*:--sysroot=%:getenv("WIND_BASE" /target)} 2021-12-20 Olivier Hainque <hainque@adacore.com> gcc/ * gcc.c (driver_handle_option): do_save --sysroot. Diff: --- gcc/gcc.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gcc/gcc.c b/gcc/gcc.c index e5c43b0bb18..d4c8746b0aa 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -4492,7 +4492,9 @@ driver_handle_option (struct gcc_options *opts, case OPT__sysroot_: target_system_root = arg; target_system_root_changed = 1; - do_save = false; + /* Saving this option is useful to let self-specs decide to + provide a default one. */ + do_save = true; break; case OPT_time_:
reply other threads:[~2022-01-04 10:17 UTC|newest] Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20220104101719.CB02F3858424@sourceware.org \ --to=hainque@gcc.gnu.org \ --cc=gcc-cvs@gcc.gnu.org \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: linkBe sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).