Accepting request 926586 from home:gbelinassi

- - Add gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
  gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
  gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
  gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
  gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
  gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
  gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
  gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
  gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
  gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
  gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
  gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
  gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
  gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
  gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
  gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
  gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
  gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
  gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
  gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
  gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
  gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
  gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
  to add -fpatchable-function-entry feature to gcc-7.

OBS-URL: https://build.opensuse.org/request/show/926586
OBS-URL: https://build.opensuse.org/package/show/devel:gcc/gcc7?expand=0&rev=213
This commit is contained in:
Richard Biener 2021-10-21 06:15:55 +00:00 committed by Git OBS Bridge
parent 727d24fc65
commit f4c74dc639
48 changed files with 5603 additions and 134 deletions

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-aarch64-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -229,7 +256,7 @@ ExclusiveArch: x86_64
%endif
%endif
%if 0%{?gcc_icecream:1}
ExclusiveArch: ppc64le ppc64 x86_64 s390x
ExclusiveArch: ppc64le ppc64 x86_64 s390x
%endif
%define _binary_payload w.ufdio
# Obsolete cross-ppc-gcc49 from cross-ppc64-gcc49 which has
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-arm-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-arm-none-gcc7-bootstrap
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -24,6 +24,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -108,6 +109,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -152,6 +154,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -253,10 +280,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -316,6 +342,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -717,7 +766,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-arm-none-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-avr-gcc7-bootstrap
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-avr-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-epiphany-gcc7-bootstrap
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -24,6 +24,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -108,6 +109,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -152,6 +154,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -253,10 +280,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -316,6 +342,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -717,7 +766,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-epiphany-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-hppa-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-i386-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-m68k-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-mips-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-nvptx-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-ppc64-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-ppc64le-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-rx-gcc7-bootstrap
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -24,6 +24,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -108,6 +109,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -152,6 +154,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -253,10 +280,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -316,6 +342,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -717,7 +766,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-rx-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-s390x-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-sparc-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-sparc64-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -1,5 +1,5 @@
#
# spec file for package cross-x86_64-gcc7
# spec file
#
# Copyright (c) 2021 SUSE LLC
#
@ -23,6 +23,7 @@
#
# spec file for package gcc (Version 4.0.1)
#
# Copyright (c) 2005 SUSE Linux AG, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
@ -107,6 +108,7 @@ 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/+/-/')
%define binsuffix -7
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -151,6 +153,31 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
License: GPL-3.0-or-later
# Define the canonical target and host architecture
# %%gcc_target_arch is supposed to be the full target triple
@ -252,10 +279,9 @@ Conflicts: cross-%{cross_arch}-gcc7
#!BuildIgnore: gcc-PIE
BuildRequires: update-alternatives
Requires(post): update-alternatives
Requires(preun): update-alternatives
Requires(preun):update-alternatives
Summary: The GNU Compiler Collection targeting %{cross_arch}
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
%description
The GNU Compiler Collection as a cross-compiler targeting %{cross_arch}.
@ -315,6 +341,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -716,7 +765,7 @@ install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-g++%{binsuffix} \
install -s $RPM_BUILD_ROOT/%{_prefix}/bin/%{gcc_target_arch}-gcc%{binsuffix} \
$RPM_BUILD_ROOT/env/usr/bin/gcc
for back in cc1 cc1plus; do
for back in cc1 cc1plus; do
install -s -D $RPM_BUILD_ROOT/%{targetlibsubdir}/$back \
$RPM_BUILD_ROOT/env%{targetlibsubdir}/$back
done

View File

@ -336,7 +336,29 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
# GCC-TESTSUITE-DELETE-BEGIN
License: GPL-3.0+
@ -1110,6 +1132,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end

View File

@ -0,0 +1,555 @@
From 85097564fe9d43fd12663eccca92d40c8f240d63 Mon Sep 17 00:00:00 2001
From: Torsten Duwe <duwe@suse.de>
Date: Tue, 25 Jul 2017 14:16:10 +0000
Subject: [PATCH 01/23] Backport "Add entry for "patchable_function_entry".
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2017-07-07 Torsten Duwe <duwe@suse.de>
c-family/
* c-attribs.c (c_common_attribute_table): Add entry for
"patchable_function_entry".
lto/
* lto-lang.c (lto_attribute_table): Add entry for
"patchable_function_entry".
* common.opt: Introduce -fpatchable-function-entry
command line option, and its variables function_entry_patch_area_size
and function_entry_patch_area_start.
* opts.c (common_handle_option): Add -fpatchable_function_entry_ case,
including a two-value parser.
* target.def (print_patchable_function_entry): New target hook.
* targhooks.h (default_print_patchable_function_entry): New function.
* targhooks.c (default_print_patchable_function_entry): Likewise.
* toplev.c (process_options): Switch off IPA-RA if
patchable function entries are being generated.
* varasm.c (assemble_start_function): Look at the
patchable-function-entry command line switch and current
function attributes and maybe generate NOP instructions by
calling the print_patchable_function_entry hook.
* doc/extend.texi: Document patchable_function_entry attribute.
* doc/invoke.texi: Document -fpatchable_function_entry
command line option.
* doc/tm.texi.in (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
New target hook.
* doc/tm.texi: Re-generate.
* c-c++-common/patchable_function_entry-default.c: New test.
* c-c++-common/patchable_function_entry-decl.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
---
gcc/c-family/c-attribs.c | 12 +++++
gcc/common.opt | 11 +++++
gcc/doc/extend.texi | 21 +++++++++
gcc/doc/invoke.texi | 28 +++++++++++
gcc/doc/tm.texi | 9 ++++
gcc/doc/tm.texi.in | 2 +
gcc/lto/lto-lang.c | 12 +++++
gcc/opts.c | 27 +++++++++++
gcc/target.def | 11 +++++
gcc/targhooks.c | 46 +++++++++++++++++++
gcc/targhooks.h | 3 ++
.../patchable_function_entry-decl.c | 16 +++++++
.../patchable_function_entry-default.c | 16 +++++++
.../patchable_function_entry-definition.c | 16 +++++++
gcc/toplev.c | 4 +-
gcc/varasm.c | 46 +++++++++++++++++++
16 files changed, 279 insertions(+), 1 deletion(-)
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-default.c
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index 90b17bc00d2..b2820dd1586 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -139,6 +139,8 @@ static tree handle_bnd_variable_size_attribute (tree *, tree, tree, int, bool *)
static tree handle_bnd_legacy (tree *, tree, tree, int, bool *);
static tree handle_bnd_instrument (tree *, tree, tree, int, bool *);
static tree handle_fallthrough_attribute (tree *, tree, tree, int, bool *);
+static tree handle_patchable_function_entry_attribute (tree *, tree, tree,
+ int, bool *);
/* Table of machine-independent attributes common to all C-like languages.
@@ -345,6 +347,9 @@ const struct attribute_spec c_common_attribute_table[] =
handle_bnd_instrument, false },
{ "fallthrough", 0, 0, false, false, false,
handle_fallthrough_attribute, false },
+ { "patchable_function_entry", 1, 2, true, false, false,
+ handle_patchable_function_entry_attribute,
+ false },
{ NULL, 0, 0, false, false, false, NULL, false }
};
@@ -3178,3 +3183,10 @@ handle_fallthrough_attribute (tree *, tree name, tree, int,
*no_add_attrs = true;
return NULL_TREE;
}
+
+static tree
+handle_patchable_function_entry_attribute (tree *, tree, tree, int, bool *)
+{
+ /* Nothing to be done here. */
+ return NULL_TREE;
+}
diff --git a/gcc/common.opt b/gcc/common.opt
index 437db8e8615..ca1613b6808 100644
--- a/gcc/common.opt
+++ b/gcc/common.opt
@@ -163,6 +163,13 @@ bool flag_stack_usage_info = false
Variable
int flag_debug_asm
+; How many NOP insns to place at each function entry by default
+Variable
+HOST_WIDE_INT function_entry_patch_area_size
+
+; And how far the real asm entry point is into this area
+Variable
+HOST_WIDE_INT function_entry_patch_area_start
; Balance between GNAT encodings and standard DWARF to emit.
Variable
@@ -2022,6 +2029,10 @@ fprofile-reorder-functions
Common Report Var(flag_profile_reorder_functions)
Enable function reordering that improves code placement.
+fpatchable-function-entry=
+Common Joined Optimization
+Insert NOP instructions at each function entry.
+
frandom-seed
Common Var(common_deferred_options) Defer
diff --git a/gcc/doc/extend.texi b/gcc/doc/extend.texi
index 1ef46799907..6860a391f62 100644
--- a/gcc/doc/extend.texi
+++ b/gcc/doc/extend.texi
@@ -3083,6 +3083,27 @@ that affect more than one function.
This attribute should be used for debugging purposes only. It is not
suitable in production code.
+@item patchable_function_entry
+@cindex @code{patchable_function_entry} function attribute
+@cindex extra NOP instructions at the function entry point
+In case the target's text segment can be made writable at run time by
+any means, padding the function entry with a number of NOPs can be
+used to provide a universal tool for instrumentation.
+
+The @code{patchable_function_entry} function attribute can be used to
+change the number of NOPs to any desired value. The two-value syntax
+is the same as for the command-line switch
+@option{-fpatchable-function-entry=N,M}, generating @var{N} NOPs, with
+the function entry point before the @var{M}th NOP instruction.
+@var{M} defaults to 0 if omitted e.g. function entry point is before
+the first NOP.
+
+If patchable function entries are enabled globally using the command-line
+option @option{-fpatchable-function-entry=N,M}, then you must disable
+instrumentation on all functions that are part of the instrumentation
+framework with the attribute @code{patchable_function_entry (0)}
+to prevent recursion.
+
@item pure
@cindex @code{pure} function attribute
@cindex functions that have no side effects
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index 8f279e454b0..ad71be54e07 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11417,6 +11417,34 @@ of the function name, it is considered to be a match. For C99 and C++
extended identifiers, the function name must be given in UTF-8, not
using universal character names.
+@item -fpatchable-function-entry=@var{N}[,@var{M}]
+@opindex fpatchable-function-entry
+Generate @var{N} NOPs right at the beginning
+of each function, with the function entry point before the @var{M}th NOP.
+If @var{M} is omitted, it defaults to @code{0} so the
+function entry points to the address just at the first NOP.
+The NOP instructions reserve extra space which can be used to patch in
+any desired instrumentation at run time, provided that the code segment
+is writable. The amount of space is controllable indirectly via
+the number of NOPs; the NOP instruction used corresponds to the instruction
+emitted by the internal GCC back-end interface @code{gen_nop}. This behavior
+is target-specific and may also depend on the architecture variant and/or
+other compilation options.
+
+For run-time identification, the starting addresses of these areas,
+which correspond to their respective function entries minus @var{M},
+are additionally collected in the @code{__patchable_function_entries}
+section of the resulting binary.
+
+Note that the value of @code{__attribute__ ((patchable_function_entry
+(N,M)))} takes precedence over command-line option
+@option{-fpatchable-function-entry=N,M}. This can be used to increase
+the area size or to remove it completely on a single function.
+If @code{N=0}, no pad location is recorded.
+
+The NOP instructions are inserted at---and maybe before, depending on
+@var{M}---the function entry address, even before the prologue.
+
@end table
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index 1bb5a9d9579..b4456f7cd40 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -4566,6 +4566,15 @@ will select the smallest suitable mode.
This section describes the macros that output function entry
(@dfn{prologue}) and exit (@dfn{epilogue}) code.
+@deftypefn {Target Hook} void TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY (FILE *@var{file}, unsigned HOST_WIDE_INT @var{patch_area_size}, bool @var{record_p})
+Generate a patchable area at the function start, consisting of
+@var{patch_area_size} NOP instructions. If the target supports named
+sections and if @var{record_p} is true, insert a pointer to the current
+location in the table of patchable functions. The default implementation
+of the hook places the table of pointers in the special section named
+@code{__patchable_function_entries}.
+@end deftypefn
+
@deftypefn {Target Hook} void TARGET_ASM_FUNCTION_PROLOGUE (FILE *@var{file}, HOST_WIDE_INT @var{size})
If defined, a function that outputs the assembler code for entry to a
function. The prologue is responsible for setting up the stack frame,
diff --git a/gcc/doc/tm.texi.in b/gcc/doc/tm.texi.in
index d4047142027..b188c94ae5e 100644
--- a/gcc/doc/tm.texi.in
+++ b/gcc/doc/tm.texi.in
@@ -3650,6 +3650,8 @@ will select the smallest suitable mode.
This section describes the macros that output function entry
(@dfn{prologue}) and exit (@dfn{epilogue}) code.
+@hook TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY
+
@hook TARGET_ASM_FUNCTION_PROLOGUE
@hook TARGET_ASM_FUNCTION_END_PROLOGUE
diff --git a/gcc/lto/lto-lang.c b/gcc/lto/lto-lang.c
index fdd6ae08a1c..530d9dc31d0 100644
--- a/gcc/lto/lto-lang.c
+++ b/gcc/lto/lto-lang.c
@@ -48,6 +48,8 @@ static tree handle_sentinel_attribute (tree *, tree, tree, int, bool *);
static tree handle_type_generic_attribute (tree *, tree, tree, int, bool *);
static tree handle_transaction_pure_attribute (tree *, tree, tree, int, bool *);
static tree handle_returns_twice_attribute (tree *, tree, tree, int, bool *);
+static tree handle_patchable_function_entry_attribute (tree *, tree, tree,
+ int, bool *);
static tree ignore_attribute (tree *, tree, tree, int, bool *);
static tree handle_format_attribute (tree *, tree, tree, int, bool *);
@@ -76,6 +78,9 @@ const struct attribute_spec lto_attribute_table[] =
handle_nonnull_attribute, false },
{ "nothrow", 0, 0, true, false, false,
handle_nothrow_attribute, false },
+ { "patchable_function_entry", 1, 2, true, false, false,
+ handle_patchable_function_entry_attribute,
+ false },
{ "returns_twice", 0, 0, true, false, false,
handle_returns_twice_attribute, false },
{ "sentinel", 0, 1, false, true, true,
@@ -473,6 +478,13 @@ handle_returns_twice_attribute (tree *node, tree ARG_UNUSED (name),
return NULL_TREE;
}
+static tree
+handle_patchable_function_entry_attribute (tree *, tree, tree, int, bool *)
+{
+ /* Nothing to be done here. */
+ return NULL_TREE;
+}
+
/* Ignore the given attribute. Used when this attribute may be usefully
overridden by the target, but is not used generically. */
diff --git a/gcc/opts.c b/gcc/opts.c
index b98a0ca73a8..d0430e777ee 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2201,6 +2201,33 @@ common_handle_option (struct gcc_options *opts,
opts->x_flag_ipa_reference = false;
break;
+ case OPT_fpatchable_function_entry_:
+ {
+ char *patch_area_arg = xstrdup (arg);
+ char *comma = strchr (patch_area_arg, ',');
+ if (comma)
+ {
+ *comma = '\0';
+ function_entry_patch_area_size =
+ integral_argument (patch_area_arg);
+ function_entry_patch_area_start =
+ integral_argument (comma + 1);
+ }
+ else
+ {
+ function_entry_patch_area_size =
+ integral_argument (patch_area_arg);
+ function_entry_patch_area_start = 0;
+ }
+ if (function_entry_patch_area_size < 0
+ || function_entry_patch_area_start < 0
+ || function_entry_patch_area_size
+ < function_entry_patch_area_start)
+ error ("invalid arguments for %<-fpatchable_function_entry%>");
+ free (patch_area_arg);
+ }
+ break;
+
case OPT_ftree_vectorize:
if (!opts_set->x_flag_tree_loop_vectorize)
opts->x_flag_tree_loop_vectorize = value;
diff --git a/gcc/target.def b/gcc/target.def
index 6bebfd5b9d6..bea79404836 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -288,6 +288,17 @@ hidden, protected or internal visibility as specified by @var{visibility}.",
void, (tree decl, int visibility),
default_assemble_visibility)
+DEFHOOK
+(print_patchable_function_entry,
+ "Generate a patchable area at the function start, consisting of\n\
+@var{patch_area_size} NOP instructions. If the target supports named\n\
+sections and if @var{record_p} is true, insert a pointer to the current\n\
+location in the table of patchable functions. The default implementation\n\
+of the hook places the table of pointers in the special section named\n\
+@code{__patchable_function_entries}.",
+ void, (FILE *file, unsigned HOST_WIDE_INT patch_area_size, bool record_p),
+ default_print_patchable_function_entry)
+
/* Output the assembler code for entry to a function. */
DEFHOOK
(function_prologue,
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 1cdec068ed8..77ca69105d0 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -72,6 +72,7 @@ along with GCC; see the file COPYING3. If not see
#include "calls.h"
#include "expr.h"
#include "output.h"
+#include "common/common-target.h"
#include "reload.h"
#include "intl.h"
#include "opts.h"
@@ -1609,6 +1610,51 @@ default_compare_by_pieces_branch_ratio (machine_mode)
return 1;
}
+/* Write PATCH_AREA_SIZE NOPs into the asm outfile FILE around a function
+ entry. If RECORD_P is true and the target supports named sections,
+ the location of the NOPs will be recorded in a special object section
+ called "__patchable_function_entries". This routine may be called
+ twice per function to put NOPs before and after the function
+ entry. */
+
+void
+default_print_patchable_function_entry (FILE *file,
+ unsigned HOST_WIDE_INT patch_area_size,
+ bool record_p)
+{
+ const char *nop_templ = 0;
+ int code_num;
+ rtx_insn *my_nop = make_insn_raw (gen_nop ());
+
+ /* We use the template alone, relying on the (currently sane) assumption
+ that the NOP template does not have variable operands. */
+ code_num = recog_memoized (my_nop);
+ nop_templ = get_insn_template (code_num, my_nop);
+
+ if (record_p && targetm_common.have_named_sections)
+ {
+ char buf[256];
+ static int patch_area_number;
+ section *previous_section = in_section;
+
+ patch_area_number++;
+ ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
+
+ switch_to_section (get_section ("__patchable_function_entries",
+ 0, NULL));
+ fputs (integer_asm_op (POINTER_SIZE_UNITS, false), file);
+ assemble_name_raw (file, buf);
+ fputc ('\n', file);
+
+ switch_to_section (previous_section);
+ ASM_OUTPUT_LABEL (file, buf);
+ }
+
+ unsigned i;
+ for (i = 0; i < patch_area_size; ++i)
+ fprintf (file, "\t%s\n", nop_templ);
+}
+
bool
default_profile_before_prologue (void)
{
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 18070df7839..6206fe20823 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -203,6 +203,9 @@ extern bool default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT,
bool);
extern int default_compare_by_pieces_branch_ratio (machine_mode);
+extern void default_print_patchable_function_entry (FILE *,
+ unsigned HOST_WIDE_INT,
+ bool);
extern bool default_profile_before_prologue (void);
extern reg_class_t default_preferred_reload_class (rtx, reg_class_t);
extern reg_class_t default_preferred_output_reload_class (rtx, reg_class_t);
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
new file mode 100644
index 00000000000..8514b10e820
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-final { scan-assembler-times "nop" 2 } } */
+
+extern int a;
+
+/* Respect overriding attributes in the declaration. */
+int f3 (void) __attribute__((patchable_function_entry(2)));
+
+/* F3 should now get 2 NOPs. */
+int
+__attribute__((noinline))
+f3 (void)
+{
+ return 5*a;
+}
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
new file mode 100644
index 00000000000..0dcf1181dde
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-final { scan-assembler-times "nop" 3 } } */
+
+extern int a;
+
+/* Nothing declared must not mean anything. */
+int f3 (void);
+
+/* F3 should get a default-sized NOP area. */
+int
+__attribute__((noinline))
+f3 (void)
+{
+ return 5*a;
+}
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
new file mode 100644
index 00000000000..a007867dcb0
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -0,0 +1,16 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-final { scan-assembler-times "nop" 1 } } */
+
+extern int a;
+
+int f3 (void);
+
+/* F3 should now get 1 NOP. */
+int
+__attribute__((noinline))
+__attribute__((patchable_function_entry(1)))
+f3 (void)
+{
+ return 5*a;
+}
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 6f0bc9fe736..7d3aa280f15 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -1612,8 +1612,10 @@ process_options (void)
}
/* Do not use IPA optimizations for register allocation if profiler is active
+ or patchable function entries are inserted for run-time instrumentation
or port does not emit prologue and epilogue as RTL. */
- if (profile_flag || !targetm.have_prologue () || !targetm.have_epilogue ())
+ if (profile_flag || function_entry_patch_area_size
+ || !targetm.have_prologue () || !targetm.have_epilogue ())
flag_ipa_ra = 0;
/* Enable -Werror=coverage-mismatch when -Werror and -Wno-error
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 1b9030029ac..6e9a8c3133e 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1829,6 +1829,46 @@ assemble_start_function (tree decl, const char *fnname)
if (DECL_PRESERVE_P (decl))
targetm.asm_out.mark_decl_preserved (fnname);
+ unsigned HOST_WIDE_INT patch_area_size = function_entry_patch_area_size;
+ unsigned HOST_WIDE_INT patch_area_entry = function_entry_patch_area_start;
+
+ tree patchable_function_entry_attr
+ = lookup_attribute ("patchable_function_entry", DECL_ATTRIBUTES (decl));
+ if (patchable_function_entry_attr)
+ {
+ tree pp_val = TREE_VALUE (patchable_function_entry_attr);
+ tree patchable_function_entry_value1 = TREE_VALUE (pp_val);
+
+ if (tree_fits_uhwi_p (patchable_function_entry_value1))
+ patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
+ else
+ gcc_unreachable ();
+
+ patch_area_entry = 0;
+ if (list_length (pp_val) > 1)
+ {
+ tree patchable_function_entry_value2 =
+ TREE_VALUE (TREE_CHAIN (pp_val));
+
+ if (tree_fits_uhwi_p (patchable_function_entry_value2))
+ patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
+ else
+ gcc_unreachable ();
+ }
+ }
+
+ if (patch_area_entry > patch_area_size)
+ {
+ if (patch_area_size > 0)
+ warning (OPT_Wattributes, "Patchable function entry > size");
+ patch_area_entry = 0;
+ }
+
+ /* Emit the patching area before the entry label, if any. */
+ if (patch_area_entry > 0)
+ targetm.asm_out.print_patchable_function_entry (asm_out_file,
+ patch_area_entry, true);
+
/* Do any machine/system dependent processing of the function name. */
#ifdef ASM_DECLARE_FUNCTION_NAME
ASM_DECLARE_FUNCTION_NAME (asm_out_file, fnname, current_function_decl);
@@ -1837,6 +1877,12 @@ assemble_start_function (tree decl, const char *fnname)
ASM_OUTPUT_FUNCTION_LABEL (asm_out_file, fnname, current_function_decl);
#endif /* ASM_DECLARE_FUNCTION_NAME */
+ /* And the area after the label. Record it if we haven't done so yet. */
+ if (patch_area_size > patch_area_entry)
+ targetm.asm_out.print_patchable_function_entry (asm_out_file,
+ patch_area_size-patch_area_entry,
+ patch_area_entry == 0);
+
if (lookup_attribute ("no_split_stack", DECL_ATTRIBUTES (decl)))
saw_no_split_stack = true;
}
--
2.33.1

