commit: 8b7a28b5604dc83e14f114c97cc465d54c344e75 Author: Sam James <sam <AT> gentoo <DOT> org> AuthorDate: Tue Dec 10 05:27:58 2024 +0000 Commit: Sam James <sam <AT> gentoo <DOT> org> CommitDate: Tue Dec 10 05:28:33 2024 +0000 URL: https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=8b7a28b5
14.2.0: add bashisms patch for nvptx too, cut patchset 6 Bug: https://bugs.gentoo.org/945296 Signed-off-by: Sam James <sam <AT> gentoo.org> ...tx-fix-bashisms-with-gen-copyright.sh-use.patch | 71 ++++++++++++++++++++++ 14.2.0/gentoo/README.history | 3 +- 2 files changed, 73 insertions(+), 1 deletion(-) diff --git a/14.2.0/gentoo/70_all_PR117854-config-nvptx-fix-bashisms-with-gen-copyright.sh-use.patch b/14.2.0/gentoo/70_all_PR117854-config-nvptx-fix-bashisms-with-gen-copyright.sh-use.patch new file mode 100644 index 0000000..4221912 --- /dev/null +++ b/14.2.0/gentoo/70_all_PR117854-config-nvptx-fix-bashisms-with-gen-copyright.sh-use.patch @@ -0,0 +1,71 @@ +From 0585c7327d000e95a1297e7c0acfea48993c19c8 Mon Sep 17 00:00:00 2001 +Message-ID: <0585c7327d000e95a1297e7c0acfea48993c19c8.1733808440.git....@gentoo.org> +From: Sam James <[email protected]> +Date: Fri, 6 Dec 2024 09:11:11 +0000 +Subject: [PATCH] config: nvptx: fix bashisms with gen-copyright.sh use + +Providing parameters to `.` when sourcing is a bashism and not supported +by POSIX shell which causes a build failure when compiling a toolchain +for nvptx-none with dash as /bin/sh. + +gen-copyright.sh takes a parameter for the format of copyright notice +required. Switch that to using an environment variable `NVPTX_GEN_COPYRIGHT`, +although this could be changed to a function if desired (just more churn +in gen-copyright.sh then). + +gcc/ChangeLog: + PR target/117854 + + * config/nvptx/gen-copyright.sh: Read NVPTX_GEN_COPYRIGHT envvar. + * config/nvptx/gen-h.sh: Set NVPTX_GEN_COPYRIGHT. + * config/nvptx/gen-opt.sh: Ditto. +--- + gcc/config/nvptx/gen-copyright.sh | 2 +- + gcc/config/nvptx/gen-h.sh | 2 +- + gcc/config/nvptx/gen-opt.sh | 2 +- + 3 files changed, 3 insertions(+), 3 deletions(-) + +diff --git a/gcc/config/nvptx/gen-copyright.sh b/gcc/config/nvptx/gen-copyright.sh +index d0a86acb832c..b140de0eb76d 100644 +--- a/gcc/config/nvptx/gen-copyright.sh ++++ b/gcc/config/nvptx/gen-copyright.sh +@@ -18,7 +18,7 @@ + # along with GCC; see the file COPYING3. If not see + # <http://www.gnu.org/licenses/>. + +-style="$1" ++style="${1:-${NVPTX_GEN_COPYRIGHT}}" + case $style in + opt) + ;; +diff --git a/gcc/config/nvptx/gen-h.sh b/gcc/config/nvptx/gen-h.sh +index ea75e127cdeb..beafd5a9d2c4 100644 +--- a/gcc/config/nvptx/gen-h.sh ++++ b/gcc/config/nvptx/gen-h.sh +@@ -32,7 +32,7 @@ EOF + # Separator. + echo + +-. $gen_copyright_sh c ++NVPTX_GEN_COPYRIGHT=c . $gen_copyright_sh + + # Separator. + echo +diff --git a/gcc/config/nvptx/gen-opt.sh b/gcc/config/nvptx/gen-opt.sh +index 3f7838251d2d..875c51ed8df3 100644 +--- a/gcc/config/nvptx/gen-opt.sh ++++ b/gcc/config/nvptx/gen-opt.sh +@@ -36,7 +36,7 @@ EOF + # Separator. + echo + +-. $gen_copyright_sh opt ++NVPTX_GEN_COPYRIGHT=opt . $gen_copyright_sh + + # Separator. + echo + +base-commit: 3161e4c2da91652c9a28e79cbf74dfee2201095f +-- +2.47.1 + diff --git a/14.2.0/gentoo/README.history b/14.2.0/gentoo/README.history index fc47e5b..6dcd1b4 100644 --- a/14.2.0/gentoo/README.history +++ b/14.2.0/gentoo/README.history @@ -1,9 +1,10 @@ -6 ???? +6 10 Dec 2024 U 04_all_nossp-on-nostdlib.patch U 15_all_DEF_GENTOO_GLIBCXX_ASSERTIONS.patch U 24_all_DEF_GENTOO_SCP-fstack-clash-protection.patch U 26_all_enable-cet.patch + + 70_all_PR117854-config-nvptx-fix-bashisms-with-gen-copyright.sh-use.patch 5 1 Dec 2024
