diff --git a/cross-aarch64-gcc14-bootstrap.spec b/cross-aarch64-gcc14-bootstrap.spec index fd3939f..66b6306 100644 --- a/cross-aarch64-gcc14-bootstrap.spec +++ b/cross-aarch64-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-aarch64-gcc14.spec b/cross-aarch64-gcc14.spec index 80c98cc..24af71c 100644 --- a/cross-aarch64-gcc14.spec +++ b/cross-aarch64-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-amdgcn-gcc14.spec b/cross-amdgcn-gcc14.spec index 61600aa..c5c48f7 100644 --- a/cross-amdgcn-gcc14.spec +++ b/cross-amdgcn-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-arm-gcc14.spec b/cross-arm-gcc14.spec index 56287e6..96e8f8d 100644 --- a/cross-arm-gcc14.spec +++ b/cross-arm-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-arm-none-gcc14-bootstrap.spec b/cross-arm-none-gcc14-bootstrap.spec index 15c602b..b18c260 100644 --- a/cross-arm-none-gcc14-bootstrap.spec +++ b/cross-arm-none-gcc14-bootstrap.spec @@ -108,7 +108,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -137,6 +137,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -341,6 +343,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -441,7 +447,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-arm-none-gcc14.spec b/cross-arm-none-gcc14.spec index 5555c55..e0d4e67 100644 --- a/cross-arm-none-gcc14.spec +++ b/cross-arm-none-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-avr-gcc14-bootstrap.spec b/cross-avr-gcc14-bootstrap.spec index 9341283..6c93992 100644 --- a/cross-avr-gcc14-bootstrap.spec +++ b/cross-avr-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-avr-gcc14.spec b/cross-avr-gcc14.spec index cc627be..e8735c2 100644 --- a/cross-avr-gcc14.spec +++ b/cross-avr-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-bpf-gcc14.spec b/cross-bpf-gcc14.spec index 706d173..fda9afc 100644 --- a/cross-bpf-gcc14.spec +++ b/cross-bpf-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-hppa-gcc14-bootstrap.spec b/cross-hppa-gcc14-bootstrap.spec index ec1fdb7..b3ba019 100644 --- a/cross-hppa-gcc14-bootstrap.spec +++ b/cross-hppa-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-hppa-gcc14.spec b/cross-hppa-gcc14.spec index 174b485..872615c 100644 --- a/cross-hppa-gcc14.spec +++ b/cross-hppa-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-m68k-gcc14.spec b/cross-m68k-gcc14.spec index 4fbdda2..7cd5ad6 100644 --- a/cross-m68k-gcc14.spec +++ b/cross-m68k-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-mips-gcc14.spec b/cross-mips-gcc14.spec index d4bf3ef..97cc19a 100644 --- a/cross-mips-gcc14.spec +++ b/cross-mips-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-nvptx-gcc14.spec b/cross-nvptx-gcc14.spec index fdd024a..01f653b 100644 --- a/cross-nvptx-gcc14.spec +++ b/cross-nvptx-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-ppc64-gcc14.spec b/cross-ppc64-gcc14.spec index 881d2c0..8e48175 100644 --- a/cross-ppc64-gcc14.spec +++ b/cross-ppc64-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-ppc64le-gcc14-bootstrap.spec b/cross-ppc64le-gcc14-bootstrap.spec index 7ea38b2..04008d8 100644 --- a/cross-ppc64le-gcc14-bootstrap.spec +++ b/cross-ppc64le-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-ppc64le-gcc14.spec b/cross-ppc64le-gcc14.spec index a444be3..d8ecc35 100644 --- a/cross-ppc64le-gcc14.spec +++ b/cross-ppc64le-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-pru-gcc14-bootstrap.spec b/cross-pru-gcc14-bootstrap.spec index 1a082ac..c51bd24 100644 --- a/cross-pru-gcc14-bootstrap.spec +++ b/cross-pru-gcc14-bootstrap.spec @@ -108,7 +108,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -137,6 +137,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -341,6 +343,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -441,7 +447,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-pru-gcc14.spec b/cross-pru-gcc14.spec index 2c54cf2..559b458 100644 --- a/cross-pru-gcc14.spec +++ b/cross-pru-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-riscv64-elf-gcc14-bootstrap.spec b/cross-riscv64-elf-gcc14-bootstrap.spec index 3517ad9..ebeb9c4 100644 --- a/cross-riscv64-elf-gcc14-bootstrap.spec +++ b/cross-riscv64-elf-gcc14-bootstrap.spec @@ -108,7 +108,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -137,6 +137,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -341,6 +343,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -441,7 +447,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-riscv64-elf-gcc14.spec b/cross-riscv64-elf-gcc14.spec index 361bb43..46a39a9 100644 --- a/cross-riscv64-elf-gcc14.spec +++ b/cross-riscv64-elf-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-riscv64-gcc14-bootstrap.spec b/cross-riscv64-gcc14-bootstrap.spec index 94f28b5..ae1070d 100644 --- a/cross-riscv64-gcc14-bootstrap.spec +++ b/cross-riscv64-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-riscv64-gcc14.spec b/cross-riscv64-gcc14.spec index 952d0f3..bc2b942 100644 --- a/cross-riscv64-gcc14.spec +++ b/cross-riscv64-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-rx-gcc14-bootstrap.spec b/cross-rx-gcc14-bootstrap.spec index 06c9e64..0e0c855 100644 --- a/cross-rx-gcc14-bootstrap.spec +++ b/cross-rx-gcc14-bootstrap.spec @@ -108,7 +108,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -137,6 +137,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -341,6 +343,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -441,7 +447,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-rx-gcc14.spec b/cross-rx-gcc14.spec index b52716e..37c7fd7 100644 --- a/cross-rx-gcc14.spec +++ b/cross-rx-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-s390x-gcc14-bootstrap.spec b/cross-s390x-gcc14-bootstrap.spec index 8aead6b..476c3bb 100644 --- a/cross-s390x-gcc14-bootstrap.spec +++ b/cross-s390x-gcc14-bootstrap.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-s390x-gcc14.spec b/cross-s390x-gcc14.spec index b524b8f..38b3870 100644 --- a/cross-s390x-gcc14.spec +++ b/cross-s390x-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-sparc-gcc14.spec b/cross-sparc-gcc14.spec index 60c3359..9cc9819 100644 --- a/cross-sparc-gcc14.spec +++ b/cross-sparc-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-sparc64-gcc14.spec b/cross-sparc64-gcc14.spec index bfe9685..dc3e9c6 100644 --- a/cross-sparc64-gcc14.spec +++ b/cross-sparc64-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/cross-x86_64-gcc14.spec b/cross-x86_64-gcc14.spec index 9e3f611..ca10053 100644 --- a/cross-x86_64-gcc14.spec +++ b/cross-x86_64-gcc14.spec @@ -107,7 +107,7 @@ Name: %{pkgname} %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -136,6 +136,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple @@ -340,6 +342,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -440,7 +446,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/gcc-14.0.1+git9355.tar.xz b/gcc-14.0.1+git9355.tar.xz deleted file mode 100644 index bdcfed5..0000000 --- a/gcc-14.0.1+git9355.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:f68bcc96f8356fbea8d2c5795628e3b7a85ff25cd03307e0298649ffbdd06d64 -size 90781660 diff --git a/gcc-14.0.1+git9687.tar.xz b/gcc-14.0.1+git9687.tar.xz new file mode 100644 index 0000000..34eaa72 --- /dev/null +++ b/gcc-14.0.1+git9687.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5212b5f7b4ac437862154babd46fa16a26cc589c9023f718e3693c0bd83c3edb +size 90456056 diff --git a/gcc.spec.in b/gcc.spec.in index e7a8d4c..da1d158 100644 --- a/gcc.spec.in +++ b/gcc.spec.in @@ -210,7 +210,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 1 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -394,6 +394,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff # GCC-TESTSUITE-DELETE-BEGIN # SRC-COMMON-END @@ -625,8 +627,8 @@ Recommends: libstdc++%{libstdcxx_sover}-pp@variant@ = %{version}-%{release} %endif # The std::chrono timezone database is provided by timezone # (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and -# will only provide UTC -Recommends: timezone +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, see boo#1221601 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}@variant@ The standard C++ library, needed for dynamically linked C++ programs. @@ -1351,6 +1353,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -1451,7 +1457,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/gcc14-testresults.spec b/gcc14-testresults.spec index 94a8039..e503fd8 100644 --- a/gcc14-testresults.spec +++ b/gcc14-testresults.spec @@ -227,7 +227,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -410,6 +410,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff Summary: Testsuite results License: SUSE-Public-Domain @@ -537,6 +539,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -637,7 +643,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/gcc14.changes b/gcc14.changes index 161b854..404ca6a 100644 --- a/gcc14.changes +++ b/gcc14.changes @@ -1,3 +1,20 @@ +------------------------------------------------------------------- +Wed Mar 27 12:13:22 UTC 2024 - Richard Biener + +- Update to trunk head, 0b02da5b99e89347f5f8bf875ec8318f84, git9687 +- Fix install link to amdgcn-amdhsa-ld. + +------------------------------------------------------------------- +Mon Mar 25 14:50:07 UTC 2024 - Richard Biener + +- Add newlib-gcn-iolock.diff to fix locking for I/O on gcn offload + targets. + +------------------------------------------------------------------- +Mon Mar 18 14:32:42 UTC 2024 - Richard Biener + +- Remove timezone Recommends from the libstdc++6 package. [boo#1221601] + ------------------------------------------------------------------- Wed Mar 13 08:17:35 UTC 2024 - Richard Biener diff --git a/gcc14.spec b/gcc14.spec index 61bbd72..30266a1 100644 --- a/gcc14.spec +++ b/gcc14.spec @@ -206,7 +206,7 @@ %define biarch_targets x86_64 s390x powerpc64 powerpc sparc sparc64 URL: https://gcc.gnu.org/ -Version: 14.0.1+git9355 +Version: 14.0.1+git9687 Release: 0 %define gcc_dir_version %(echo %version | sed 's/+.*//' | cut -d '.' -f 1) %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') @@ -389,6 +389,8 @@ Patch51: gcc41-ppc32-retaddr.patch # Some patches taken from Debian Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch +# Patches for embedded newlib +Patch100: newlib-gcn-iolock.diff License: GPL-3.0-or-later Summary: The GNU C Compiler and Support Files @@ -780,8 +782,8 @@ Recommends: libstdc++%{libstdcxx_sover}-pp = %{version}-%{release} %endif # The std::chrono timezone database is provided by timezone # (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and -# will only provide UTC -Recommends: timezone +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, see boo#1221601 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} The standard C++ library, needed for dynamically linked C++ programs. @@ -806,8 +808,8 @@ Recommends: libstdc++%{libstdcxx_sover}-pp-32bit = %{version}-%{release} %endif # The std::chrono timezone database is provided by timezone # (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and -# will only provide UTC -Recommends: timezone +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, see boo#1221601 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit The standard C++ library, needed for dynamically linked C++ programs. @@ -832,8 +834,8 @@ Recommends: libstdc++%{libstdcxx_sover}-pp-64bit = %{version}-%{release} %endif # The std::chrono timezone database is provided by timezone # (/usr/share/zoneinfo/tzdata.zi), without that the tzdb is empty and -# will only provide UTC -Recommends: timezone +# will only provide UTC. We don't want a Requires here though, instead +# the overall product needs to decide what to provide, see boo#1221601 %description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit The standard C++ library, needed for dynamically linked C++ programs. @@ -2361,6 +2363,10 @@ ln -s newlib-4.4.0.20231231/newlib . %patch -P 51 %patch -p1 -P 60 -P 61 +%if 0%{?nvptx_newlib:1}%{?amdgcn_newlib:1} +%patch -p1 -P 100 +%endif + #test patching end %build @@ -2461,7 +2467,7 @@ export _POSIX2_VERSION=199209 mkdir -p target-tools/bin ln -s /usr/bin/llvm-ar-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ar ln -s /usr/bin/llvm-mc-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-as -ln -s /usr/bin/lld target-tools/bin/amdgcn-amdhsa-ld +ln -s /usr/bin/lld-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ld ln -s /usr/bin/llvm-nm-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-nm ln -s /usr/bin/llvm-ranlib-%{product_libs_llvm_ver}* target-tools/bin/amdgcn-amdhsa-ranlib export PATH="`pwd`/target-tools/bin:$PATH" diff --git a/newlib-gcn-iolock.diff b/newlib-gcn-iolock.diff new file mode 100644 index 0000000..d5169fd --- /dev/null +++ b/newlib-gcn-iolock.diff @@ -0,0 +1,333 @@ +From 7dd4eb1db9e1b1b9f14ef5b743705156e5f370e1 Mon Sep 17 00:00:00 2001 +From: Andrew Stubbs +Date: Fri, 22 Mar 2024 14:53:30 +0000 +Subject: [PATCH] amdgcn: Implement proper locks + +This should prevent printf output from multiple threads getting garbled. + +I don't know why IO ever worked properly -- probably it was always a bit +broken -- but the GFX11 devices have a different cache architecture and +trying to print from many threads at once corrupted the FILE buffers. +--- + newlib/Makefile.in | 24 ++- + newlib/libc/sys/amdgcn/Makefile.inc | 3 +- + newlib/libc/sys/amdgcn/include/sys/lock.h | 39 +++++ + newlib/libc/sys/amdgcn/lock.c | 187 ++++++++++++++++++++++ + 4 files changed, 250 insertions(+), 3 deletions(-) + create mode 100644 newlib/libc/sys/amdgcn/include/sys/lock.h + create mode 100644 newlib/libc/sys/amdgcn/lock.c + +diff --git a/newlib/Makefile.in b/newlib/Makefile.in +index 8c71dbab3..b45c42c36 100644 +--- a/newlib/Makefile.in ++++ b/newlib/Makefile.in +@@ -560,7 +560,8 @@ check_PROGRAMS = + + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@am__append_43 = \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/close.c libc/sys/amdgcn/fstat.c libc/sys/amdgcn/isatty.c libc/sys/amdgcn/lseek.c libc/sys/amdgcn/read.c libc/sys/amdgcn/write.c \ +-@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/fcntl.c libc/sys/amdgcn/getpid.c libc/sys/amdgcn/kill.c libc/sys/amdgcn/open.c libc/sys/amdgcn/raise.c libc/sys/amdgcn/stat.c libc/sys/amdgcn/unlink.c ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/fcntl.c libc/sys/amdgcn/getpid.c libc/sys/amdgcn/kill.c libc/sys/amdgcn/open.c libc/sys/amdgcn/raise.c libc/sys/amdgcn/stat.c \ ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/unlink.c libc/sys/amdgcn/lock.c + + @HAVE_LIBC_SYS_ARM_DIR_TRUE@am__append_44 = libc/sys/arm/access.c libc/sys/arm/aeabi_atexit.c libc/sys/arm/sysconf.c + @HAVE_LIBC_SYS_ARM_DIR_TRUE@@MAY_SUPPLY_SYSCALLS_TRUE@am__append_45 = libc/sys/arm/libcfunc.c libc/sys/arm/trap.S libc/sys/arm/syscalls.c +@@ -1656,7 +1657,8 @@ am__objects_51 = libc/ssp/libc_a-chk_fail.$(OBJEXT) \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-open.$(OBJEXT) \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-raise.$(OBJEXT) \ + @HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-stat.$(OBJEXT) \ +-@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-unlink.$(OBJEXT) ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-unlink.$(OBJEXT) \ ++@HAVE_LIBC_SYS_AMDGCN_DIR_TRUE@ libc/sys/amdgcn/libc_a-lock.$(OBJEXT) + @HAVE_LIBC_SYS_ARM_DIR_TRUE@am__objects_55 = libc/sys/arm/libc_a-access.$(OBJEXT) \ + @HAVE_LIBC_SYS_ARM_DIR_TRUE@ libc/sys/arm/libc_a-aeabi_atexit.$(OBJEXT) \ + @HAVE_LIBC_SYS_ARM_DIR_TRUE@ libc/sys/arm/libc_a-sysconf.$(OBJEXT) +@@ -7268,6 +7270,9 @@ libc/sys/amdgcn/libc_a-stat.$(OBJEXT): \ + libc/sys/amdgcn/libc_a-unlink.$(OBJEXT): \ + libc/sys/amdgcn/$(am__dirstamp) \ + libc/sys/amdgcn/$(DEPDIR)/$(am__dirstamp) ++libc/sys/amdgcn/libc_a-lock.$(OBJEXT): \ ++ libc/sys/amdgcn/$(am__dirstamp) \ ++ libc/sys/amdgcn/$(DEPDIR)/$(am__dirstamp) + libc/sys/arm/$(am__dirstamp): + @$(MKDIR_P) libc/sys/arm + @: > libc/sys/arm/$(am__dirstamp) +@@ -13831,6 +13836,7 @@ distclean-compile: + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-getpid.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-isatty.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-kill.Po@am__quote@ ++@AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-lseek.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-open.Po@am__quote@ + @AMDEP_TRUE@@am__include@ @am__quote@libc/sys/amdgcn/$(DEPDIR)/libc_a-raise.Po@am__quote@ +@@ -30960,6 +30966,20 @@ libc/sys/amdgcn/libc_a-unlink.obj: libc/sys/amdgcn/unlink.c + @AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ + @am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-unlink.obj `if test -f 'libc/sys/amdgcn/unlink.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/unlink.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/unlink.c'; fi` + ++libc/sys/amdgcn/libc_a-lock.o: libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/amdgcn/libc_a-lock.o -MD -MP -MF libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo -c -o libc/sys/amdgcn/libc_a-lock.o `test -f 'libc/sys/amdgcn/lock.c' || echo '$(srcdir)/'`libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/sys/amdgcn/lock.c' object='libc/sys/amdgcn/libc_a-lock.o' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-lock.o `test -f 'libc/sys/amdgcn/lock.c' || echo '$(srcdir)/'`libc/sys/amdgcn/lock.c ++ ++libc/sys/amdgcn/libc_a-lock.obj: libc/sys/amdgcn/lock.c ++@am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/amdgcn/libc_a-lock.obj -MD -MP -MF libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo -c -o libc/sys/amdgcn/libc_a-lock.obj `if test -f 'libc/sys/amdgcn/lock.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/lock.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/lock.c'; fi` ++@am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Tpo libc/sys/amdgcn/$(DEPDIR)/libc_a-lock.Po ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ $(AM_V_CC)source='libc/sys/amdgcn/lock.c' object='libc/sys/amdgcn/libc_a-lock.obj' libtool=no @AMDEPBACKSLASH@ ++@AMDEP_TRUE@@am__fastdepCC_FALSE@ DEPDIR=$(DEPDIR) $(CCDEPMODE) $(depcomp) @AMDEPBACKSLASH@ ++@am__fastdepCC_FALSE@ $(AM_V_CC@am__nodep@)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -c -o libc/sys/amdgcn/libc_a-lock.obj `if test -f 'libc/sys/amdgcn/lock.c'; then $(CYGPATH_W) 'libc/sys/amdgcn/lock.c'; else $(CYGPATH_W) '$(srcdir)/libc/sys/amdgcn/lock.c'; fi` ++ + libc/sys/arm/libc_a-access.o: libc/sys/arm/access.c + @am__fastdepCC_TRUE@ $(AM_V_CC)$(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(libc_a_CPPFLAGS) $(CPPFLAGS) $(libc_a_CFLAGS) $(CFLAGS) -MT libc/sys/arm/libc_a-access.o -MD -MP -MF libc/sys/arm/$(DEPDIR)/libc_a-access.Tpo -c -o libc/sys/arm/libc_a-access.o `test -f 'libc/sys/arm/access.c' || echo '$(srcdir)/'`libc/sys/arm/access.c + @am__fastdepCC_TRUE@ $(AM_V_at)$(am__mv) libc/sys/arm/$(DEPDIR)/libc_a-access.Tpo libc/sys/arm/$(DEPDIR)/libc_a-access.Po +diff --git a/newlib/libc/sys/amdgcn/Makefile.inc b/newlib/libc/sys/amdgcn/Makefile.inc +index c1570b2ad..4e540fc24 100644 +--- a/newlib/libc/sys/amdgcn/Makefile.inc ++++ b/newlib/libc/sys/amdgcn/Makefile.inc +@@ -1,3 +1,4 @@ + libc_a_SOURCES += \ + %D%/close.c %D%/fstat.c %D%/isatty.c %D%/lseek.c %D%/read.c %D%/write.c \ +- %D%/fcntl.c %D%/getpid.c %D%/kill.c %D%/open.c %D%/raise.c %D%/stat.c %D%/unlink.c ++ %D%/fcntl.c %D%/getpid.c %D%/kill.c %D%/open.c %D%/raise.c %D%/stat.c \ ++ %D%/unlink.c %D%/lock.c +diff --git a/newlib/libc/sys/amdgcn/include/sys/lock.h b/newlib/libc/sys/amdgcn/include/sys/lock.h +new file mode 100644 +index 000000000..0e0e667e5 +--- /dev/null ++++ b/newlib/libc/sys/amdgcn/include/sys/lock.h +@@ -0,0 +1,39 @@ ++#ifndef __SYS_LOCK_H__ ++#define __SYS_LOCK_H__ ++ ++#include ++#include <_ansi.h> ++ ++typedef unsigned int _LOCK_T; ++typedef unsigned int _LOCK_RECURSIVE_T; ++ ++#define __LOCK_INIT(CLASS,LOCK) CLASS _LOCK_T LOCK = 0; ++#define __LOCK_INIT_RECURSIVE(CLASS,LOCK) __LOCK_INIT(CLASS,LOCK) ++ ++#define __lock_init(LOCK) LOCK = 0 ++#define __lock_init_recursive(LOCK) LOCK = 0 ++#define __lock_close(LOCK) ((void)0) ++#define __lock_close_recursive(LOCK) ((void) 0) ++#define __lock_acquire(LOCK) __gcn_lock_acquire (&LOCK) ++#define __lock_acquire_recursive(LOCK) \ ++ __gcn_lock_acquire_recursive (&LOCK) ++#define __lock_try_acquire(LOCK) __gcn_try_lock_acquire (&LOCK) ++#define __lock_try_acquire_recursive(LOCK) \ ++ __gcn_lock_try_acquire_recursive (&LOCK) ++#define __lock_release(LOCK) __gcn_lock_release (&LOCK) ++#define __lock_release_recursive(LOCK) \ ++ __gcn_lock_release_recursive (&LOCK) ++ ++ ++int __gcn_try_lock_acquire (_LOCK_T *lock_ptr); ++void __gcn_lock_acquire (_LOCK_T *lock_ptr); ++void __gcn_lock_release (_LOCK_T *lock_ptr); ++int __gcn_lock_try_acquire_recursive (_LOCK_T *lock_ptr); ++void __gcn_lock_acquire_recursive (_LOCK_T *lock_ptr); ++void __gcn_lock_release_recursive (_LOCK_T *lock_ptr); ++ ++#ifdef __cplusplus ++} ++#endif ++ ++#endif /* __SYS_LOCK_H__ */ +diff --git a/newlib/libc/sys/amdgcn/lock.c b/newlib/libc/sys/amdgcn/lock.c +new file mode 100644 +index 000000000..dcc93cb01 +--- /dev/null ++++ b/newlib/libc/sys/amdgcn/lock.c +@@ -0,0 +1,187 @@ ++/* ++ * Support file for amdgcn in newlib. ++ * Copyright (c) 2024 BayLibre. ++ * ++ * The authors hereby grant permission to use, copy, modify, distribute, ++ * and license this software and its documentation for any purpose, provided ++ * that existing copyright notices are retained in all copies and that this ++ * notice is included verbatim in any distributions. No written agreement, ++ * license, or royalty fee is required for any of the authorized uses. ++ * Modifications to this software may be copyrighted by their authors ++ * and need not follow the licensing terms described here, provided that ++ * the new terms are clearly indicated on the first page of each file where ++ * they apply. ++ */ ++ ++/* Lock routines for AMD GPU devices. ++ ++ The lock is a 32-bit int: ++ - bits 0-3: wavefront id ++ - bits 4-23: workgroup id (+1, so never zero) ++ - bits 24-31: recursive lock count. ++ ++ The purpose of the "relaxed" loads and stores being "atomic" here is ++ mostly just to ensure we punch through the caches consistently. ++ ++ Non-recursive locks may be unlocked by any thread. It's an error to ++ attempt to unlock a recursive lock from the wrong thread. ++ ++ The DEBUG statements here use sprintf and write to avoid taking locks ++ themselves. */ ++ ++#include ++#include ++ ++#define DEBUG 0 ++ ++#if DEBUG ++extern void write(int, char *, int); ++#endif ++ ++static unsigned ++__gcn_thread_id () ++{ ++ /* Dim(0) is the workgroup ID; range 0 to maybe thousands. ++ Dim(1) is the wavefront ID; range 0 to 15. */ ++ return (((__builtin_gcn_dim_pos (0) + 1) << 4) ++ + __builtin_gcn_dim_pos (1)); ++} ++ ++static int ++__gcn_lock_acquire_int (_LOCK_T *lock_ptr, int _try) ++{ ++ int id = __gcn_thread_id (); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"acquire:%p(%d) lock_value:0x%x id:0x%x", lock_ptr, ++ _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ int expected = 0; ++ while (!__atomic_compare_exchange_n (lock_ptr, &expected, id, 0, ++ __ATOMIC_ACQUIRE, __ATOMIC_RELAXED)) ++ { ++ /* Lock *not* acquired. */ ++ if (_try) ++ return 0; ++ else ++ { ++ asm ("s_sleep 64"); ++ expected = 0; ++ } ++ } ++ ++#if DEBUG ++ __builtin_sprintf (buf,"acquired:%p(%d) lock_value:0x%x id:0x%x", lock_ptr, ++ _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ return 1; ++} ++ ++int ++__gcn_try_lock_acquire (_LOCK_T *lock_ptr) ++{ ++ return __gcn_lock_acquire_int (lock_ptr, 1); ++} ++ ++void ++__gcn_lock_acquire (_LOCK_T *lock_ptr) ++{ ++ __gcn_lock_acquire_int (lock_ptr, 0); ++} ++ ++static int ++__gcn_lock_acquire_recursive_int (_LOCK_T *lock_ptr, int _try) ++{ ++ int id = __gcn_thread_id (); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"acquire recursive:%p(%d) lock_value:0x%x id:0x%x", ++ lock_ptr, _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ unsigned int lock_value = __atomic_load_n (lock_ptr, __ATOMIC_RELAXED); ++ if ((lock_value & 0xffffff) == id) ++ { ++ /* This thread already holds the lock. ++ Increment the recursion counter and update the lock. */ ++ int count = lock_value >> 24; ++ lock_value = ((count + 1) << 24) | id; ++ __atomic_store_n (lock_ptr, lock_value, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ __builtin_sprintf (buf, ++ "increment recursive:%p(%d) lock_value:0x%x id:0x%x", ++ lock_ptr, _try, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ return 1; ++ } ++ else ++ return __gcn_lock_acquire_int (lock_ptr, _try); ++} ++ ++int ++__gcn_lock_try_acquire_recursive (_LOCK_T *lock_ptr) ++{ ++ return __gcn_lock_acquire_recursive_int (lock_ptr, 1); ++} ++ ++void ++__gcn_lock_acquire_recursive (_LOCK_T *lock_ptr) ++{ ++ __gcn_lock_acquire_recursive_int (lock_ptr, 0); ++} ++ ++void ++__gcn_lock_release (_LOCK_T *lock_ptr) ++{ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf,"release:%p lock_value:0x%x id:0x%x", lock_ptr, ++ *lock_ptr, __gcn_thread_id()); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ __atomic_store_n (lock_ptr, 0, __ATOMIC_RELEASE); ++} ++ ++void ++__gcn_lock_release_recursive (_LOCK_T *lock_ptr) ++{ ++ int id = __gcn_thread_id (); ++ unsigned int lock_value = __atomic_load_n (lock_ptr, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ char buf[1000]; ++ __builtin_sprintf (buf, "release recursive:%p lock_value:0x%x id:0x%x", ++ lock_ptr, lock_value, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ ++ /* It is an error to call this function from the wrong thread. */ ++ assert ((lock_value & 0xffffff) == id); ++ ++ /* Decrement or release the lock. */ ++ int count = lock_value >> 24; ++ if (count > 0) ++ { ++ lock_value = ((count - 1) << 24) | id; ++ __atomic_store_n (lock_ptr, lock_value, __ATOMIC_RELAXED); ++ ++#if DEBUG ++ __builtin_sprintf (buf, "decrement recursive:%p lock_value:0x%x id:0x%x", ++ lock_ptr, *lock_ptr, id); ++ write (1, buf, __builtin_strlen(buf)); ++#endif ++ } ++ else ++ __gcn_lock_release (lock_ptr); ++} +-- +2.35.3 +