View File

@ -0,0 +1,53 @@
From fea502d4bb7a673e932d331dbf5b01b881e6c58e Mon Sep 17 00:00:00 2001
From: Tom de Vries <tom@codesourcery.com>
Date: Thu, 3 Aug 2017 07:07:38 +0000
Subject: [PATCH 02/23] Backport Skip fpatchable-function-entry tests for nvptx
gcc/testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
2017-08-03 Tom de Vries <tom@codesourcery.com>
PR target/81662
* c-c++-common/patchable_function_entry-decl.c: Skip for nvptx.
* c-c++-common/patchable_function_entry-default.c: Same.
* c-c++-common/patchable_function_entry-definition.c: Same.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 2 +-
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 2 +-
.../c-c++-common/patchable_function_entry-definition.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 8514b10e820..5c39a354559 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 2 } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 0dcf1181dde..48094f75f78 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 3 } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index a007867dcb0..af8202f283b 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,4 +1,4 @@
-/* { dg-do compile } */
+/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-final { scan-assembler-times "nop" 1 } } */
--
2.33.1

View File

@ -0,0 +1,61 @@
From c91e59d9039cc5074d318f2785b66d28a9fdc2c0 Mon Sep 17 00:00:00 2001
From: Tom de Vries <tom@codesourcery.com>
Date: Thu, 3 Aug 2017 11:18:09 +0000
Subject: [PATCH 03/23] Backport Error out on nvptx for
fpatchable-function-entry
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2017-08-03 Tom de Vries <tom@codesourcery.com>
PR target/81662
* config/nvptx/nvptx.c (nvptx_option_override): Emit sorry if
function_entry_patch_area_size > 0.
* gcc.target/nvptx/patchable_function_entry-default.c: New test.
---
gcc/config/nvptx/nvptx.c | 4 ++++
.../nvptx/patchable_function_entry-default.c | 15 +++++++++++++++
2 files changed, 19 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
diff --git a/gcc/config/nvptx/nvptx.c b/gcc/config/nvptx/nvptx.c
index 74bce3ec8d0..b0470836fb8 100644
--- a/gcc/config/nvptx/nvptx.c
+++ b/gcc/config/nvptx/nvptx.c
@@ -178,6 +178,10 @@ nvptx_option_override (void)
if (!global_options_set.x_flag_no_common)
flag_no_common = 1;
+ /* The patch area requires nops, which we don't have. */
+ if (function_entry_patch_area_size > 0)
+ sorry ("not generating patch area, nops not supported");
+
/* Assumes that it will see only hard registers. */
flag_var_tracking = 0;
diff --git a/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
new file mode 100644
index 00000000000..42544562725
--- /dev/null
+++ b/gcc/testsuite/gcc.target/nvptx/patchable_function_entry-default.c
@@ -0,0 +1,15 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+
+extern int a;
+
+int f3 (void);
+
+int
+__attribute__((noinline))
+f3 (void)
+{
+ return 5*a;
+}
+
+/* { dg-excess-errors "sorry, unimplemented: not generating patch area, nops not supported" } */
--
2.33.1

View File

@ -0,0 +1,63 @@
From 3072665d32365db1b16544966a7220f51c82a0b6 Mon Sep 17 00:00:00 2001
From: Uros Bizjak <ubizjak@gmail.com>
Date: Wed, 16 Aug 2017 20:44:28 +0200
Subject: [PATCH 04/23] Backport Adapt scan-assembler-times for alpha*-*-*
testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2017-08-16 Uros Bizjak <ubizjak@gmail.com>
* c-c++-common/patchable_function_entry-decl.c (dg-final): Adapt
scan-assembler-times for alpha*-*-*.
* c-c++-common/patchable_function_entry-default.c (dg-final): Ditto.
* c-c++-common/patchable_function_entry-definition.c (dg-final): Ditto.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 3 ++-
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 3 ++-
.../c-c++-common/patchable_function_entry-definition.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 5c39a354559..fb61ac31795 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 2 } } */
+/* { dg-final { scan-assembler-times "nop" 2 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 48094f75f78..c18f9e6bd39 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 3 } } */
+/* { dg-final { scan-assembler-times "nop" 3 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index af8202f283b..54a57ba7226 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,6 +1,7 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 1 } } */
+/* { dg-final { scan-assembler-times "nop" 1 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
extern int a;
--
2.33.1

View File

@ -0,0 +1,66 @@
From f343a015dda8bcaac108e734c501bad29b5c1012 Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Tue, 16 Jan 2018 21:21:29 +0000
Subject: [PATCH 05/23] Backport patchable_function_entry-decl.c: Use 3 NOPs on
Visium.
testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2018-01-16 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/patchable_function_entry-decl.c: Use 3 NOPs on Visium.
* c-c++-common/patchable_function_entry-default.c: 4 NOPs on Visium.
* c-c++-common/patchable_function_entry-definition.c: 2 NOPs on Visium.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 3 ++-
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 3 ++-
.../c-c++-common/patchable_function_entry-definition.c | 3 ++-
3 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index fb61ac31795..32e2c06eae3 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,7 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 2 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "nop" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop" 3 { target visium-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index c18f9e6bd39..be88e431e30 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,7 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 3 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "nop" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop" 4 { target visium-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index 54a57ba7226..af18dbcd5e6 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,7 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 1 { target { ! alpha*-*-* } } } } */
+/* { dg-final { scan-assembler-times "nop" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
+/* { dg-final { scan-assembler-times "nop" 2 { target visium-*-* } } } */
extern int a;
--
2.33.1

View File

