From 89f59080d9cfb02f71398c702e61898682fce178 Mon Sep 17 00:00:00 2001 From: gaochang Date: Thu, 27 Feb 2025 14:14:16 +0800 Subject: [PATCH] Rebuild without bootstrap --- annobin.spec | 38 +++++++++++++++++++++++++------------- 1 file changed, 25 insertions(+), 13 deletions(-) diff --git a/annobin.spec b/annobin.spec index 738ae17..68c972e 100644 --- a/annobin.spec +++ b/annobin.spec @@ -1,4 +1,4 @@ -%define anolis_release 2 +%define anolis_release 3 %{?scl_package:%global scl gcc-toolset-14} %global scl_prefix gcc-toolset-14- @@ -78,7 +78,8 @@ ExcludeArch: loongarch64 # Bootstrapping: Set this to 1 to build annobin with the system gcc. # Then once GTS-gcc is built and in the buildroot, reset this variable # to 0, bump the NVR and rebuild GTS-annobin. -%define bootstrapping 1 +%define bootstrapping 0 +%undefine _annotated_build #--------------------------------------------------------------------------------- @@ -92,22 +93,29 @@ Source: https://nickc.fedorapeople.org/%{annobin_sources} # This is where a copy of the sources will be installed. %global annobin_source_dir %{?_scl_root}/%{_usrsrc}/annobin -%{?scl:Requires:%scl_runtime} -%{?scl:BuildRequires:%scl_runtime} -# We need the gcc-toolset-14 version of gcc to build annobin, as otherwise the versions will not match. -%{?scl:Requires:%scl_require_package %{scl} gcc} - -# XXX Bootstrapping - build annobin with the system gcc first. +%if %{bootstrapping} -# BuildRequires: %%{?scl_prefix}gcc %%{?scl_prefix}gcc-c++ -# BuildRequires: %%{?scl_prefix}annobin-plugin-gcc BuildRequires: gcc gcc-c++ -# %%define gcc_for_annobin %%{?_scl_root}/usr/bin/gcc -# %%define gxx_for_annobin %%{?_scl_root}/usr/bin/g++ %define gcc_for_annobin /usr/bin/gcc %define gxx_for_annobin /usr/bin/g++ +%else + +BuildRequires: %{scl_prefix}gcc +BuildRequires: %{scl_prefix}gcc-c++ +BuildRequires: %{scl_prefix}annobin-plugin-gcc +%{?scl:BuildRequires:%scl_runtime} + +%{?scl:Requires:%scl_runtime} +# We need the gcc-toolset-N version of gcc in order to run annobin, as otherwise the versions will not match. +%{?scl:Requires:%scl_require_package %{scl} gcc} + +%define gcc_for_annobin %{_scl_root}/usr/bin/gcc +%define gxx_for_annobin %{_scl_root}/usr/bin/g++ + +%endif + #--------------------------------------------------------------------------------- # Make sure that the necessary sub-packages are built. @@ -349,7 +357,8 @@ Installs an annobin plugin that can be used by Clang. # FIXME: This is going to need to be updated every time we bootstrap. Find # a better way. # OpenAnolis use the gcc-toolset-14 -%global ANNOBIN_GCC_PLUGIN_DIR /opt/rh/%{scl_prefix}/root/usr/lib/gcc/x86_64-redhat-linux/14/plugin +%global ANNOBIN_GCC_PLUGIN_DIR %{_scl_root}/usr/lib/gcc/%{_target_platform}/14/plugin + %else @@ -601,6 +610,9 @@ make check GCC=%gcc_for_annobin #--------------------------------------------------------------------------------- %changelog +* Thu Feb 27 2025 Chang Gao - 12.52-3 +- Rebuild without bootstrap + * Wed Feb 26 2025 Chang Gao - 12.52-2 - Enable bootstrap to prepare first build -- Gitee