diff options
author | CoprDistGit <infra@openeuler.org> | 2023-10-17 02:15:03 +0000 |
---|---|---|
committer | CoprDistGit <infra@openeuler.org> | 2023-10-17 02:15:03 +0000 |
commit | cc47ed6ddebfece0584ad7ee706549614d16c0f0 (patch) | |
tree | 973a28470803b27c914f813f43d43f8932763ea3 /0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch | |
parent | 1e2198a988cc8d2ea55ab6ca2a1835e60149ab5c (diff) |
automatic import of gccopeneuler22.03_LTS_SP2
Diffstat (limited to '0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch')
-rw-r--r-- | 0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch | 40 |
1 files changed, 40 insertions, 0 deletions
diff --git a/0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch b/0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch new file mode 100644 index 0000000..441b5c5 --- /dev/null +++ b/0041-Backport-Register-sysroot-in-the-driver-switches-tab.patch @@ -0,0 +1,40 @@ +From beeb0fb50c7e40ee3d79044abc6408f760d6584a Mon Sep 17 00:00:00 2001 +From: zhaowenyu <804544223@qq.com> +Date: Thu, 23 Jun 2022 10:40:46 +0800 +Subject: [PATCH 07/12] [Backport] Register --sysroot in the driver switches + table + +Reference: https://gcc.gnu.org/git/gitweb.cgi?p=gcc.git;h=48e2d9b7b88dabed336cd098cd212d0e53c5125f + +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. +--- + gcc/gcc.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/gcc/gcc.c b/gcc/gcc.c +index b55075b14..655beffcc 100644 +--- a/gcc/gcc.c ++++ b/gcc/gcc.c +@@ -4190,7 +4190,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_: +-- +2.27.0.windows.1 + |