@ -0,0 +1,387 @@
From cf1c4490c9b229ba3ff2aef4f8fc75cb08622726 Mon Sep 17 00:00:00 2001
From: Andreas Krebbel <krebbel@linux.vnet.ibm.com>
Date: Fri, 6 Apr 2018 07:45:42 +0000
Subject: [PATCH 06/23] Backport IBM Z: Use the dedicated NOP instructions for
"nop"
We still use lr r0,r0 as a NOP instruction although we have some kind
of dedicated NOP instruction (nopr) which maps to a "branch never".
As a side-effect this fixes testcases scanning for NOPs
e.g. patchable_function_entry-*.
As another side-effect this makes it difficult to distingiush NOPs
generated for hotpatching from NOPs added when using -O0 to attach
location information to it. Hence I had to make sure that the hotpatch
testcases get skipped when compiling without optimization.
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
gcc/ChangeLog:
2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* config/s390/s390.c (s390_z10_optimize_cmp): Expand dedicated NOP
instructions.
* config/s390/s390.md (UNSPECV_NOP_LR_0, UNSPECV_NOP_LR_1): New
constant definitions.
("nop"): lr 0,0 -> nopr r0
("nop_lr0", "nop_lr1"): New insn definitions.
gcc/testsuite/ChangeLog:
2018-04-06 Andreas Krebbel <krebbel@linux.vnet.ibm.com>
* gcc.target/s390/s390.exp: Remove -O0 from list of torture
options.
* gcc.target/s390/hotpatch-1.c: Skip when building without
optimization.
* gcc.target/s390/hotpatch-10.c: Likewise.
* gcc.target/s390/hotpatch-11.c: Likewise.
* gcc.target/s390/hotpatch-12.c: Likewise.
* gcc.target/s390/hotpatch-13.c: Likewise.
* gcc.target/s390/hotpatch-14.c: Likewise.
* gcc.target/s390/hotpatch-15.c: Likewise.
* gcc.target/s390/hotpatch-16.c: Likewise.
* gcc.target/s390/hotpatch-17.c: Likewise.
* gcc.target/s390/hotpatch-18.c: Likewise.
* gcc.target/s390/hotpatch-19.c: Likewise.
* gcc.target/s390/hotpatch-2.c: Likewise.
* gcc.target/s390/hotpatch-3.c: Likewise.
* gcc.target/s390/hotpatch-4.c: Likewise.
* gcc.target/s390/hotpatch-5.c: Likewise.
* gcc.target/s390/hotpatch-6.c: Likewise.
* gcc.target/s390/hotpatch-7.c: Likewise.
* gcc.target/s390/hotpatch-8.c: Likewise.
* gcc.target/s390/hotpatch-9.c: Likewise.
---
gcc/config/s390/s390.c | 4 ++--
gcc/config/s390/s390.md | 17 +++++++++++++++--
gcc/testsuite/gcc.target/s390/hotpatch-1.c | 7 +++++++
gcc/testsuite/gcc.target/s390/hotpatch-10.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-11.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-12.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-13.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-14.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-15.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-16.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-17.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-18.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-19.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-2.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-3.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-4.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-5.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-6.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-7.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-8.c | 1 +
gcc/testsuite/gcc.target/s390/hotpatch-9.c | 1 +
gcc/testsuite/gcc.target/s390/s390.exp | 2 +-
22 files changed, 43 insertions(+), 5 deletions(-)
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 0161ba03ff3..b1db263d37c 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -13966,9 +13966,9 @@ s390_z10_optimize_cmp (rtx_insn *insn)
&& s390_non_addr_reg_read_p (*op0, prev_insn))
{
if (REGNO (*op1) == 0)
- emit_insn_after (gen_nop1 (), insn);
+ emit_insn_after (gen_nop_lr1 (), insn);
else
- emit_insn_after (gen_nop (), insn);
+ emit_insn_after (gen_nop_lr0 (), insn);
insn_added_p = true;
}
else
diff --git a/gcc/config/s390/s390.md b/gcc/config/s390/s390.md
index bb399354855..e134d7f2972 100644
--- a/gcc/config/s390/s390.md
+++ b/gcc/config/s390/s390.md
@@ -267,6 +267,10 @@
UNSPECV_CAS
UNSPECV_ATOMIC_OP
+ ; Non-branch nops used for compare-and-branch adjustments on z10
+ UNSPECV_NOP_LR_0
+ UNSPECV_NOP_LR_1
+
; Hotpatching (unremovable NOPs)
UNSPECV_NOP_2_BYTE
UNSPECV_NOP_4_BYTE
@@ -11006,12 +11010,21 @@
(define_insn "nop"
[(const_int 0)]
""
+ "nopr\t%%r0"
+ [(set_attr "op_type" "RR")])
+
+; non-branch NOPs required for optimizing compare-and-branch patterns
+; on z10
+
+(define_insn "nop_lr0"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_LR_0)]
+ ""
"lr\t0,0"
[(set_attr "op_type" "RR")
(set_attr "z10prop" "z10_fr_E1")])
-(define_insn "nop1"
- [(const_int 1)]
+(define_insn "nop_lr1"
+ [(unspec_volatile [(const_int 0)] UNSPECV_NOP_LR_1)]
""
"lr\t1,1"
[(set_attr "op_type" "RR")])
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-1.c b/gcc/testsuite/gcc.target/s390/hotpatch-1.c
index 5f0f2e19349..67e101ee318 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-1.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-1.c
@@ -3,6 +3,13 @@
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* Without optimization extra NOPs will be added just to attach
+ location info to it. Don't run the test in that case. The torture
+ framework always appears to run the testcase without -O option
+ first. */
+
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
+
#include <stdio.h>
void hp1(void)
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-10.c b/gcc/testsuite/gcc.target/s390/hotpatch-10.c
index 2308d3331a0..21d499e6204 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-10.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-10.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-11.c b/gcc/testsuite/gcc.target/s390/hotpatch-11.c
index 56b3596d497..a37f3117c64 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-11.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-11.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-12.c b/gcc/testsuite/gcc.target/s390/hotpatch-12.c
index 8a91c1b8b06..cb8d1521bfa 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-12.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-12.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=999,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-13.c b/gcc/testsuite/gcc.target/s390/hotpatch-13.c
index 70fab74d18d..fb037c2040f 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-13.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-13.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-14.c b/gcc/testsuite/gcc.target/s390/hotpatch-14.c
index 389bf42aee8..fd0368a55ae 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-14.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-14.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-15.c b/gcc/testsuite/gcc.target/s390/hotpatch-15.c
index 0b10fb18b41..a1c3e7c694b 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-15.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-15.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-16.c b/gcc/testsuite/gcc.target/s390/hotpatch-16.c
index 2fcdf1ce765..737c3a1c071 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-16.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-16.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-17.c b/gcc/testsuite/gcc.target/s390/hotpatch-17.c
index 299f82505ee..6d8c40c65c0 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-17.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-17.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-18.c b/gcc/testsuite/gcc.target/s390/hotpatch-18.c
index fd44d118323..02807ff7b6e 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-18.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-18.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2 -mhotpatch=0,0" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-19.c b/gcc/testsuite/gcc.target/s390/hotpatch-19.c
index 899e000a71f..71c2ed13d18 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-19.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-19.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=1,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-2.c b/gcc/testsuite/gcc.target/s390/hotpatch-2.c
index 99fe9114f24..ece6cb37e57 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-2.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-2.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,1" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-3.c b/gcc/testsuite/gcc.target/s390/hotpatch-3.c
index 20f43c6b458..65ebe353688 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-3.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-3.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,2" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-4.c b/gcc/testsuite/gcc.target/s390/hotpatch-4.c
index 32a3c032d65..d0956f14240 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-4.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-4.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,3" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-5.c b/gcc/testsuite/gcc.target/s390/hotpatch-5.c
index 72ee5a30056..64d49eecb13 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-5.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-5.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,4" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-6.c b/gcc/testsuite/gcc.target/s390/hotpatch-6.c
index 1e1d0e6973a..e6753c8385d 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-6.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-6.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,5" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-7.c b/gcc/testsuite/gcc.target/s390/hotpatch-7.c
index 3f60e61e7e2..3f1c9f0e294 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-7.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-7.c
@@ -2,6 +2,7 @@
/* { dg-do compile } */
/* { dg-options "-mzarch -mhotpatch=0,6" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-8.c b/gcc/testsuite/gcc.target/s390/hotpatch-8.c
index 012a4ebd44d..a2fb83f2977 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-8.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-8.c
@@ -2,6 +2,7 @@
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,3" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/hotpatch-9.c b/gcc/testsuite/gcc.target/s390/hotpatch-9.c
index b7d557e43a2..34fae55d3ad 100644
--- a/gcc/testsuite/gcc.target/s390/hotpatch-9.c
+++ b/gcc/testsuite/gcc.target/s390/hotpatch-9.c
@@ -2,6 +2,7 @@
/* { dg-do compile { target { ! lp64 } } } */
/* { dg-options "-mesa -march=g5 -Wno-deprecated -mhotpatch=0,4" } */
+/* { dg-skip-if "" { *-*-* } { "*" } { "-O*" } } */
#include <stdio.h>
diff --git a/gcc/testsuite/gcc.target/s390/s390.exp b/gcc/testsuite/gcc.target/s390/s390.exp
index 420aff19a3f..8489a51693b 100644
--- a/gcc/testsuite/gcc.target/s390/s390.exp
+++ b/gcc/testsuite/gcc.target/s390/s390.exp
@@ -220,7 +220,7 @@ dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/md/*.{c,S,C}]] \
# Additional hotpatch torture tests.
torture-init
-set-torture-options [list -Os -O0 -O1 -O2 -O3]
+set-torture-options [list -Os -O1 -O2 -O3]
gcc-dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/hotpatch-\[0-9\]*.c]] \
"" $DEFAULT_CFLAGS
torture-finish
--
2.33.1

View File

@ -0,0 +1,60 @@
From 871d5df5a607632acb1ca971aad0dab6b6f1abf3 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Thu, 8 Nov 2018 16:31:27 +0000
Subject: [PATCH 07/23] Backport Add regex to search for uppercase "NOP"
instructions in assembler output.
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2018-11-08 Jozef Lawrynowicz <jozef.l@mittosystems.com>
* c-c++-common/patchable_function_entry-decl.c: Add regex to search for
uppercase "NOP" instructions in assembler output.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 2 +-
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 2 +-
.../c-c++-common/patchable_function_entry-definition.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 32e2c06eae3..3bfb7568bee 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
/* { dg-final { scan-assembler-times "nop" 3 { target visium-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index be88e431e30..bd7c6e98fc6 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
/* { dg-final { scan-assembler-times "nop" 4 { target visium-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index af18dbcd5e6..709113890ef 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,6 +1,6 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
/* { dg-final { scan-assembler-times "nop" 2 { target visium-*-* } } } */
--
2.33.1

View File

@ -0,0 +1,205 @@
From a672b0f4f3f9dcc59ffc563de98092b832fd2153 Mon Sep 17 00:00:00 2001
From: Jozef Lawrynowicz <jozef.l@mittosystems.com>
Date: Fri, 16 Nov 2018 23:53:30 +0000
Subject: [PATCH 08/23] Backport: ICE: segmentation fault with
patchable_function_entry attribute for msp430-elf -mlarge)
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2018-11-16 Jozef Lawrynowicz <jozef.l@mittosystems.com>
PR target/87927
* target-def.h: Initialize TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP.
Add them to the TARGET_ASM_{,UN}ALIGNED_INT_OP structs.
* target.def: Enumerate TARGET_ASM_{,UN}ALIGNED_P{S,D,T}I_OP in
the byte_op hook.
* target.h: Add psi, pdi, pti to struct asm_int_op definition.
* targhooks.c (default_print_patchable_function_entry): Assert
asm_int_op does not return a NULL string.
* varasm.c (integer_asm_op): Return the op for a partial int type
when the requested size does not correspond to an integer type.
* config/msp430/msp430.c: Initialize TARGET_ASM_{,UN}ALIGNED_PSI_OP.
* doc/tm.texi: Regenerate.
---
gcc/config/msp430/msp430.c | 5 +++++
gcc/doc/tm.texi | 6 ++++++
gcc/target-def.h | 15 +++++++++++++++
gcc/target.def | 6 ++++++
gcc/target.h | 3 +++
gcc/targhooks.c | 4 +++-
gcc/varasm.c | 14 ++++++++++++++
7 files changed, 52 insertions(+), 1 deletion(-)
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index c1f0d5b0026..3ad552d9e94 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -3391,6 +3391,11 @@ msp430_print_operand_raw (FILE * file, rtx op)
}
}
+#undef TARGET_ASM_ALIGNED_PSI_OP
+#define TARGET_ASM_ALIGNED_PSI_OP "\t.long\t"
+#undef TARGET_ASM_UNALIGNED_PSI_OP
+#define TARGET_ASM_UNALIGNED_PSI_OP TARGET_ASM_ALIGNED_PSI_OP
+
#undef TARGET_PRINT_OPERAND_ADDRESS
#define TARGET_PRINT_OPERAND_ADDRESS msp430_print_operand_addr
diff --git a/gcc/doc/tm.texi b/gcc/doc/tm.texi
index b4456f7cd40..cb9fabb4295 100644
--- a/gcc/doc/tm.texi
+++ b/gcc/doc/tm.texi
@@ -7798,12 +7798,18 @@ hook.
@deftypevr {Target Hook} {const char *} TARGET_ASM_BYTE_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PSI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PDI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PTI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PSI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PDI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PTI_OP
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP
These hooks specify assembly directives for creating certain kinds
of integer object. The @code{TARGET_ASM_BYTE_OP} directive creates a
diff --git a/gcc/target-def.h b/gcc/target-def.h
index c99bfaa0105..cbd9fe6b967 100644
--- a/gcc/target-def.h
+++ b/gcc/target-def.h
@@ -47,6 +47,15 @@
#define TARGET_ASM_UNALIGNED_TI_OP NULL
#endif /* OBJECT_FORMAT_ELF */
+/* There is no standard way to handle P{S,D,T}Imode, targets must implement them
+ if required. */
+#define TARGET_ASM_ALIGNED_PSI_OP NULL
+#define TARGET_ASM_UNALIGNED_PSI_OP NULL
+#define TARGET_ASM_ALIGNED_PDI_OP NULL
+#define TARGET_ASM_UNALIGNED_PDI_OP NULL
+#define TARGET_ASM_ALIGNED_PTI_OP NULL
+#define TARGET_ASM_UNALIGNED_PTI_OP NULL
+
#if !defined(TARGET_ASM_CONSTRUCTOR) && !defined(USE_COLLECT2)
# ifdef CTORS_SECTION_ASM_OP
# define TARGET_ASM_CONSTRUCTOR default_ctor_section_asm_out_constructor
@@ -89,14 +98,20 @@
#define TARGET_ASM_ALIGNED_INT_OP \
{TARGET_ASM_ALIGNED_HI_OP, \
+ TARGET_ASM_ALIGNED_PSI_OP, \
TARGET_ASM_ALIGNED_SI_OP, \
+ TARGET_ASM_ALIGNED_PDI_OP, \
TARGET_ASM_ALIGNED_DI_OP, \
+ TARGET_ASM_ALIGNED_PTI_OP, \
TARGET_ASM_ALIGNED_TI_OP}
#define TARGET_ASM_UNALIGNED_INT_OP \
{TARGET_ASM_UNALIGNED_HI_OP, \
+ TARGET_ASM_UNALIGNED_PSI_OP, \
TARGET_ASM_UNALIGNED_SI_OP, \
+ TARGET_ASM_UNALIGNED_PDI_OP, \
TARGET_ASM_UNALIGNED_DI_OP, \
+ TARGET_ASM_UNALIGNED_PTI_OP, \
TARGET_ASM_UNALIGNED_TI_OP}
#if !defined (TARGET_FUNCTION_INCOMING_ARG)
diff --git a/gcc/target.def b/gcc/target.def
index bea79404836..c50ed9445cd 100644
--- a/gcc/target.def
+++ b/gcc/target.def
@@ -45,12 +45,18 @@ DEFHOOKPODX (close_paren, const char *, ")")
DEFHOOKPOD
(byte_op,
"@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_HI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PSI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_SI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PDI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_DI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_PTI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_ALIGNED_TI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_HI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PSI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_SI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PDI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_DI_OP\n\
+@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_PTI_OP\n\
@deftypevrx {Target Hook} {const char *} TARGET_ASM_UNALIGNED_TI_OP\n\
These hooks specify assembly directives for creating certain kinds\n\
of integer object. The @code{TARGET_ASM_BYTE_OP} directive creates a\n\
diff --git a/gcc/target.h b/gcc/target.h
index 393de408b97..5f2b1d6d9cc 100644
--- a/gcc/target.h
+++ b/gcc/target.h
@@ -158,8 +158,11 @@ extern bool stmt_in_inner_loop_p (struct _stmt_vec_info *);
struct asm_int_op
{
const char *hi;
+ const char *psi;
const char *si;
+ const char *pdi;
const char *di;
+ const char *pti;
const char *ti;
};
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 77ca69105d0..c57967966c5 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1636,13 +1636,15 @@ default_print_patchable_function_entry (FILE *file,
char buf[256];
static int patch_area_number;
section *previous_section = in_section;
+ const char *asm_op = integer_asm_op (POINTER_SIZE_UNITS, false);
+ gcc_assert (asm_op != NULL);
patch_area_number++;
ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
switch_to_section (get_section ("__patchable_function_entries",
0, NULL));
- fputs (integer_asm_op (POINTER_SIZE_UNITS, false), file);
+ fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 6e9a8c3133e..5711ba69555 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -2713,10 +2713,24 @@ integer_asm_op (int size, int aligned_p)
return targetm.asm_out.byte_op;
case 2:
return ops->hi;
+ case 3:
+ return ops->psi;
case 4:
return ops->si;
+ case 5:
+ case 6:
+ case 7:
+ return ops->pdi;
case 8:
return ops->di;
+ case 9:
+ case 10:
+ case 11:
+ case 12:
+ case 13:
+ case 14:
+ case 15:
+ return ops->pti;
case 16:
return ops->ti;
default:
--
2.33.1

View File

@ -0,0 +1,70 @@
From 1577d60ca409e7323053d514d0b1ab15b3f1d9ef Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Mon, 10 Dec 2018 11:16:47 +0000
Subject: [PATCH 09/23] Backport patchable_function_entry-decl.c: Pass
-mcpu=gr6 for Visium and remove other specific handling.
gcc/testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2018-12-10 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/patchable_function_entry-decl.c: Pass -mcpu=gr6 for
Visium and remove other specific handling.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 4 ++--
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 4 ++--
.../c-c++-common/patchable_function_entry-definition.c | 4 ++--
3 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 3bfb7568bee..572297ca1f4 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,8 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
+/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
-/* { dg-final { scan-assembler-times "nop" 3 { target visium-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index bd7c6e98fc6..942ec14c8e5 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,8 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
+/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
-/* { dg-final { scan-assembler-times "nop" 4 { target visium-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index 709113890ef..e88b0eb15c1 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,8 +1,8 @@
/* { dg-do compile { target { ! nvptx*-*-* } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* visium-*-* } } } } } */
+/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
+/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
-/* { dg-final { scan-assembler-times "nop" 2 { target visium-*-* } } } */
extern int a;
--
2.33.1

View File

@ -0,0 +1,91 @@
From 36d145ee71885f89a3730c9208ceeaa87bf0f8e0 Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Fri, 15 Feb 2019 10:50:27 +0000
Subject: [PATCH 10/23] Backport patchable_function_entry-decl.c: Do not run on
Visium.
gcc/testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-02-15 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/patchable_function_entry-decl.c: Do not run on Visium.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
* gcc.dg/tree-ssa/pr84859.c: Add -ftree-cselim switch.
---
.../patchable_function_entry-decl.c | 3 +--
.../patchable_function_entry-default.c | 3 +--
.../patchable_function_entry-definition.c | 3 +--
gcc/testsuite/gcc.dg/tree-ssa/pr84859.c | 22 +++++++++++++++++++
4 files changed, 25 insertions(+), 6 deletions(-)
create mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr84859.c
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 572297ca1f4..1f8009b0faa 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,6 +1,5 @@
-/* { dg-do compile { target { ! nvptx*-*-* } } } */
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 942ec14c8e5..6b0318f0d66 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,6 +1,5 @@
-/* { dg-do compile { target { ! nvptx*-*-* } } } */
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index e88b0eb15c1..6667d3c558c 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,6 +1,5 @@
-/* { dg-do compile { target { ! nvptx*-*-* } } } */
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
-/* { dg-additional-options "-mcpu=gr6" { target visium-*-* } }
/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/pr84859.c b/gcc/testsuite/gcc.dg/tree-ssa/pr84859.c
new file mode 100644
index 00000000000..eebc9201ebd
--- /dev/null
+++ b/gcc/testsuite/gcc.dg/tree-ssa/pr84859.c
@@ -0,0 +1,22 @@
+/* { dg-do compile } */
+/* { dg-options "-O2 -ftree-cselim -Warray-bounds -fdump-tree-phiopt2" } */
+
+void
+h (const void *p, unsigned n)
+{
+ unsigned char a[8];
+ if (n > sizeof a)
+ return;
+
+ for (; n > 0; n -= *a)
+ {
+ if (n > 255)
+ *a = 255;
+ else
+ *a = n;
+
+ __builtin_memcpy (a, p, *a); /* { dg-bogus "bounds" } */
+ }
+}
+
+/* { dg-final { scan-tree-dump "MIN_EXPR" "phiopt2" } } */
--
2.33.1

View File

@ -0,0 +1,57 @@
From 155ab0dd14a8fe7633d0aa80b4d54e8772435fa8 Mon Sep 17 00:00:00 2001
From: Eric Botcazou <ebotcazou@adacore.com>
Date: Sat, 16 Feb 2019 14:40:53 +0000
Subject: [PATCH 11/23] Backport patchable_function_entry-decl.c: Add -fno-pie
on SPARC.
gcc/testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-02-16 Eric Botcazou <ebotcazou@adacore.com>
* c-c++-common/patchable_function_entry-decl.c: Add -fno-pie on SPARC.
* c-c++-common/patchable_function_entry-default.c: Likewise.
* c-c++-common/patchable_function_entry-definition.c: Likewise.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 1 +
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 1 +
gcc/testsuite/c-c++-common/patchable_function_entry-definition.c | 1 +
3 files changed, 3 insertions(+)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 1f8009b0faa..4f707b31f0d 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 6b0318f0d66..97d8a81fbc6 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index 6667d3c558c..ab94533ffec 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,5 +1,6 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
--
2.33.1

View File

@ -0,0 +1,153 @@
From 7ade9d11e42346161b5b7a74be7f3fa1d943c96b Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Fri, 12 Apr 2019 09:28:35 +0200
Subject: [PATCH 12/23] Backport PR c/89946 (ICE in assemble_start_function, at
varasm.c:1871)
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR c/89946
* varasm.c (assemble_start_function): Don't use tree_fits_uhwi_p
and gcc_unreachable if it fails, just call tree_to_uhwi which
verifies that too. Test TREE_CHAIN instead of list_length > 1.
Start warning message with a lower-case letter. Formatting fixes.
PR rtl-optimization/90026
* cfgcleanup.c (try_optimize_cfg): When removing empty bb with no
successors, look for BARRIERs inside of the whole BB_FOOTER chain
rather than just at the start of it. If e->src BB_FOOTER is not NULL
in cfglayout mode, use emit_barrier_after_bb.
gcc/c-family/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport of mainline
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR c/89946
* c-attribs.c (handle_patchable_function_entry_attribute): Add
function comment. Warn if arguments of the attribute are not positive
integer constants.
gcc/testsuite/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-04-12 Jakub Jelinek <jakub@redhat.com>
PR c/89946
* c-c++-common/pr89946.c: New test.
PR rtl-optimization/90026
* g++.dg/opt/pr90026.C: New test.
---
gcc/c-family/c-attribs.c | 23 +++++++++++++++++++++--
gcc/testsuite/c-c++-common/pr89946.c | 7 +++++++
gcc/varasm.c | 23 ++++++++---------------
3 files changed, 36 insertions(+), 17 deletions(-)
create mode 100644 gcc/testsuite/c-c++-common/pr89946.c
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index b2820dd1586..f0d2b1ed500 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -3184,9 +3184,28 @@ handle_fallthrough_attribute (tree *, tree name, tree, int,
return NULL_TREE;
}
+/* Handle a "patchable_function_entry" attributes; arguments as in
+ struct attribute_spec.handler. */
+
static tree
-handle_patchable_function_entry_attribute (tree *, tree, tree, int, bool *)
+handle_patchable_function_entry_attribute (tree *, tree name, tree args,
+ int, bool *no_add_attrs)
{
- /* Nothing to be done here. */
+ for (; args; args = TREE_CHAIN (args))
+ {
+ tree val = TREE_VALUE (args);
+ if (val && TREE_CODE (val) != IDENTIFIER_NODE
+ && TREE_CODE (val) != FUNCTION_DECL)
+ val = default_conversion (val);
+
+ if (!tree_fits_uhwi_p (val))
+ {
+ warning (OPT_Wattributes,
+ "%qE attribute argument %qE is not an integer constant",
+ name, val);
+ *no_add_attrs = true;
+ return NULL_TREE;
+ }
+ }
return NULL_TREE;
}
diff --git a/gcc/testsuite/c-c++-common/pr89946.c b/gcc/testsuite/c-c++-common/pr89946.c
new file mode 100644
index 00000000000..23acd63fc6a
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/pr89946.c
@@ -0,0 +1,7 @@
+/* PR c/89946 */
+
+__attribute__((patchable_function_entry (-1))) void foo (void) {} /* { dg-warning "'patchable_function_entry' attribute argument '-1' is not an integer constant" } */
+__attribute__((patchable_function_entry (5, -5))) void bar (void) {} /* { dg-warning "'patchable_function_entry' attribute argument '-5' is not an integer constant" } */
+int i, j;
+__attribute__((patchable_function_entry (i))) void baz (void) {} /* { dg-warning "'patchable_function_entry' attribute argument 'i' is not an integer constant" } */
+__attribute__((patchable_function_entry (2, j))) void qux (void) {} /* { dg-warning "'patchable_function_entry' attribute argument 'j' is not an integer constant" } */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 5711ba69555..0e6f20db361 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1839,28 +1839,20 @@ assemble_start_function (tree decl, const char *fnname)
tree pp_val = TREE_VALUE (patchable_function_entry_attr);
tree patchable_function_entry_value1 = TREE_VALUE (pp_val);
- if (tree_fits_uhwi_p (patchable_function_entry_value1))
- patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
- else
- gcc_unreachable ();
-
+ patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
patch_area_entry = 0;
- if (list_length (pp_val) > 1)
+ if (TREE_CHAIN (pp_val) != NULL_TREE)
{
- tree patchable_function_entry_value2 =
- TREE_VALUE (TREE_CHAIN (pp_val));
-
- if (tree_fits_uhwi_p (patchable_function_entry_value2))
- patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
- else
- gcc_unreachable ();
+ tree patchable_function_entry_value2
+ = TREE_VALUE (TREE_CHAIN (pp_val));
+ patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
}
}
if (patch_area_entry > patch_area_size)
{
if (patch_area_size > 0)
- warning (OPT_Wattributes, "Patchable function entry > size");
+ warning (OPT_Wattributes, "patchable function entry > size");
patch_area_entry = 0;
}
@@ -1880,7 +1872,8 @@ assemble_start_function (tree decl, const char *fnname)
/* And the area after the label. Record it if we haven't done so yet. */
if (patch_area_size > patch_area_entry)
targetm.asm_out.print_patchable_function_entry (asm_out_file,
- patch_area_size-patch_area_entry,
+ patch_area_size
+ - patch_area_entry,
patch_area_entry == 0);
if (lookup_attribute ("no_split_stack", DECL_ATTRIBUTES (decl)))
--
2.33.1

View File

@ -0,0 +1,36 @@
From 3c3203cb044be5bdaf794e592a5d2d456921cc6b Mon Sep 17 00:00:00 2001
From: Joao Moreira <jmoreira@suse.de>
Date: Wed, 17 Apr 2019 18:24:23 +0000
Subject: [PATCH 13/23] Backport targhooks.c
(default_print_patchable_function_entry): Emit __patchable_function_entries
section with writable flags to allow...
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2019-04-10 Joao Moreira <jmoreira@suse.de>
* targhooks.c (default_print_patchable_function_entry): Emit
__patchable_function_entries section with writable flags to allow
relocation resolution.
---
gcc/targhooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index c57967966c5..be0c557f1a2 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1643,7 +1643,7 @@ default_print_patchable_function_entry (FILE *file,
ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
switch_to_section (get_section ("__patchable_function_entries",
- 0, NULL));
+ SECTION_WRITE | SECTION_RELRO, NULL));
fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);
--
2.33.1

View File

@ -0,0 +1,34 @@
From f161f53b77fd86c8076fae78edad7a75f0d5bd28 Mon Sep 17 00:00:00 2001
From: Fangrui Song <maskray@google.com>
Date: Tue, 7 Jan 2020 20:46:26 -0800
Subject: [PATCH 14/23] Backport Align __patchable_function_entries to
POINTER_SIZE [PR93194]
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2020-01-20 Fangrui Song <maskray@google.com>
PR middle-end/93194
* targhooks.c (default_print_patchable_function_entry): Align to
POINTER_SIZE.
---
gcc/targhooks.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index be0c557f1a2..aaf536acf17 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1644,6 +1644,7 @@ default_print_patchable_function_entry (FILE *file,
switch_to_section (get_section ("__patchable_function_entries",
SECTION_WRITE | SECTION_RELRO, NULL));
+ assemble_align (POINTER_SIZE);
fputs (asm_op, file);
assemble_name_raw (file, buf);
fputc ('\n', file);
--
2.33.1

View File

@ -0,0 +1,43 @@
From ff909c0d15095d833e75b86743d218fc9d68869a Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@marvell.com>
Date: Sat, 18 Jan 2020 00:41:06 +0000
Subject: [PATCH 15/23] Backport Fix PR 93242: patchable-function-entry broken
on MIPS
On MIPS, .set noreorder/reorder needs to emitted around
the nop. The template for the nop instruction uses %(/%) to
do that. But default_print_patchable_function_entry uses
fprintf rather than output_asm_insn to output the instruction.
This fixes the problem by using output_asm_insn to emit the nop
instruction.
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2020-01-20 Andrew Pinski <apinski@marvell.com>
PR middle-end/93242
* targhooks.c (default_print_patchable_function_entry): use
output_asm_insn to emit the nop instruction.
---
gcc/targhooks.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index aaf536acf17..185dc7b0b6b 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1655,7 +1655,7 @@ default_print_patchable_function_entry (FILE *file,
unsigned i;
for (i = 0; i < patch_area_size; ++i)
- fprintf (file, "\t%s\n", nop_templ);
+ output_asm_insn (nop_templ, NULL);
}
bool
--
2.33.1

View File

@ -0,0 +1,314 @@
From 6d8714163cd0b94514ad8d1d98d17e99b00f3d2f Mon Sep 17 00:00:00 2001
From: Szabolcs Nagy <szabolcs.nagy@arm.com>
Date: Wed, 15 Jan 2020 12:23:40 +0000
Subject: [PATCH 16/23] Backport [AArch64] PR92424: Fix
-fpatchable-function-entry=N,M with BTI
This is a workaround that emits a BTI after the function label if that
is followed by a patch area. We try to remove the BTI that follows the
patch area (this may fail e.g. if the first instruction is a PACIASP).
So before this commit -fpatchable-function-entry=3,1 with bti generates
.section __patchable_function_entries
.8byte .LPFE
.text
.LPFE:
nop
foo:
nop
nop
bti c // or paciasp
...
and after this commit
.section __patchable_function_entries
.8byte .LPFE
.text
.LPFE:
nop
foo:
bti c
nop
nop
// may be paciasp
...
and with -fpatchable-function-entry=1 (M=0) the code now is
foo:
bti c
.section __patchable_function_entries
.8byte .LPFE
.text
.LPFE:
nop
// may be paciasp
...
There is a new bti insn in the middle of the patchable area users need
to be aware of unless M=0 (patch area is after the new bti) or M=N
(patch area is before the label, no new bti). Note: bti is not added to
all functions consistently (it can be turned off per function using a
target attribute or the compiler may detect that the function is never
called indirectly), so if bti is inserted in the middle of a patch area
then user code needs to deal with detecting it.
Tested on aarch64-none-linux-gnu.
gcc/ChangeLog:
PR target/92424
* config/aarch64/aarch64.c (aarch64_declare_function_name): Set
cfun->machine->label_is_assembled.
(aarch64_print_patchable_function_entry): New.
(TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY): Define.
* config/aarch64/aarch64.h (struct machine_function): New field,
label_is_assembled.
gcc/testsuite/ChangeLog:
PR target/92424
* gcc.target/aarch64/pr92424-1.c: New test.
* gcc.target/aarch64/pr92424-2.c: New test.
* gcc.target/aarch64/pr92424-3.c: New test.
---
gcc/config/aarch64/aarch64.c | 31 +++++
gcc/config/aarch64/aarch64.h | 1 +
gcc/testsuite/gcc.target/aarch64/pr92424-1.c | 122 +++++++++++++++++++
gcc/testsuite/gcc.target/aarch64/pr92424-2.c | 12 ++
gcc/testsuite/gcc.target/aarch64/pr92424-3.c | 12 ++
5 files changed, 178 insertions(+)
create mode 100644 gcc/testsuite/gcc.target/aarch64/pr92424-1.c
create mode 100644 gcc/testsuite/gcc.target/aarch64/pr92424-2.c
create mode 100644 gcc/testsuite/gcc.target/aarch64/pr92424-3.c
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 4e94be3b0b4..744b436a54d 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -11753,6 +11753,34 @@ aarch64_declare_function_name (FILE *stream, const char* name,
/* Don't forget the type directive for ELF. */
ASM_OUTPUT_TYPE_DIRECTIVE (stream, name, "function");
ASM_OUTPUT_LABEL (stream, name);
+
+ cfun->machine->label_is_assembled = true;
+}
+
+/* Implement PRINT_PATCHABLE_FUNCTION_ENTRY. Check if the patch area is after
+ the function label and emit a BTI if necessary. */
+
+void
+aarch64_print_patchable_function_entry (FILE *file,
+ unsigned HOST_WIDE_INT patch_area_size,
+ bool record_p)
+{
+ if (cfun->machine->label_is_assembled
+ && aarch64_bti_enabled ()
+ && !cgraph_node::get (cfun->decl)->only_called_directly_p ())
+ {
+ /* Remove the BTI that follows the patch area and insert a new BTI
+ before the patch area right after the function label. */
+ rtx_insn *insn = next_real_nondebug_insn (get_insns ());
+ if (insn
+ && INSN_P (insn)
+ && GET_CODE (PATTERN (insn)) == UNSPEC_VOLATILE
+ && XINT (PATTERN (insn), 1) == UNSPECV_BTI_C)
+ delete_insn (insn);
+ asm_fprintf (file, "\thint\t34 // bti c\n");
+ }
+
+ default_print_patchable_function_entry (file, patch_area_size, record_p);
}
/* Implements TARGET_ASM_FILE_START. Output the assembly header. */
@@ -14779,6 +14807,9 @@ aarch64_run_selftests (void)
#undef TARGET_ASM_TRAMPOLINE_TEMPLATE
#define TARGET_ASM_TRAMPOLINE_TEMPLATE aarch64_asm_trampoline_template
+#undef TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY
+#define TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY aarch64_print_patchable_function_entry
+
#undef TARGET_BUILD_BUILTIN_VA_LIST
#define TARGET_BUILD_BUILTIN_VA_LIST aarch64_build_builtin_va_list
diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h
index ddf833ebfe8..8cac2da1070 100644
--- a/gcc/config/aarch64/aarch64.h
+++ b/gcc/config/aarch64/aarch64.h
@@ -601,6 +601,7 @@ typedef struct GTY (()) machine_function
bool reg_is_wrapped_separately[LAST_SAVED_REGNUM];
/* One entry for each general purpose register. */
rtx call_via[SP_REGNUM];
+ bool label_is_assembled;
} machine_function;
#endif
diff --git a/gcc/testsuite/gcc.target/aarch64/pr92424-1.c b/gcc/testsuite/gcc.target/aarch64/pr92424-1.c
new file mode 100644
index 00000000000..c413a2c306e
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr92424-1.c
@@ -0,0 +1,122 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1" } */
+/* { dg-final { check-function-bodies "**" "" } } */
+
+/* Note: this test only checks the instructions in the function bodies,
+ not the placement of the patch label or nops before the futncion. */
+
+/*
+**f10_none:
+** nop
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=none"),
+ patchable_function_entry (1, 0)))
+f10_none ()
+{
+}
+
+/*
+**f10_pac:
+** hint 34 // bti c
+** nop
+** hint 25 // paciasp
+** hint 29 // autiasp
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti+pac-ret+leaf"),
+ patchable_function_entry (1, 0)))
+f10_pac ()
+{
+}
+
+/*
+**f10_bti:
+** hint 34 // bti c
+** nop
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti"),
+ patchable_function_entry (1, 0)))
+f10_bti ()
+{
+}
+
+/*
+**f11_none:
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=none"),
+ patchable_function_entry (1, 1)))
+f11_none ()
+{
+}
+
+/*
+**f11_pac:
+** hint 25 // paciasp
+** hint 29 // autiasp
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti+pac-ret+leaf"),
+ patchable_function_entry (1, 1)))
+f11_pac ()
+{
+}
+
+/*
+**f11_bti:
+** hint 34 // bti c
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti"),
+ patchable_function_entry (1, 1)))
+f11_bti ()
+{
+}
+
+/*
+**f21_none:
+** nop
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=none"),
+ patchable_function_entry (2, 1)))
+f21_none ()
+{
+}
+
+/*
+**f21_pac:
+** hint 34 // bti c
+** nop
+** hint 25 // paciasp
+** hint 29 // autiasp
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti+pac-ret+leaf"),
+ patchable_function_entry (2, 1)))
+f21_pac ()
+{
+}
+
+/*
+**f21_bti:
+** hint 34 // bti c
+** nop
+** ret
+*/
+void
+__attribute__ ((target("branch-protection=bti"),
+ patchable_function_entry (2, 1)))
+f21_bti ()
+{
+}
diff --git a/gcc/testsuite/gcc.target/aarch64/pr92424-2.c b/gcc/testsuite/gcc.target/aarch64/pr92424-2.c
new file mode 100644
index 00000000000..0e75657a153
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr92424-2.c
@@ -0,0 +1,12 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+__attribute__ ((target("branch-protection=bti"),
+ patchable_function_entry (1, 0)))
+f10_bti ()
+{
+}
+/* { dg-final { scan-assembler "f10_bti:\n\thint\t34 // bti c\n.*\.LPFE1:\n\tnop\n.*\tret\n" } } */
diff --git a/gcc/testsuite/gcc.target/aarch64/pr92424-3.c b/gcc/testsuite/gcc.target/aarch64/pr92424-3.c
new file mode 100644
index 00000000000..0a1f74d4096
--- /dev/null
+++ b/gcc/testsuite/gcc.target/aarch64/pr92424-3.c
@@ -0,0 +1,12 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+__attribute__ ((target("branch-protection=bti+pac-ret+leaf"),
+ patchable_function_entry (1, 0)))
+f10_pac ()
+{
+}
+/* { dg-final { scan-assembler "f10_pac:\n\thint\t34 // bti c\n.*\.LPFE1:\n\tnop\n.*\thint\t25 // paciasp\n.*\thint\t29 // autiasp\n.*\tret\n" } } */
--
2.33.1

View File

@ -0,0 +1,38 @@
From 8387783b66844e2ec2bcce0758088b309ab8559a Mon Sep 17 00:00:00 2001
From: Andrew Pinski <apinski@marvell.com>
Date: Wed, 22 Jan 2020 23:34:34 +0000
Subject: [PATCH 17/23] Backport Fix patchable-function-entry on arc
The problem here is arc looks at current_output_insn unconditional
but sometimes current_output_insn is NULL. With patchable-function-entry,
it will be. This is similar to how the nios2, handles "%.".
Committed as obvious after a simple test with -fpatchable-function-entry=1.
gcc/ChangeLog
2021-10-07 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2020-01-22 Andrew Pinski <apinski@marvell.com>
* config/arc/arc.c (output_short_suffix): Check insn for nullness.
---
gcc/config/arc/arc.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/gcc/config/arc/arc.c b/gcc/config/arc/arc.c
index 92fecad93d9..5e92983929d 100644
--- a/gcc/config/arc/arc.c
+++ b/gcc/config/arc/arc.c
@@ -4195,6 +4195,8 @@ static void
output_short_suffix (FILE *file)
{
rtx_insn *insn = current_output_insn;
+ if (!insn)
+ return;
if (arc_verify_short (insn, cfun->machine->unalign, 1))
{
--
2.33.1

View File

@ -0,0 +1,249 @@
From 8ea7fd2def80f1473bf488c2ffefefc43f669a71 Mon Sep 17 00:00:00 2001
From: "H.J. Lu" <hjl.tools@gmail.com>
Date: Fri, 1 May 2020 21:03:10 -0700
Subject: [PATCH 18/23] Backport Add patch_area_size and patch_area_entry to
crtl
Currently patchable area is at the wrong place. It is placed immediately
after function label and before .cfi_startproc. A backend should be able
to add a pseudo patchable area instruction durectly into RTL. This patch
adds patch_area_size and patch_area_entry to crtl so that the patchable
area info is available in RTL passes.
It also limits patch_area_size and patch_area_entry to 65535, which is
a reasonable maximum size for patchable area.
gcc/
PR target/93492
* cfgexpand.c (pass_expand::execute): Set crtl->patch_area_size
and crtl->patch_area_entry.
* emit-rtl.h (rtl_data): Add patch_area_size and patch_area_entry.
* opts.c (common_handle_option): Limit
function_entry_patch_area_size and function_entry_patch_area_start
to USHRT_MAX. Fix a typo in error message.
* varasm.c (assemble_start_function): Use crtl->patch_area_size
and crtl->patch_area_entry.
* doc/invoke.texi: Document the maximum value for
-fpatchable-function-entry.
gcc/c-family/
PR target/93492
* c-attribs.c (handle_patchable_function_entry_attribute): Limit
value to USHRT_MAX (65535).
gcc/testsuite/
PR target/93492
* c-c++-common/patchable_function_entry-error-1.c: New test.
* c-c++-common/patchable_function_entry-error-2.c: Likewise.
* c-c++-common/patchable_function_entry-error-3.c: Likewise.
---
gcc/c-family/c-attribs.c | 9 ++++
gcc/cfgexpand.c | 44 +++++++++++++++++++
gcc/doc/invoke.texi | 1 +
gcc/emit-rtl.h | 6 +++
gcc/opts.c | 4 +-
.../patchable_function_entry-error-1.c | 9 ++++
.../patchable_function_entry-error-2.c | 9 ++++
.../patchable_function_entry-error-3.c | 17 +++++++
gcc/varasm.c | 4 +-
9 files changed, 100 insertions(+), 3 deletions(-)
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
create mode 100644 gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
diff --git a/gcc/c-family/c-attribs.c b/gcc/c-family/c-attribs.c
index f0d2b1ed500..c01baffbc57 100644
--- a/gcc/c-family/c-attribs.c
+++ b/gcc/c-family/c-attribs.c
@@ -3206,6 +3206,15 @@ handle_patchable_function_entry_attribute (tree *, tree name, tree args,
*no_add_attrs = true;
return NULL_TREE;
}
+
+ if (tree_to_uhwi (val) > USHRT_MAX)
+ {
+ warning (OPT_Wattributes,
+ "%qE attribute argument %qE is out of range (> 65535)",
+ name, val);
+ *no_add_attrs = true;
+ return NULL_TREE;
+ }
}
return NULL_TREE;
}
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 7fd3916a3c7..2a603823a71 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -6481,6 +6481,50 @@ pass_expand::execute (function *fun)
if (crtl->tail_call_emit)
fixup_tail_calls ();
+ unsigned HOST_WIDE_INT patch_area_size = function_entry_patch_area_size;
+ unsigned HOST_WIDE_INT patch_area_entry = function_entry_patch_area_start;
+
+ tree patchable_function_entry_attr
+ = lookup_attribute ("patchable_function_entry",
+ DECL_ATTRIBUTES (cfun->decl));
+ if (patchable_function_entry_attr)
+ {
+ tree pp_val = TREE_VALUE (patchable_function_entry_attr);
+ tree patchable_function_entry_value1 = TREE_VALUE (pp_val);
+
+ patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
+ patch_area_entry = 0;
+ if (TREE_CHAIN (pp_val) != NULL_TREE)
+ {
+ tree patchable_function_entry_value2
+ = TREE_VALUE (TREE_CHAIN (pp_val));
+ patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
+ }
+ }
+
+ if (patch_area_entry > patch_area_size)
+ {
+ if (patch_area_size > 0)
+ warning (OPT_Wattributes,
+ "patchable function entry %wu exceeds size %wu",
+ patch_area_entry, patch_area_size);
+ patch_area_entry = 0;
+ }
+
+ crtl->patch_area_size = patch_area_size;
+ crtl->patch_area_entry = patch_area_entry;
+
+ /* This function is not present in gcc 7, nor the profile_count datastructures,
+ so it may be safe to assume that there is not enough engine implemented so
+ far to support that. */
+#if 0
+ /* BB subdivision may have created basic blocks that are only reachable
+ from unlikely bbs but not marked as such in the profile. */
+
+ if (optimize)
+ propagate_unlikely_bbs_forward ();
+#endif
+
/* Remove unreachable blocks, otherwise we cannot compute dominators
which are needed for loop state verification. As a side-effect
this also compacts blocks.
diff --git a/gcc/doc/invoke.texi b/gcc/doc/invoke.texi
index ad71be54e07..9fd3b013ff7 100644
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -11445,6 +11445,7 @@ If @code{N=0}, no pad location is recorded.
The NOP instructions are inserted at---and maybe before, depending on
@var{M}---the function entry address, even before the prologue.
+The maximum value of @var{N} and @var{M} is 65535.
@end table
diff --git a/gcc/emit-rtl.h b/gcc/emit-rtl.h
index da60a2d808c..66bc1bef391 100644
--- a/gcc/emit-rtl.h
+++ b/gcc/emit-rtl.h
@@ -163,6 +163,12 @@ struct GTY(()) rtl_data {
local stack. */
unsigned int stack_alignment_estimated;
+ /* How many NOP insns to place at each function entry by default. */
+ unsigned short patch_area_size;
+
+ /* How far the real asm entry point is into this area. */
+ unsigned short patch_area_entry;
+
/* For reorg. */
/* Nonzero if function being compiled called builtin_return_addr or
diff --git a/gcc/opts.c b/gcc/opts.c
index d0430e777ee..3de12b3662f 100644
--- a/gcc/opts.c
+++ b/gcc/opts.c
@@ -2220,10 +2220,12 @@ common_handle_option (struct gcc_options *opts,
function_entry_patch_area_start = 0;
}
if (function_entry_patch_area_size < 0
+ || function_entry_patch_area_size > USHRT_MAX
|| function_entry_patch_area_start < 0
+ || function_entry_patch_area_start > USHRT_MAX
|| function_entry_patch_area_size
< function_entry_patch_area_start)
- error ("invalid arguments for %<-fpatchable_function_entry%>");
+ error ("invalid arguments for %<-fpatchable-function-entry%>");
free (patch_area_arg);
}
break;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
new file mode 100644
index 00000000000..f60bf46cfe3
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-1.c
@@ -0,0 +1,9 @@
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
+/* { dg-options "-O2 -fpatchable-function-entry=65536,1" } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
+/* { dg-error "invalid arguments for '-fpatchable-function-entry'" "" { target *-*-* } 0 } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
new file mode 100644
index 00000000000..90f88c78be7
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-2.c
@@ -0,0 +1,9 @@
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
+/* { dg-options "-O2 -fpatchable-function-entry=1,65536" } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
+/* { dg-error "invalid arguments for '-fpatchable-function-entry'" "" { target *-*-* } 0 } */
+
+void
+foo (void)
+{
+}
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
new file mode 100644
index 00000000000..4490e5c15ca
--- /dev/null
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-error-3.c
@@ -0,0 +1,17 @@
+/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
+/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
+
+void
+ __attribute__((patchable_function_entry(65536)))
+foo1 (void) { /* { dg-warning "'patchable_function_entry' attribute argument '65536' is out of range" } */
+}
+
+void
+ __attribute__((patchable_function_entry(65536,1)))
+foo2 (void) { /* { dg-warning "'patchable_function_entry' attribute argument '65536' is out of range" } */
+}
+
+void
+ __attribute__((patchable_function_entry(65536,65536)))
+foo3 (void) { /* { dg-warning "'patchable_function_entry' attribute argument '65536' is out of range" } */
+}
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 0e6f20db361..8d4c0386fe3 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1829,8 +1829,8 @@ assemble_start_function (tree decl, const char *fnname)
if (DECL_PRESERVE_P (decl))
targetm.asm_out.mark_decl_preserved (fnname);
- unsigned HOST_WIDE_INT patch_area_size = function_entry_patch_area_size;
- unsigned HOST_WIDE_INT patch_area_entry = function_entry_patch_area_start;
+ unsigned short patch_area_size = crtl->patch_area_size;
+ unsigned short patch_area_entry = crtl->patch_area_entry;
tree patchable_function_entry_attr
= lookup_attribute ("patchable_function_entry", DECL_ATTRIBUTES (decl));
--
2.33.1

View File

@ -0,0 +1,66 @@
From c77e8505e9b8e1bbfc8520f52472b29c5e1709e9 Mon Sep 17 00:00:00 2001
From: Hans-Peter Nilsson <hp@bitrange.com>
Date: Fri, 24 Jul 2020 23:50:05 +0200
Subject: [PATCH 19/23] Backport testsuite: Adjust patchable_function tests for
mmix.
There's no reason anyone would want to use the "patchable function"
feature for MMIX and also no reason to exclude those tests. For MMIX,
the NOP equivalent is SWYM ("swymming" is a healthy exercise).
Text-wise, making the tests pass by adjusting the regexp, is shorter,
and it seems unlikely to both appear as a mnemonic for other targets
*and* being emitted in uppercase.
gcc/testsuite:
* c-c++-common/patchable_function_entry-decl.c,
c-c++-common/patchable_function_entry-default.c,
c-c++-common/patchable_function_entry-definition.c: Adjust for mmix.
---
gcc/testsuite/c-c++-common/patchable_function_entry-decl.c | 2 +-
gcc/testsuite/c-c++-common/patchable_function_entry-default.c | 2 +-
.../c-c++-common/patchable_function_entry-definition.c | 2 +-
3 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
index 4f707b31f0d..3ce7a5b8790 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-decl.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
-/* { dg-final { scan-assembler-times "nop|NOP" 2 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 2 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 2 { target alpha*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
index 97d8a81fbc6..7036f7bfbea 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-default.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
-/* { dg-final { scan-assembler-times "nop|NOP" 3 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 3 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 3 { target alpha*-*-* } } } */
extern int a;
diff --git a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
index ab94533ffec..ad7d7a9e076 100644
--- a/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
+++ b/gcc/testsuite/c-c++-common/patchable_function_entry-definition.c
@@ -1,7 +1,7 @@
/* { dg-do compile { target { ! { nvptx*-*-* visium-*-* } } } } */
/* { dg-options "-O2 -fpatchable-function-entry=3,1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
-/* { dg-final { scan-assembler-times "nop|NOP" 1 { target { ! { alpha*-*-* } } } } } */
+/* { dg-final { scan-assembler-times "nop|NOP|SWYM" 1 { target { ! { alpha*-*-* } } } } } */
/* { dg-final { scan-assembler-times "bis" 1 { target alpha*-*-* } } } */
extern int a;
--
2.33.1

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,88 @@
From cd53df36c6bd6cdae12f3bb96490fdebad3eb220 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Wed, 16 Dec 2020 16:15:35 +0100
Subject: [PATCH 21/23] Backport varasm: Fix up __patchable_function_entries
handling
The SECTION_LINK_ORDER changes don't seem to work properly.
If I compile:
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((patchable_function_entry(0, 0))) int foo (int x)
{
return x + 1;
}
static inline __attribute__((__gnu_inline__)) __attribute__((__unused__)) __attribute__((patchable_function_entry(0, 0))) int bar (int x)
{
return x + 2;
}
int
baz (int x)
{
return foo (x) + 1;
}
int
qux (int x)
{
return bar (x) + 2;
}
(distilled from aarch64 Linux kernel) with
-O2 -fpatchable-function-entry=2 on aarch64 compiler configured against
latest binutils, I get:
...
.section __patchable_function_entries,"awo",@progbits,baz
...
.section __patchable_function_entries
...
in the assembly, but when it is assembled, one gets:
[ 4] __patchable_function_entries PROGBITS 0000000000000000 000060 000008 00 WAL 1 0 8
[ 5] .rela__patchable_function_entries RELA 0000000000000000 000280 000018 18 I 12 4 8
[ 6] __patchable_function_entries PROGBITS 0000000000000000 000068 000008 00 0 0 8
[ 7] .rela__patchable_function_entries RELA 0000000000000000 000298 000018 18 I 12 6 8
i.e. one writable allocated section with SHF_LINK_ORDER and another
non-allocated non-writable without link order. In the kernel case there is
always one entry in the WAL section and then dozens or more in the
non-allocated one.
The kernel then fails to link:
WARNING: modpost: vmlinux.o (__patchable_function_entries): unexpected non-allocatable section.
Did you forget to use "ax"/"aw" in a .S file?
Note that for example <linux/init.h> contains
section definitions for use in .S files.
ld: .init.data has both ordered [`__patchable_function_entries' in init/main.o] and unordered [`.init.data' in
+./drivers/firmware/efi/libstub/vsprintf.stub.o] sections
ld: final link failed: bad value
make: *** [Makefile:1175: vmlinux] Error 1
The following patch fixes it by always forcing full section flags for
SECTION_LINK_ORDER sections.
2020-12-16 Jakub Jelinek <jakub@redhat.com>
* varasm.c (default_elf_asm_named_section): Always force
section flags even for sections with SECTION_LINK_ORDER flag.
---
gcc/varasm.c | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 7b0792ddaed..9e0e7c0976f 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -6363,9 +6363,10 @@ default_elf_asm_named_section (const char *name, unsigned int flags,
/* If we have already declared this section, we can use an
abbreviated form to switch back to it -- unless this section is
- part of a COMDAT groups, in which case GAS requires the full
- declaration every time. */
+ part of a COMDAT groups or with SHF_GNU_RETAIN or with SHF_LINK_ORDER,
+ in which case GAS requires the full declaration every time. */
if (!(HAVE_COMDAT_GROUP && (flags & SECTION_LINKONCE))
+ && !(flags & (SECTION_RETAIN | SECTION_LINK_ORDER))
&& (flags & SECTION_DECLARED))
{
fprintf (asm_out_file, "\t.section\t%s\n", name);
--
2.33.1

View File

@ -0,0 +1,185 @@
From cea6ee90a846468f87f71a592c9761a5136646b7 Mon Sep 17 00:00:00 2001
From: Jakub Jelinek <jakub@redhat.com>
Date: Sat, 3 Apr 2021 10:03:15 +0200
Subject: [PATCH 22/23] Backport rs6000: Avoid -fpatchable-function-entry*
regressions on powerpc64 be [PR98125]
The SECTION_LINK_ORDER changes broke powerpc64-linux ELFv1. Seems
that the assembler/linker relies on the symbol mentioned for the
"awo" section to be in the same section as the symbols mentioned in
the relocations in that section (i.e. labels for the patchable area
in this case). That is the case for most targets, including powerpc-linux
32-bit or powerpc64 ELFv2 (that one has -fpatchable-function-entry*
support broken for other reasons and it doesn't seem to be a regression).
But it doesn't work on powerpc64-linux ELFv1.
We emit:
.section ".opd","aw"
.align 3
_Z3foov:
.quad .L._Z3foov,.TOC.@tocbase,0
.previous
.type _Z3foov, @function
.L._Z3foov:
.section __patchable_function_entries,"awo",@progbits,_Z3foov
.align 3
.8byte .LPFE1
.section .text._Z3foov,"axG",@progbits,_Z3foov,comdat
.LPFE1:
nop
.LFB0:
.cfi_startproc
and because _Z3foov is in the .opd section rather than the function text
section, it doesn't work.
I'm afraid I don't know what exactly should be done, whether e.g.
it could use
.section __patchable_function_entries,"awo",@progbits,.L._Z3foov
instead, or whether the linker should be changed to handle it as is, or
something else.
But because we have a P1 regression that didn't see useful progress over the
4 months since it has been filed and we don't really have much time, below
is an attempt to do a targetted reversion of H.J's patch, basically act as
if HAVE_GAS_SECTION_LINK_ORDER is never true for powerpc64-linux ELFv1,
but for 32-bit or 64-bit ELFv2 keep working as is.
This would give us time to resolve it for GCC 12 properly.
2021-04-03 Jakub Jelinek <jakub@redhat.com>
PR testsuite/98125
* targhooks.h (default_print_patchable_function_entry_1): Declare.
* targhooks.c (default_print_patchable_function_entry_1): New function,
copied from default_print_patchable_function_entry with an added flags
argument.
(default_print_patchable_function_entry): Rewritten into a small
wrapper around default_print_patchable_function_entry_1.
* config/rs6000/rs6000.c (TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY):
Redefine.
(rs6000_print_patchable_function_entry): New function.
* g++.dg/pr93195a.C: Skip on powerpc*-*-* 64-bit.
---
gcc/config/rs6000/rs6000.c | 8 +++++--
gcc/targhooks.c | 38 ++++++++++++++++++++++-----------
gcc/targhooks.h | 3 +++
gcc/testsuite/g++.dg/pr93195a.C | 1 +
4 files changed, 36 insertions(+), 14 deletions(-)
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index af0c7ce1656..ac60d6d39ac 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -1615,6 +1615,10 @@ static const struct attribute_spec rs6000_attribute_table[] =
#define TARGET_ASM_ASSEMBLE_VISIBILITY rs6000_assemble_visibility
#endif
+#undef TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY
+#define TARGET_ASM_PRINT_PATCHABLE_FUNCTION_ENTRY \
+ rs6000_print_patchable_function_entry
+
#undef TARGET_SET_UP_BY_PROLOGUE
#define TARGET_SET_UP_BY_PROLOGUE rs6000_set_up_by_prologue
@@ -27933,8 +27937,8 @@ debug_stack_info (rs6000_stack_t *info)
fprintf (stderr, "\n");
}
-rtx
-rs6000_return_addr (int count, rtx frame)
+enum rtx_code
+rs6000_reverse_condition (machine_mode mode, enum rtx_code code)
{
/* We can't use get_hard_reg_initial_val for LR when count == 0 if LR
is trashed by the prologue, as it is for PIC on ABI_V4 and Darwin. */
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index 8aa610f5cde..958ec4ba6ff 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -1610,17 +1610,15 @@ default_compare_by_pieces_branch_ratio (machine_mode)
return 1;
}
-/* Write PATCH_AREA_SIZE NOPs into the asm outfile FILE around a function
- entry. If RECORD_P is true and the target supports named sections,
- the location of the NOPs will be recorded in a special object section
- called "__patchable_function_entries". This routine may be called
- twice per function to put NOPs before and after the function
- entry. */
+/* Helper for default_print_patchable_function_entry and other
+ print_patchable_function_entry hook implementations. */
void
-default_print_patchable_function_entry (FILE *file,
- unsigned HOST_WIDE_INT patch_area_size,
- bool record_p)
+default_print_patchable_function_entry_1 (FILE *file,
+ unsigned HOST_WIDE_INT
+ patch_area_size,
+ bool record_p,
+ unsigned int flags)
{
const char *nop_templ = 0;
int code_num;
@@ -1642,9 +1640,6 @@ default_print_patchable_function_entry (FILE *file,
patch_area_number++;
ASM_GENERATE_INTERNAL_LABEL (buf, "LPFE", patch_area_number);
- unsigned int flags = SECTION_WRITE | SECTION_RELRO;
- if (HAVE_GAS_SECTION_LINK_ORDER)
- flags |= SECTION_LINK_ORDER;
switch_to_section (get_section ("__patchable_function_entries",
flags, current_function_decl));
assemble_align (POINTER_SIZE);
@@ -1661,6 +1656,25 @@ default_print_patchable_function_entry (FILE *file,
output_asm_insn (nop_templ, NULL);
}
+/* Write PATCH_AREA_SIZE NOPs into the asm outfile FILE around a function
+ entry. If RECORD_P is true and the target supports named sections,
+ the location of the NOPs will be recorded in a special object section
+ called "__patchable_function_entries". This routine may be called
+ twice per function to put NOPs before and after the function
+ entry. */
+
+void
+default_print_patchable_function_entry (FILE *file,
+ unsigned HOST_WIDE_INT patch_area_size,
+ bool record_p)
+{
+ unsigned int flags = SECTION_WRITE | SECTION_RELRO;
+ if (HAVE_GAS_SECTION_LINK_ORDER)
+ flags |= SECTION_LINK_ORDER;
+ default_print_patchable_function_entry_1 (file, patch_area_size, record_p,
+ flags);
+}
+
bool
default_profile_before_prologue (void)
{
diff --git a/gcc/targhooks.h b/gcc/targhooks.h
index 6206fe20823..7b6d2fb9138 100644
--- a/gcc/targhooks.h
+++ b/gcc/targhooks.h
@@ -203,6 +203,9 @@ extern bool default_use_by_pieces_infrastructure_p (unsigned HOST_WIDE_INT,
bool);
extern int default_compare_by_pieces_branch_ratio (machine_mode);
+extern void default_print_patchable_function_entry_1 (FILE *,
+ unsigned HOST_WIDE_INT,
+ bool, unsigned int);
extern void default_print_patchable_function_entry (FILE *,
unsigned HOST_WIDE_INT,
bool);
diff --git a/gcc/testsuite/g++.dg/pr93195a.C b/gcc/testsuite/g++.dg/pr93195a.C
index 26d265da74e..b14f1b3e341 100644
--- a/gcc/testsuite/g++.dg/pr93195a.C
+++ b/gcc/testsuite/g++.dg/pr93195a.C
@@ -1,4 +1,5 @@
/* { dg-do link { target { ! { nvptx*-*-* visium-*-* } } } } */
+/* { dg-skip-if "not supported" { { powerpc*-*-* } && lp64 } } */
// { dg-require-effective-target o_flag_in_section }
/* { dg-options "-O0 -fpatchable-function-entry=1" } */
/* { dg-additional-options "-fno-pie" { target sparc*-*-* } } */
--
2.33.1

View File

@ -0,0 +1,355 @@
From b3190ec938171251b800d626d2d10f3afadf0e9b Mon Sep 17 00:00:00 2001
From: Giuliano Belinassi <gbelinassi@suse.de>
Date: Mon, 18 Oct 2021 18:00:28 -0300
Subject: [PATCH 23/23] Fix unwinding issues when pfe is enabled.
This patch has basically the same behaviour as 3dcea658c, but avoid
relying on the backend and CET mechanisms which are not implemented in
gcc-7.
gcc/ChangeLog
2021-10-18 Michael Matz <matz@suse.de>
* final.c (get_some_local_dynamic_name): Call
emit_patchable_function_entry.
* varasm.c (emit_patchable_function_entry): New.
gcc/testsuite/ChangeLog
2021-10-18 Giuliano Belinassi <gbelinassi@suse.de>
Backport from mainline
2020-02-03 H.J. Lu <hjl.tools@gmail.com>
PR target/93492
* gcc.target/i386/pr93492-1.c: New test.
* gcc.target/i386/pr93492-2.c: Likewise.
* gcc.target/i386/pr93492-3.c: Likewise.
* gcc.target/i386/pr93492-4.c: Likewise.
* gcc.target/i386/pr93492-5.c: Likewise.
Authored-by: Michael Matz <matz@suse.de>
---
gcc/ChangeLog | 6 ++
gcc/final.c | 4 +
gcc/testsuite/gcc.target/i386/pr93492-1.c | 76 +++++++++++++++++++
gcc/testsuite/gcc.target/i386/pr93492-2.c | 12 +++
gcc/testsuite/gcc.target/i386/pr93492-3.c | 13 ++++
gcc/testsuite/gcc.target/i386/pr93492-4.c | 11 +++
gcc/testsuite/gcc.target/i386/pr93492-5.c | 12 +++
gcc/varasm.c | 91 +++++++++++++----------
8 files changed, 187 insertions(+), 38 deletions(-)
create mode 100644 gcc/testsuite/gcc.target/i386/pr93492-1.c
create mode 100644 gcc/testsuite/gcc.target/i386/pr93492-2.c
create mode 100644 gcc/testsuite/gcc.target/i386/pr93492-3.c
create mode 100644 gcc/testsuite/gcc.target/i386/pr93492-4.c
create mode 100644 gcc/testsuite/gcc.target/i386/pr93492-5.c
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 51fed5508dc..537c343e6f1 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,9 @@
+2021-10-18 Michael Matz <matz@suse.de>
+
+ * final.c (get_some_local_dynamic_name): Call
+ emit_patchable_function_entry.
+ * varasm.c (emit_patchable_function_entry): New.
+
2019-11-14 Release Manager
* GCC 7.5.0 released.
diff --git a/gcc/final.c b/gcc/final.c
index 43743f05d84..53528620545 100644
--- a/gcc/final.c
+++ b/gcc/final.c
@@ -1745,6 +1745,8 @@ get_some_local_dynamic_name ()
return 0;
}
+void emit_patchable_function_entry (tree decl, bool before);
+
/* Output assembler code for the start of a function,
and initialize some of the variables in this file
for the new function. The label for the function and associated
@@ -1781,6 +1783,8 @@ final_start_function (rtx_insn *first, FILE *file,
if (!dwarf2_debug_info_emitted_p (current_function_decl))
dwarf2out_begin_prologue (0, 0, NULL);
+ emit_patchable_function_entry (current_function_decl, false);
+
#ifdef LEAF_REG_REMAP
if (crtl->uses_only_leaf_regs)
leaf_renumber_regs (first);
diff --git a/gcc/testsuite/gcc.target/i386/pr93492-1.c b/gcc/testsuite/gcc.target/i386/pr93492-1.c
new file mode 100644
index 00000000000..3383b0dc27b
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93492-1.c
@@ -0,0 +1,76 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1" } */
+
+/* Note: this test only checks the instructions in the function bodies,
+ not the placement of the patch label or nops before the function. */
+
+/*
+**f10_none:
+** nop
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (1, 0)))
+f10_none (void)
+{
+}
+
+/*
+**f10_endbr:
+** endbr(32|64)
+** nop
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (1, 0)))
+f10_endbr (void)
+{
+}
+
+/*
+**f11_none:
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (1, 1)))
+f11_none (void)
+{
+}
+
+/*
+**f11_endbr:
+** endbr(32|64)
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (1, 1)))
+f11_endbr (void)
+{
+}
+
+/*
+**f21_none:
+** nop
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (2, 1)))
+f21_none (void)
+{
+}
+
+/*
+**f21_endbr:
+** endbr(32|64)
+** nop
+** ret
+*/
+void
+__attribute__ ((patchable_function_entry (2, 1)))
+f21_endbr (void)
+{
+}
+
+/* { dg-final { scan-assembler "\.LPFE1:\n\tnop\n\trep ret" } } */
+/* { dg-final { scan-assembler "\.LPFE2:\n\tnop\n\trep ret" } } */
+/* { dg-final { scan-assembler "f11_none:\n\.LFB2:\n\t\.cfi_startproc\n\trep ret" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr93492-2.c b/gcc/testsuite/gcc.target/i386/pr93492-2.c
new file mode 100644
index 00000000000..d52d7a41637
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93492-2.c
@@ -0,0 +1,12 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1 -fasynchronous-unwind-tables -Wno-attributes" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+__attribute__ ((cf_check,patchable_function_entry (1, 0)))
+f10_endbr (void)
+{
+}
+
+/* { dg-final { scan-assembler "\.cfi_startproc\n.*\.LPFE1:\n\tnop\n\trep ret" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr93492-3.c b/gcc/testsuite/gcc.target/i386/pr93492-3.c
new file mode 100644
index 00000000000..d391e117004
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93492-3.c
@@ -0,0 +1,13 @@
+/* { dg-do "compile" } */
+/* { dg-require-effective-target mfentry } */
+/* { dg-options "-O1 -mfentry -pg -fasynchronous-unwind-tables -Wno-attributes" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+__attribute__ ((cf_check,patchable_function_entry (1, 0)))
+f10_endbr (void)
+{
+}
+
+/* { dg-final { scan-assembler "\t\.cfi_startproc\n.*\.LPFE1:\n\tnop\n1:\tcall\t__fentry__\n\trep ret\n" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr93492-4.c b/gcc/testsuite/gcc.target/i386/pr93492-4.c
new file mode 100644
index 00000000000..d5bfc58f7d8
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93492-4.c
@@ -0,0 +1,11 @@
+/* { dg-do "compile" } */
+/* { dg-options "-O1 -fpatchable-function-entry=1 -fasynchronous-unwind-tables -Wno-attributes" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+foo (void)
+{
+}
+
+/* { dg-final { scan-assembler "\t\.cfi_startproc\n.*\.LPFE1:\n\tnop\n\trep ret\n" } } */
diff --git a/gcc/testsuite/gcc.target/i386/pr93492-5.c b/gcc/testsuite/gcc.target/i386/pr93492-5.c
new file mode 100644
index 00000000000..0eb900b5a45
--- /dev/null
+++ b/gcc/testsuite/gcc.target/i386/pr93492-5.c
@@ -0,0 +1,12 @@
+/* { dg-do "compile" } */
+/* { dg-require-effective-target mfentry } */
+/* { dg-options "-O1 -fpatchable-function-entry=1 -mfentry -pg -fasynchronous-unwind-tables -Wno-attributes" } */
+
+/* Test the placement of the .LPFE1 label. */
+
+void
+foo (void)
+{
+}
+
+/* { dg-final { scan-assembler "\t\.cfi_startproc\n.*\.LPFE1:\n\tnop\n1:\tcall\t__fentry__\n\trep ret\n" } } */
diff --git a/gcc/varasm.c b/gcc/varasm.c
index 9e0e7c0976f..e197fbdaed5 100644
--- a/gcc/varasm.c
+++ b/gcc/varasm.c
@@ -1698,6 +1698,58 @@ get_fnname_from_decl (tree decl)
return XSTR (x, 0);
}
+/* Emit the patchable function entry NOPs for function DECL.
+ BEFORE is true if we should emit the nops in front of the function
+ label (i.e. before prologue), or the ones after the function label
+ (part of the prologue). */
+void
+emit_patchable_function_entry (tree decl, bool before)
+{
+ unsigned short patch_area_size = crtl->patch_area_size;
+ unsigned short patch_area_entry = crtl->patch_area_entry;
+
+ tree patchable_function_entry_attr
+ = lookup_attribute ("patchable_function_entry", DECL_ATTRIBUTES (decl));
+ if (patchable_function_entry_attr)
+ {
+ tree pp_val = TREE_VALUE (patchable_function_entry_attr);
+ tree patchable_function_entry_value1 = TREE_VALUE (pp_val);
+
+ patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
+ patch_area_entry = 0;
+ if (TREE_CHAIN (pp_val) != NULL_TREE)
+ {
+ tree patchable_function_entry_value2
+ = TREE_VALUE (TREE_CHAIN (pp_val));
+ patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
+ }
+ }
+
+ if (patch_area_entry > patch_area_size)
+ {
+ if (patch_area_size > 0 && before)
+ warning (OPT_Wattributes, "patchable function entry > size");
+ patch_area_entry = 0;
+ }
+
+ if (before)
+ {
+ /* Emit the patching area before the entry label, if any. */
+ if (patch_area_entry > 0)
+ targetm.asm_out.print_patchable_function_entry (asm_out_file,
+ patch_area_entry, true);
+ }
+ else
+ {
+ /* And the area after the label. Record it if we haven't done so yet. */
+ if (patch_area_size > patch_area_entry)
+ targetm.asm_out.print_patchable_function_entry (asm_out_file,
+ patch_area_size
+ - patch_area_entry,
+ patch_area_entry == 0);
+ }
+}
+
/* Output assembler code for the constant pool of a function and associated
with defining the name of the function. DECL describes the function.
NAME is the function's name. For the constant pool, we use the current
@@ -1829,37 +1881,7 @@ assemble_start_function (tree decl, const char *fnname)
if (DECL_PRESERVE_P (decl))
targetm.asm_out.mark_decl_preserved (fnname);
- unsigned short patch_area_size = crtl->patch_area_size;
- unsigned short patch_area_entry = crtl->patch_area_entry;
-
- tree patchable_function_entry_attr
- = lookup_attribute ("patchable_function_entry", DECL_ATTRIBUTES (decl));
- if (patchable_function_entry_attr)
- {
- tree pp_val = TREE_VALUE (patchable_function_entry_attr);
- tree patchable_function_entry_value1 = TREE_VALUE (pp_val);
-
- patch_area_size = tree_to_uhwi (patchable_function_entry_value1);
- patch_area_entry = 0;
- if (TREE_CHAIN (pp_val) != NULL_TREE)
- {
- tree patchable_function_entry_value2
- = TREE_VALUE (TREE_CHAIN (pp_val));
- patch_area_entry = tree_to_uhwi (patchable_function_entry_value2);
- }
- }
-
- if (patch_area_entry > patch_area_size)
- {
- if (patch_area_size > 0)
- warning (OPT_Wattributes, "patchable function entry > size");
- patch_area_entry = 0;
- }
-
- /* Emit the patching area before the entry label, if any. */
- if (patch_area_entry > 0)
- targetm.asm_out.print_patchable_function_entry (asm_out_file,
- patch_area_entry, true);
+ emit_patchable_function_entry (decl, true);
/* Do any machine/system dependent processing of the function name. */
#ifdef ASM_DECLARE_FUNCTION_NAME
@@ -1869,13 +1891,6 @@ assemble_start_function (tree decl, const char *fnname)
ASM_OUTPUT_FUNCTION_LABEL (asm_out_file, fnname, current_function_decl);
#endif /* ASM_DECLARE_FUNCTION_NAME */
- /* And the area after the label. Record it if we haven't done so yet. */
- if (patch_area_size > patch_area_entry)
- targetm.asm_out.print_patchable_function_entry (asm_out_file,
- patch_area_size
- - patch_area_entry,
- patch_area_entry == 0);
-
if (lookup_attribute ("no_split_stack", DECL_ATTRIBUTES (decl)))
saw_no_split_stack = true;
}
--
2.33.1

View File

@ -21,6 +21,7 @@
#
# spec file for package gcc7
#
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
@ -304,6 +305,7 @@ Requires: libmpxwrappers%{libmpxwrappers_sover} >= %{version}-%{release}
Suggests: gcc7-info gcc7-locale
%endif
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -348,12 +350,35 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
Summary: Testsuite results
License: SUSE-Public-Domain
Group: Development/Languages/C and C++
%description
%description
Results from running the gcc and target library testsuites.
@ -496,6 +521,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -824,14 +872,14 @@ mkdir ../testresults
export SUSE_ASNEEDED=0
export NO_BRP_CHECK_BYTECODE_VERSION=true
cd obj-%{GCCDIST}
%if 0%{?run_tests:1}
%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
chmod 644 ../testresults/*
%endif
%if 0%{?run_tests:1}
%files
%files
%defattr(-,root,root)
%doc testresults/test_summary.txt
%doc testresults/*.sum

View File

@ -1,3 +1,31 @@
-------------------------------------------------------------------
Wed Oct 20 16:52:20 UTC 2021 - Giuliano Belinassi <giuliano.belinassi@suse.com>
- - Add gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
to add -fpatchable-function-entry feature to gcc-7.
-------------------------------------------------------------------
Mon Sep 27 07:35:46 UTC 2021 - Richard Biener <rguenther@suse.com>

171
gcc7.spec
View File

@ -16,8 +16,6 @@
#
# nospeccleaner
# Ada currently fails to build on a few platforms, enable it only
# on those that work
%if %{suse_version} >= 1310
@ -286,6 +284,7 @@ Requires: libmpxwrappers%{libmpxwrappers_sover} >= %{version}-%{release}
Suggests: gcc7-info gcc7-locale
%endif
Group: Development/Languages/C and C++
BuildRoot: %{_tmppath}/%{name}-%{version}-build
Source: gcc-%{version}.tar.xz
Source1: change_spec
@ -330,10 +329,32 @@ Patch101: gcc7-fix-retrieval-of-testnames.patch
Patch102: gcc7-aarch64-sls-miti-1.patch
Patch103: gcc7-aarch64-sls-miti-2.patch
Patch104: gcc7-aarch64-sls-miti-3.patch
Patch105: gcc7-pfe-0001-Backport-Add-entry-for-patchable_function_entry.patch
Patch106: gcc7-pfe-0002-Backport-Skip-fpatchable-function-entry-tests-for-nv.patch
Patch107: gcc7-pfe-0003-Backport-Error-out-on-nvptx-for-fpatchable-function-.patch
Patch108: gcc7-pfe-0004-Backport-Adapt-scan-assembler-times-for-alpha.patch
Patch109: gcc7-pfe-0005-Backport-patchable_function_entry-decl.c-Use-3-NOPs-.patch
Patch110: gcc7-pfe-0006-Backport-IBM-Z-Use-the-dedicated-NOP-instructions-fo.patch
Patch111: gcc7-pfe-0007-Backport-Add-regex-to-search-for-uppercase-NOP-instr.patch
Patch112: gcc7-pfe-0008-Backport-ICE-segmentation-fault-with-patchable_funct.patch
Patch113: gcc7-pfe-0009-Backport-patchable_function_entry-decl.c-Pass-mcpu-g.patch
Patch114: gcc7-pfe-0010-Backport-patchable_function_entry-decl.c-Do-not-run-.patch
Patch115: gcc7-pfe-0011-Backport-patchable_function_entry-decl.c-Add-fno-pie.patch
Patch116: gcc7-pfe-0012-Backport-PR-c-89946-ICE-in-assemble_start_function-a.patch
Patch117: gcc7-pfe-0013-Backport-targhooks.c-default_print_patchable_functio.patch
Patch118: gcc7-pfe-0014-Backport-Align-__patchable_function_entries-to-POINT.patch
Patch119: gcc7-pfe-0015-Backport-Fix-PR-93242-patchable-function-entry-broke.patch
Patch120: gcc7-pfe-0016-Backport-AArch64-PR92424-Fix-fpatchable-function-ent.patch
Patch121: gcc7-pfe-0017-Backport-Fix-patchable-function-entry-on-arc.patch
Patch122: gcc7-pfe-0018-Backport-Add-patch_area_size-and-patch_area_entry-to.patch
Patch123: gcc7-pfe-0019-Backport-testsuite-Adjust-patchable_function-tests-f.patch
Patch124: gcc7-pfe-0020-Backport-Use-the-section-flag-o-for-__patchable_func.patch
Patch125: gcc7-pfe-0021-Backport-varasm-Fix-up-__patchable_function_entries-.patch
Patch126: gcc7-pfe-0022-Backport-rs6000-Avoid-fpatchable-function-entry-regr.patch
Patch127: gcc7-pfe-0023-Fix-unwinding-issues-when-pfe-is-enabled.patch
Summary: The GNU C Compiler and Support Files
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Summary: The GNU C Compiler and Support Files
%description
Core package for the GNU Compiler Collection, including the C language
@ -342,11 +363,8 @@ frontend.
Language frontends other than C are split to different sub-packages,
namely gcc-ada, gcc-c++, gcc-fortran, gcc-obj, gcc-obj-c++ and gcc-go.
%package -n gcc7-32bit
Summary: The GNU C Compiler 32bit support
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc7 = %{version}-%{release}
Requires: libgcc_s%{libgcc_s}-32bit >= %{version}-%{release}
@ -380,7 +398,6 @@ This package contains 32bit support for the GNU Compiler Collection.
%package -n gcc7-64bit
Summary: The GNU C Compiler 64bit support
License: GPL-3.0-or-later
Group: Development/Languages/C and C++
Requires: gcc7 = %{version}-%{release}
Requires: libgcc_s%{libgcc_s}-64bit >= %{version}-%{release}
@ -418,7 +435,6 @@ Requires: glibc-devel-64bit
%description -n gcc7-64bit
This package contains 64bit support for the GNU Compiler Collection.
%package devel
Summary: GCC plugins development enviroment
License: GPL-3.0-or-later
@ -430,7 +446,6 @@ Requires: mpc-devel
%description devel
Files required for developing and compiling GCC plugins.
%package locale
Summary: Locale Data for the GNU Compiler Collection
License: GPL-3.0-or-later
@ -441,7 +456,6 @@ Requires: gcc7 = %{version}-%{release}
Locale data for the GNU Compiler Collection (GCC) to give error message
in the current locale.
%package c++
Summary: The GNU C++ Compiler
License: GPL-3.0-or-later
@ -452,6 +466,7 @@ Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix} = %{version}
%description c++
This package contains the GNU compiler for C++.
%package c++-32bit
Summary: The GNU C++ Compiler
License: GPL-3.0-or-later
@ -462,6 +477,7 @@ Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit = %{ve
%description c++-32bit
This package contains the GNU compiler for C++.
%package c++-64bit
Summary: The GNU C++ Compiler
License: GPL-3.0-or-later
@ -473,10 +489,9 @@ Requires: libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit = %{ve
%description c++-64bit
This package contains the GNU compiler for C++.
%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Requires: glibc-devel
Requires: libstdc++%{libstdcxx_sover} >= %{version}-%{release}
@ -487,9 +502,10 @@ Requires: libunwind-devel
%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}
This package contains all the headers and libraries of the standard C++
library. It is needed for compiling C++ code.
%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Requires: glibc-devel-32bit
Requires: libstdc++%{libstdcxx_sover}-32bit >= %{version}-%{release}
@ -500,9 +516,10 @@ Requires: libunwind-devel
%description -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-32bit
This package contains all the headers and libraries of the standard C++
library. It is needed for compiling C++ code.
%package -n libstdc++%{libstdcxx_sover}-devel%{libdevel_suffix}-64bit
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Requires: glibc-devel-64bit
Requires: libstdc++%{libstdcxx_sover}-64bit >= %{version}-%{release}
@ -514,10 +531,9 @@ Requires: libunwind-devel
This package contains all the headers and libraries of the standard C++
library. It is needed for compiling C++ code.
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
Summary: C compiler runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgcc_s%{libgcc_s} = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -530,9 +546,10 @@ Libgcc is needed for dynamically linked C programs.
%post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} -p /sbin/ldconfig
%postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix} -p /sbin/ldconfig
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
Summary: C compiler runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgcc_s%{libgcc_s}-32bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -545,9 +562,10 @@ Libgcc is needed for dynamically linked C programs.
%post -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit -p /sbin/ldconfig
%postun -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit -p /sbin/ldconfig
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
Summary: C compiler runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgcc_s%{libgcc_s}-64bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -563,7 +581,7 @@ Libgcc is needed for dynamically linked C programs.
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgomp%{libgomp_sover} = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -580,9 +598,10 @@ option.
%post -n libgomp%{libgomp_sover}%{libgomp_suffix} -p /sbin/ldconfig
%postun -n libgomp%{libgomp_sover}%{libgomp_suffix} -p /sbin/ldconfig
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgomp%{libgomp_sover}-32bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -599,9 +618,10 @@ option.
%post -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit -p /sbin/ldconfig
%postun -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit -p /sbin/ldconfig
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Base
Provides: libgomp%{libgomp_sover}-64bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -621,7 +641,7 @@ option.
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}
Summary: The standard C++ shared library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Suggests: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover} = %{version}-%{release}
@ -636,9 +656,10 @@ The standard C++ library, needed for dynamically linked C++ programs.
%post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} -p /sbin/ldconfig
%postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix} -p /sbin/ldconfig
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit
Summary: The standard C++ shared library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Suggests: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover}-32bit = %{version}-%{release}
@ -653,9 +674,10 @@ The standard C++ library, needed for dynamically linked C++ programs.
%post -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit -p /sbin/ldconfig
%postun -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-32bit -p /sbin/ldconfig
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-64bit
Summary: The standard C++ shared library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Suggests: libstdc++%{libstdcxx_sover}-locale
Provides: libstdc++%{libstdcxx_sover}-64bit = %{version}-%{release}
@ -673,7 +695,7 @@ The standard C++ library, needed for dynamically linked C++ programs.
%package -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
Summary: Standard C++ Library Locales
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Provides: libstdc++%{libstdcxx_sover}-locale = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -683,7 +705,6 @@ Conflicts: %selfconflict libstdc++%{libstdcxx_sover}-locale
%description -n libstdc++%{libstdcxx_sover}%{libstdcxx_suffix}-locale
The standard C++ library locale data.
%package info
Summary: Documentation for the GNU compiler collection
License: GFDL-1.2-only
@ -697,7 +718,6 @@ BuildArch: noarch
GNU info-pages for the GNU compiler collection covering both user-level
and internals documentation.
%package objc
Summary: GNU Objective C Compiler
License: GPL-3.0-or-later
@ -710,6 +730,7 @@ Requires: libobjc%{libobjc_sover} >= %{version}-%{release}
This package contains the GNU Objective C compiler. Objective C is an
object oriented language, created by Next Inc. and used in their
Nextstep OS. The source code is available in the gcc package.
%package objc-32bit
Summary: GNU Objective C Compiler
License: GPL-3.0-or-later
@ -722,6 +743,7 @@ Requires: libobjc%{libobjc_sover}-32bit >= %{version}-%{release}
This package contains the GNU Objective C compiler. Objective C is an
object oriented language, created by Next Inc. and used in their
Nextstep OS. The source code is available in the gcc package.
%package objc-64bit
Summary: GNU Objective C Compiler
License: GPL-3.0-or-later
@ -737,7 +759,7 @@ Nextstep OS. The source code is available in the gcc package.
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover} = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -750,9 +772,10 @@ The library for the GNU Objective C compiler.
%post -n libobjc%{libobjc_sover}%{libobjc_suffix} -p /sbin/ldconfig
%postun -n libobjc%{libobjc_sover}%{libobjc_suffix} -p /sbin/ldconfig
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover}-32bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -765,9 +788,10 @@ The library for the GNU Objective C compiler.
%post -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit -p /sbin/ldconfig
%postun -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit -p /sbin/ldconfig
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover}-64bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -793,6 +817,7 @@ Requires: gcc7-objc = %{version}-%{release}
This package contains the GNU Objective C++ compiler. Objective C++ is an
object oriented language, created by Next Inc. and used in their
Nextstep OS. The source code is available in the gcc package.
%package obj-c++-32bit
Summary: GNU Objective C++ Compiler
License: GPL-3.0-or-later
@ -805,6 +830,7 @@ Requires: gcc7-objc-32bit = %{version}-%{release}
This package contains the GNU Objective C++ compiler. Objective C++ is an
object oriented language, created by Next Inc. and used in their
Nextstep OS. The source code is available in the gcc package.
%package obj-c++-64bit
Summary: GNU Objective C++ Compiler
License: GPL-3.0-or-later
@ -818,7 +844,6 @@ This package contains the GNU Objective C++ compiler. Objective C++ is an
object oriented language, created by Next Inc. and used in their
Nextstep OS. The source code is available in the gcc package.
%package -n cpp7
Summary: The GCC Preprocessor
License: GPL-3.0-or-later
@ -828,7 +853,6 @@ Group: Development/Languages/C and C++
This Package contains just the preprocessor that is used by the X11
packages.
%package ada
Summary: GNU Ada Compiler Based on GCC (GNAT)
License: GPL-3.0-or-later
@ -840,6 +864,7 @@ Requires: libada7 = %{version}-%{release}
%description ada
This package contains an Ada compiler and associated development
tools based on the GNU GCC technology.
%package ada-32bit
Summary: GNU Ada Compiler Based on GCC (GNAT)
License: GPL-3.0-or-later
@ -851,6 +876,7 @@ Requires: libada7-32bit = %{version}-%{release}
%description ada-32bit
This package contains an Ada compiler and associated development
tools based on the GNU GCC technology.
%package ada-64bit
Summary: GNU Ada Compiler Based on GCC (GNAT)
License: GPL-3.0-or-later
@ -865,7 +891,7 @@ tools based on the GNU GCC technology.
%package -n libada7
Summary: GNU Ada Runtime Libraries
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Provides: libgnarl-7 = %{version}-%{release}
Conflicts: %selfconflict libgnarl-7
@ -883,9 +909,10 @@ implementation of Distributed Systems Programming (GLADE) and the Posix
%post -n libada7 -p /sbin/ldconfig
%postun -n libada7 -p /sbin/ldconfig
%package -n libada7-32bit
Summary: GNU Ada Runtime Libraries
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Provides: libgnarl-7-32bit = %{version}-%{release}
Conflicts: %selfconflict libgnarl-7-32bit
@ -903,9 +930,10 @@ implementation of Distributed Systems Programming (GLADE) and the Posix
%post -n libada7-32bit -p /sbin/ldconfig
%postun -n libada7-32bit -p /sbin/ldconfig
%package -n libada7-64bit
Summary: GNU Ada Runtime Libraries
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: System/Libraries
Provides: libgnarl-7-64bit = %{version}-%{release}
Conflicts: %selfconflict libgnarl-7-64bit
@ -937,6 +965,7 @@ Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release}
%description fortran
This is the Fortran compiler of the GNU Compiler Collection (GCC).
%package fortran-32bit
Summary: The GNU Fortran Compiler and Support Files
License: GPL-3.0-or-later
@ -950,6 +979,7 @@ Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release}
%description fortran-32bit
This is the Fortran compiler of the GNU Compiler Collection (GCC).
%package fortran-64bit
Summary: The GNU Fortran Compiler and Support Files
License: GPL-3.0-or-later
@ -966,7 +996,7 @@ This is the Fortran compiler of the GNU Compiler Collection (GCC).
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release}
@ -983,9 +1013,10 @@ of the GNU Compiler Collection (GCC).
%post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} -p /sbin/ldconfig
%postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix} -p /sbin/ldconfig
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release}
@ -1002,9 +1033,10 @@ of the GNU Compiler Collection (GCC).
%post -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit -p /sbin/ldconfig
%postun -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit -p /sbin/ldconfig
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover}-64bit >= %{version}-%{release}
@ -1039,6 +1071,7 @@ operations.
%post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} -p /sbin/ldconfig
%postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix} -p /sbin/ldconfig
%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit
Summary: The GNU Fortran Compiler Quadmath Runtime Library
License: LGPL-2.1-only
@ -1056,6 +1089,7 @@ operations.
%post -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit -p /sbin/ldconfig
%postun -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit -p /sbin/ldconfig
%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit
Summary: The GNU Fortran Compiler Quadmath Runtime Library
License: LGPL-2.1-only
@ -1090,6 +1124,7 @@ The runtime library needed to run programs compiled with the
%post -n libitm%{libitm_sover}%{libitm_suffix} -p /sbin/ldconfig
%postun -n libitm%{libitm_sover}%{libitm_suffix} -p /sbin/ldconfig
%package -n libitm%{libitm_sover}%{libitm_suffix}-32bit
Summary: The GNU Compiler Transactional Memory Runtime Library
License: MIT
@ -1106,6 +1141,7 @@ The runtime library needed to run programs compiled with the
%post -n libitm%{libitm_sover}%{libitm_suffix}-32bit -p /sbin/ldconfig
%postun -n libitm%{libitm_sover}%{libitm_suffix}-32bit -p /sbin/ldconfig
%package -n libitm%{libitm_sover}%{libitm_suffix}-64bit
Summary: The GNU Compiler Transactional Memory Runtime Library
License: MIT
@ -1139,6 +1175,7 @@ The runtime library needed to run programs compiled with the
%post -n libasan%{libasan_sover}%{libasan_suffix} -p /sbin/ldconfig
%postun -n libasan%{libasan_sover}%{libasan_suffix} -p /sbin/ldconfig
%package -n libasan%{libasan_sover}%{libasan_suffix}-32bit
Summary: The GNU Compiler Address Sanitizer Runtime Library
License: MIT
@ -1155,6 +1192,7 @@ The runtime library needed to run programs compiled with the
%post -n libasan%{libasan_sover}%{libasan_suffix}-32bit -p /sbin/ldconfig
%postun -n libasan%{libasan_sover}%{libasan_suffix}-32bit -p /sbin/ldconfig
%package -n libasan%{libasan_sover}%{libasan_suffix}-64bit
Summary: The GNU Compiler Address Sanitizer Runtime Library
License: MIT
@ -1188,6 +1226,7 @@ The runtime library needed to run programs compiled with the
%post -n libtsan%{libtsan_sover}%{libtsan_suffix} -p /sbin/ldconfig
%postun -n libtsan%{libtsan_sover}%{libtsan_suffix} -p /sbin/ldconfig
%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit
Summary: The GNU Compiler Thread Sanitizer Runtime Library
License: MIT
@ -1204,6 +1243,7 @@ The runtime library needed to run programs compiled with the
%post -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit -p /sbin/ldconfig
%postun -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit -p /sbin/ldconfig
%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit
Summary: The GNU Compiler Thread Sanitizer Runtime Library
License: MIT
@ -1223,7 +1263,7 @@ The runtime library needed to run programs compiled with the
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Provides: libatomic%{libatomic_sover} = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -1236,9 +1276,10 @@ The runtime library for atomic operations of the GNU Compiler Collection (GCC).
%post -n libatomic%{libatomic_sover}%{libatomic_suffix} -p /sbin/ldconfig
%postun -n libatomic%{libatomic_sover}%{libatomic_suffix} -p /sbin/ldconfig
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Provides: libatomic%{libatomic_sover}-32bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -1251,9 +1292,10 @@ The runtime library for atomic operations of the GNU Compiler Collection (GCC).
%post -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit -p /sbin/ldconfig
%postun -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit -p /sbin/ldconfig
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0 WITH GCC-exception-3.1
License: GPL-3.0-only WITH GCC-exception-3.1
Group: Development/Languages/C and C++
Provides: libatomic%{libatomic_sover}-64bit = %{version}-%{release}
# Only one package may provide this - allows multiple gcc versions
@ -1283,6 +1325,7 @@ The runtime library needed to run programs compiled with the
%post -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix} -p /sbin/ldconfig
%postun -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix} -p /sbin/ldconfig
%package -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix}-32bit
Summary: The GNU Compiler Cilk+ Runtime Library
License: MIT
@ -1299,6 +1342,7 @@ The runtime library needed to run programs compiled with the
%post -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix}-32bit -p /sbin/ldconfig
%postun -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix}-32bit -p /sbin/ldconfig
%package -n libcilkrts%{libcilkrts_sover}%{libcilkrts_suffix}-64bit
Summary: The GNU Compiler Cilk+ Runtime Library
License: MIT
@ -1332,6 +1376,7 @@ The runtime library needed to run programs compiled with the
%post -n liblsan%{liblsan_sover}%{liblsan_suffix} -p /sbin/ldconfig
%postun -n liblsan%{liblsan_sover}%{liblsan_suffix} -p /sbin/ldconfig
%package -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit
Summary: The GNU Compiler Leak Sanitizer Runtime Library
License: MIT
@ -1348,6 +1393,7 @@ The runtime library needed to run programs compiled with the
%post -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit -p /sbin/ldconfig
%postun -n liblsan%{liblsan_sover}%{liblsan_suffix}-32bit -p /sbin/ldconfig
%package -n liblsan%{liblsan_sover}%{liblsan_suffix}-64bit
Summary: The GNU Compiler Leak Sanitizer Runtime Library
License: MIT
@ -1381,6 +1427,7 @@ The runtime library needed to run programs compiled with the
%post -n libubsan%{libubsan_sover}%{libubsan_suffix} -p /sbin/ldconfig
%postun -n libubsan%{libubsan_sover}%{libubsan_suffix} -p /sbin/ldconfig
%package -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit
Summary: The GNU Compiler Undefined Sanitizer Runtime Library
License: MIT
@ -1397,6 +1444,7 @@ The runtime library needed to run programs compiled with the
%post -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit -p /sbin/ldconfig
%postun -n libubsan%{libubsan_sover}%{libubsan_suffix}-32bit -p /sbin/ldconfig
%package -n libubsan%{libubsan_sover}%{libubsan_suffix}-64bit
Summary: The GNU Compiler Undefined Sanitizer Runtime Library
License: MIT
@ -1430,6 +1478,7 @@ The runtime library needed to run programs compiled with the
%post -n libvtv%{libvtv_sover}%{libvtv_suffix} -p /sbin/ldconfig
%postun -n libvtv%{libvtv_sover}%{libvtv_suffix} -p /sbin/ldconfig
%package -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit
Summary: The GNU Compiler Vtable Verifier Runtime Library
License: MIT
@ -1446,6 +1495,7 @@ The runtime library needed to run programs compiled with the
%post -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit -p /sbin/ldconfig
%postun -n libvtv%{libvtv_sover}%{libvtv_suffix}-32bit -p /sbin/ldconfig
%package -n libvtv%{libvtv_sover}%{libvtv_suffix}-64bit
Summary: The GNU Compiler Vtable Verifier Runtime Library
License: MIT
@ -1479,6 +1529,7 @@ The runtime library needed to run programs compiled with the
%post -n libmpx%{libmpx_sover}%{libmpx_suffix} -p /sbin/ldconfig
%postun -n libmpx%{libmpx_sover}%{libmpx_suffix} -p /sbin/ldconfig
%package -n libmpx%{libmpx_sover}%{libmpx_suffix}-32bit
Summary: The GNU Compiler MPX Runtime Library
License: BSD-3-Clause
@ -1495,6 +1546,7 @@ The runtime library needed to run programs compiled with the
%post -n libmpx%{libmpx_sover}%{libmpx_suffix}-32bit -p /sbin/ldconfig
%postun -n libmpx%{libmpx_sover}%{libmpx_suffix}-32bit -p /sbin/ldconfig
%package -n libmpx%{libmpx_sover}%{libmpx_suffix}-64bit
Summary: The GNU Compiler MPX Runtime Library
License: BSD-3-Clause
@ -1528,6 +1580,7 @@ The runtime library needed to run programs compiled with the
%post -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix} -p /sbin/ldconfig
%postun -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix} -p /sbin/ldconfig
%package -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix}-32bit
Summary: The GNU Compiler MPX Runtime Library
License: BSD-3-Clause
@ -1544,6 +1597,7 @@ The runtime library needed to run programs compiled with the
%post -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix}-32bit -p /sbin/ldconfig
%postun -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix}-32bit -p /sbin/ldconfig
%package -n libmpxwrappers%{libmpxwrappers_sover}%{libmpxwrappers_suffix}-64bit
Summary: The GNU Compiler MPX Runtime Library
License: BSD-3-Clause
@ -1583,6 +1637,7 @@ Requires: libgo%{libgo_sover} >= %{version}-%{release}
%description go
This package contains a Go compiler and associated development
files based on the GNU GCC technology.
%package go-32bit
Summary: GNU Go Compiler
License: GPL-3.0-or-later
@ -1594,6 +1649,7 @@ Requires: libgo%{libgo_sover}-32bit >= %{version}-%{release}
%description go-32bit
This package contains a Go compiler and associated development
files based on the GNU GCC technology.
%package go-64bit
Summary: GNU Go Compiler
License: GPL-3.0-or-later
@ -1621,6 +1677,7 @@ Runtime library for the GNU Go language.
%post -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
%postun -n libgo%{libgo_sover}%{libgo_suffix} -p /sbin/ldconfig
%package -n libgo%{libgo_sover}%{libgo_suffix}-32bit
Summary: GNU Go compiler runtime library
License: BSD-3-Clause
@ -1636,6 +1693,7 @@ Runtime library for the GNU Go language.
%post -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
%postun -n libgo%{libgo_sover}%{libgo_suffix}-32bit -p /sbin/ldconfig
%package -n libgo%{libgo_sover}%{libgo_suffix}-64bit
Summary: GNU Go compiler runtime library
License: BSD-3-Clause
@ -1800,6 +1858,29 @@ ln -s nvptx-newlib/newlib .
%patch102 -p1
%patch103 -p1
%patch104 -p1
%patch105 -p1
%patch106 -p1
%patch107 -p1
%patch108 -p1
%patch109 -p1
%patch110 -p1
%patch111 -p1
%patch112 -p1
%patch113 -p1
%patch114 -p1
%patch115 -p1
%patch116 -p1
%patch117 -p1
%patch118 -p1
%patch119 -p1
%patch120 -p1
%patch121 -p1
%patch122 -p1
%patch123 -p1
%patch124 -p1
%patch125 -p1
%patch126 -p1
%patch127 -p1
#test patching end
@ -2358,7 +2439,7 @@ for l in `find $RPM_BUILD_ROOT -name '*.la'`; do
mv $l.new $l
done
%if 0%{?run_tests:1}
%if 0%{?run_tests:1}
cp `find . -name "*.sum"` ../testresults/
cp `find . -name "*.log" \! -name "config.log" | grep -v 'acats.\?/tests' ` ../testresults/
chmod 644 ../testresults/*
@ -2405,7 +2486,7 @@ mv $RPM_BUILD_ROOT%{_infodir}/libgomp.info $RPM_BUILD_ROOT%{_infodir}/libgomp%{b
%ifarch %itm_arch
mv $RPM_BUILD_ROOT%{_infodir}/libitm.info $RPM_BUILD_ROOT%{_infodir}/libitm%{binsuffix}.info
%endif
%if %{build_fortran}
%if %{build_fortran}
%ifarch %quadmath_arch
mv $RPM_BUILD_ROOT%{_infodir}/libquadmath.info $RPM_BUILD_ROOT%{_infodir}/libquadmath%{binsuffix}.info
%endif
@ -2432,7 +2513,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuffix}.lang > gcc7-locale.lang
%ifarch %itm_arch
%install_info --info-dir=%{_infodir} %{_infodir}/libitm%{binsuffix}.info.gz
%endif
%if %{build_fortran}
%if %{build_fortran}
%install_info --info-dir=%{_infodir} %{_infodir}/gfortran%{binsuffix}.info.gz
%ifarch %quadmath_arch
%install_info --info-dir=%{_infodir} %{_infodir}/libquadmath%{binsuffix}.info.gz