Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:owinebar:Staging:gcc11-bootstrap
gcc11
project.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File project.diff of Package gcc11
--- change_spec.orig +++ change_spec @@ -1,39 +1,143 @@ #!/bin/bash -do_crosses=1 do_optional_compiler_languages=0 -rm -f gcc*-testresults.spec gcc*-testresults.changes gcc*.spec cross*.spec cross*.changes -# Default is to generate the normal gcc package +do_full_crosses=0 +do_bootstrap_crosses=0 +if [ "${obs_package}" = "gcc${base_ver}" ]; then + case "${base_proj}" in + ${obs_package}-bootstrap*) + do_bootstrap_crosses=1 + ;; + ${obs_package}) + do_full_crosses=1 + ;; + *) + do_bootstrap_crosses=1 + do_full_crosses=1 + ;; + esac +else + if [ -e gcc${base_ver}.changes -a \! -e ${obs_package}.changes ]; then + mv gcc${base_ver}.changes ${obs_package}.changes + fi +fi +do_crosses=0 +if test \( "$do_full_crosses" = 1 \) -o \( "$do_bootstrap_crosses" = 1 \); then + do_crosses=1 +fi + +rm -f ${base_pkg}*-testresults.spec ${base_pkg}*-testresults.changes ${base_pkg}*.spec cross*.spec cross*.changes gcc*.spec + +read -d "" spec_header_start <<EOF +Source1000: generate_cross_specs_${base_ver} +%define obs_package ${base_pkg} +%define obs_package_base_ver ${base_ver} + +EOF +if [ "$base_pkg" = "gcc" ]; then + if [ \( "$do_bootstrap_crosses" = 1 \) -a \( "$do_full_crosses" = 0 \) ]; then + # C/C++/JIT only + read -d "" spec_header_langs <<EOF +%define obs_build_lang_options 1 +%define build_cp 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_nvptx 0 +%define build_gcn 0 +%define enable_plugins 1 +%define build_jit 1 +%define build_ada 0 +%define build_d 0 +EOF + else + # Build everything + read -d "" spec_header_langs <<EOF +%define obs_build_lang_options 1 +%define build_cp 1 +%define build_fortran 1 +%define build_objc 1 +%define build_objcp 1 +%define build_go 1 +%define build_nvptx 1 +%define build_gcn 1 +%define enable_plugins 1 +%define build_jit 1 +%define build_ada 1 +%define build_d 1 +EOF + fi +elif [ "$base_pkg" = "gnat" ]; then + # Ada only + read -d "" spec_header_langs <<EOF +%define obs_build_lang_options 1 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_nvptx 0 +%define build_gcn 0 +%define enable_plugins 0 +%define build_jit 0 +%define build_ada 1 +%define build_d 0 +EOF +elif [ "$base_pkg" = "gdc" ]; then + # D only + read -d "" spec_header_langs <<EOF +%define obs_build_lang_options 1 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_nvptx 0 +%define build_gcn 0 +%define enable_plugins 0 +%define build_jit 0 +%define build_ada 0 +%define build_d 1 +EOF +else + echo "Base package ${base_pkg} not recognized for language selection" + spec_header_langs="" +fi +spec_header="${spec_header_start}${spec_header_langs}" + +# Default is to generate the normal gcc obs_package # unless a parameter is given. In case that it is '-*', -# that parameter will be used as suffix for the package name +# that parameter will be used as suffix for the obs_package name # and as suffix for the install path (/opt/gccSUFFIX) # In case that it is '[0-9]*', that parameter will be used -# as a suffix for a versioned package name. +# as a suffix for a versioned obs_package name. if [ $# -lt 1 ]; then echo No package suffix given - outfile=gcc.spec + outfile=${base_pkg}.spec else case $1 in [0-9]*) base_ver=$1 - outfile=gcc$1.spec + outfile=${base_pkg}$1.spec ;; *) - echo Invalid package suffix + echo Invalid obs_package suffix exit 1 ;; esac fi - : > $outfile - if test "$do_optional_compiler_languages" = "1"; then - echo '%define build_optional_compiler_languages 1' >> $outfile - fi - sed -e 's%@base_ver@%'$base_ver'%g' \ - gcc.spec.in \ - | sed -n -e '{ +: > $outfile +printf "%s\n" "$spec_header" >>$outfile +if test "$do_optional_compiler_languages" = "1"; then + echo '%define build_optional_compiler_languages 1' >> $outfile +fi +sed -e 's%@base_ver@%'$base_ver'%g' \ + gcc.spec.in \ + | sed -n -e '{ /^# PACKAGE-BEGIN/h /^# PACKAGE-BEGIN/,/^# PACKAGE-END/H /^# PACKAGE-BEGIN/,/^# PACKAGE-END/!p @@ -49,16 +153,16 @@ p } }' >> $outfile - echo '%define building_testsuite 1' > gcc$base_ver-testresults.spec - echo '%define run_tests 1' >> gcc$base_ver-testresults.spec - sed -e '/^# GCC-TESTSUITE-DELETE-BEGIN/,/^# GCC-TESTSUITE-DELETE-END/d;s/-n gcc@base_ver@-testresults$//g;s/^Name:[[:space:]]*gcc@base_ver@/Name: gcc@base_ver@-testresults/g' \ - gcc.spec.in \ - | sed -e 's%@base_ver@%'$base_ver'%g' \ ->> gcc$base_ver-testresults.spec - test -f gcc$base_ver.changes \ - && ( ln -f gcc$base_ver.changes gcc$base_ver-testresults.changes; ) - +echo '%define building_testsuite 1' > ${base_pkg}$base_ver-testresults.spec +echo '%define run_tests 1' >> ${base_pkg}$base_ver-testresults.spec +printf "%s\n" "$spec_header" >>${base_pkg}$base_ver-testresults.spec +sed -e '/^# GCC-TESTSUITE-DELETE-BEGIN/,/^# GCC-TESTSUITE-DELETE-END/d;s/-n gcc@base_ver@-testresults$//g;s/^Name:[[:space:]]*gcc@base_ver@/Name: %{obs_package}@base_ver@-testresults/g;s/^Name:[[:space:]]*%{obs_package}@base_ver@/Name: %{obs_package}@base_ver@-testresults/g' \ + gcc.spec.in \ + | sed -e 's%@base_ver@%'$base_ver'%g' \ + >> ${base_pkg}$base_ver-testresults.spec +echo '<multibuild>' > _multibuild +echo '<flavor>'${base_pkg}$base_ver-testresults'</flavor>' >> _multibuild add_cross() { local pkgname="$1"; shift @@ -77,54 +181,52 @@ add_cross() { sed -e "s#@base_ver@#$base_ver#" \ -e "s/^\(ExclusiveArch.*\) $rpmtarget[^ \r]*/\1 /" \ >> $pkgname.spec - test -f gcc$base_ver.changes && ln -f gcc$base_ver.changes $pkgname.changes + + echo '<flavor>'$pkgname'</flavor>' >> _multibuild } +if test "$do_full_crosses" = 1; then +if test "${do_bootstrap_crosses}" = 1; then add_newlib_cross() { add_cross $1-bootstrap $2 $3 "%define gcc_target_newlib 1 %define gcc_libc_bootstrap 1" add_cross $1 $2 $3 "%define gcc_target_newlib 1" } - add_glibc_cross() { add_cross $1-bootstrap $2 $3 "%define gcc_libc_bootstrap 1" add_cross $1 $2 $3 "%define gcc_target_glibc 1" } +else +add_newlib_cross() { + add_cross $1 $2 $3 "%define gcc_target_newlib 1" +} +add_glibc_cross() { + add_cross $1 $2 $3 "%define gcc_target_glibc 1" +} +fi +elif test "${do_bootstrap_crosses}" = 1; then +add_newlib_cross() { + add_cross $1-bootstrap $2 $3 "%define gcc_target_newlib 1 +%define gcc_libc_bootstrap 1" +} +add_glibc_cross() { + add_cross $1-bootstrap $2 $3 "%define gcc_libc_bootstrap 1" +} +else +add_newlib_cross() { + : +} +add_glibc_cross() { + : +} +fi -# We now support "proper" cross-compilers to suse targets via a -# cross-glibc package, enable that via for example -# -# add_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux -# -# For now keep the old way of doing things -if test "$do_crosses" = 1 ; then -add_glibc_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux -add_glibc_cross cross-riscv64-gcc$base_ver riscv64 riscv64-suse-linux -add_cross cross-arm-gcc$base_ver arm arm-suse-linux-gnueabi %define gcc_icecream 1 -add_cross cross-avr-gcc$base_ver-bootstrap avr avr "%define gcc_libc_bootstrap 1" -add_cross cross-avr-gcc$base_ver avr avr -add_cross cross-x86_64-gcc$base_ver x86_64 x86_64-suse-linux %define gcc_icecream 1 -add_cross cross-s390x-gcc$base_ver s390x s390x-suse-linux %define gcc_icecream 1 -add_cross cross-sparc-gcc$base_ver sparcv9 sparc-suse-linux %define gcc_icecream 1 -add_cross cross-sparc64-gcc$base_ver sparc64 sparc64-suse-linux %define gcc_icecream 1 -add_cross cross-ppc64-gcc$base_ver ppc64 powerpc64-suse-linux %define gcc_icecream 1 -add_cross cross-ppc64le-gcc$base_ver ppc64le powerpc64le-suse-linux %define gcc_icecream 1 -add_cross cross-m68k-gcc$base_ver m68k m68k-suse-linux %define gcc_icecream 1 -add_cross cross-mips-gcc$base_ver mips mips-suse-linux %define gcc_icecream 1 -add_cross cross-hppa-gcc$base_ver hppa hppa-suse-linux %define gcc_icecream 1 -add_newlib_cross cross-arm-none-gcc$base_ver arm-none arm-none-eabi -add_newlib_cross cross-epiphany-gcc$base_ver epiphany epiphany-elf -#add_newlib_cross cross-nds32le-gcc$base_ver nds32le nds32le-elf -add_newlib_cross cross-riscv64-elf-gcc$base_ver riscv64 riscv64-elf -#add_newlib_cross cross-rl78-gcc$base_ver rl78 rl78-elf -add_newlib_cross cross-rx-gcc$base_ver rx rx-elf -fi -# the nvptx and amdgcn crosses are used for offloading -add_cross cross-nvptx-gcc$base_ver nvptx nvptx-none %define gcc_accel 1 -add_cross cross-amdgcn-gcc$base_ver amdgcn amdgcn-amdhsa %define gcc_accel 1 +. "./generate_cross_specs_${base_ver}" for f in *.spec; do sed -i -e '/^# .*-\(BEGIN\|END\)$/d' $f done +echo '</multibuild>' >> _multibuild + osc service localrun format_spec_file --- cross-aarch64-gcc11-bootstrap.spec.orig +++ cross-aarch64-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -185,12 +185,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -236,11 +234,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -424,8 +422,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -468,11 +466,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -681,6 +675,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-arm-none-gcc11-bootstrap.spec.orig +++ cross-arm-none-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -186,12 +186,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -237,11 +235,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -425,8 +423,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -469,11 +467,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -682,6 +676,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-avr-gcc11-bootstrap.spec.orig +++ cross-avr-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -185,12 +185,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -236,11 +234,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -424,8 +422,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -468,11 +466,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -681,6 +675,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-epiphany-gcc11-bootstrap.spec.orig +++ cross-epiphany-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -186,12 +186,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -237,11 +235,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -425,8 +423,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -469,11 +467,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -682,6 +676,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-riscv64-elf-gcc11-bootstrap.spec.orig +++ cross-riscv64-elf-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -186,12 +186,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -237,11 +235,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -425,8 +423,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -469,11 +467,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -682,6 +676,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-riscv64-gcc11-bootstrap.spec.orig +++ cross-riscv64-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -185,12 +185,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -236,11 +234,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -424,8 +422,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -468,11 +466,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -681,6 +675,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-rx-gcc11-bootstrap.spec.orig +++ cross-rx-gcc11-bootstrap.spec @@ -1,7 +1,7 @@ # # spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -186,12 +186,10 @@ Requires: cross-%{binutils_target} %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -237,11 +235,11 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld -Requires: llvm11 +Requires: llvm # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there %if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 @@ -425,8 +423,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -469,11 +467,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -682,6 +676,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross.spec.in.orig +++ cross.spec.in @@ -93,12 +93,10 @@ Requires: cross-%{binutils_target}-binut %endif %endif %define hostsuffix %{nil} -%if 0%{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%else -BuildRequires: gcc-c++ +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} %endif +BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel %endif @@ -144,9 +142,9 @@ ExclusiveArch: x86_64 %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker, llvm-mc-12 doesn't # work at the moment so require llvm11 -BuildRequires: llvm11 +BuildRequires: llvm BuildRequires: lld -Requires: llvm11 +Requires: llvm Requires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does --- gcc.spec.in.orig +++ gcc.spec.in @@ -39,13 +39,6 @@ %define ada_arch %ix86 x86_64 ppc s390 ia64 %endif -%ifarch %ada_arch -%define build_ada 1 -%else -%define build_ada 0 -%endif - -%define quadmath_arch %ix86 x86_64 ia64 ppc64le %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 %define hwasan_arch aarch64 @@ -57,22 +50,19 @@ %define vtv_arch x86_64 %ix86 %endif +%if 0%{!?obs_build_lang_options:1} +%define build_ada 0 %define build_cp 1 -%define build_fortran 1 -%define build_objc 1 -%define build_objcp 1 -%define build_go 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 %ifarch x86_64 %ix86 %arm aarch64 riscv64 s390x %define build_d 1 %else %define build_d 0 %endif -%if %{build_objcp} -%define build_cp 1 -%define build_objc 1 -%endif - # For optional compilers only build C, C++, Fortran, Ada and Go %if 0%{?build_optional_compiler_languages:1} %define build_objc 0 @@ -80,22 +70,18 @@ %define build_d 0 %endif -%ifarch x86_64 -%define build_nvptx 1 -%else +# not for bootstrap %define build_nvptx 0 -%endif - -%ifarch x86_64 -# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does -# technically also SLE12 SP5 but do not bother there -%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 -%define build_gcn 1 -%else %define build_gcn 0 + +%define enable_plugins 1 +%define build_jit 1 + %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -105,13 +91,11 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} -%define enable_plugins 1 -%define build_jit 1 +# quadmath will be built but unpackaged if fortran is not built +%if %{build_fortran} +%define quadmath_arch %ix86 x86_64 ia64 ppc64le %else -%define enable_plugins 0 -%define build_jit 0 +%define quadmath_arch NONE %endif # Shared library SONAME versions @@ -197,7 +181,29 @@ Release: 1 %define binsuffix -@base_ver@ # SRC-COMMON-END -Name: gcc@base_ver@ +# in these cases we only want to build one language +%if "%{obs_package}" == "gnat" +%define build_ada 1 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_d 0 +%define build_jit 0 +%endif +%if "%{obs_package}" == "gdc" +%define build_d 1 +%define build_ada 0 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_jit 0 +%endif + +Name: %{obs_package}@base_ver@ BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -226,27 +232,12 @@ BuildRequires: systemtap-headers BuildRequires: isl-devel %endif %define hostsuffix %{nil} +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} +%endif %if %{build_ada} -%if 0%{?gcc_version:%{gcc_version}} > @base_ver@ -%define hostsuffix %{binsuffix} -BuildRequires: gcc@base_ver@-ada -BuildRequires: gcc@base_ver@-c++ -%else -%if %{suse_version} < 1310 -%define hostsuffix -4.8 -BuildRequires: gcc48-ada -BuildRequires: gcc48-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -270,6 +261,8 @@ BuildRequires: cross-nvptx-newlib@base_v %if %{build_gcn} BuildRequires: cross-amdgcn-gcc@base_ver@ BuildRequires: cross-amdgcn-newlib@base_ver@-devel +BuildRequires: llvm +BuildRequires: lld %endif %endif #!BuildIgnore: gcc-PIE @@ -376,6 +369,7 @@ Patch100: newlib-4.1.0-aligned_alloc.pat # GCC-TESTSUITE-DELETE-BEGIN # SRC-COMMON-END License: GPL-3.0-or-later +%if "%{obs_package}" == "gcc" Summary: The GNU C Compiler and Support Files %description @@ -384,10 +378,13 @@ 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. +%else +Summary: %{obs_package}@base_ver@ +%description +Dummy package for bootstrapping one of the optional gcc languages - %{obs_package} +%endif - - -%package -n gcc@base_ver@-32bit +%package -n %{obs_package}@base_ver@-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ Requires: gcc@base_ver@ = %{version}-%{release} @@ -410,10 +407,10 @@ Requires: libvtv%{libvtv_sover}-32bit >= %endif Requires: glibc-devel-32bit -%description -n gcc@base_ver@-32bit +%description -n %{obs_package}@base_ver@-32bit This package contains 32bit support for the GNU Compiler Collection. -%package -n gcc@base_ver@-64bit +%package -n %{obs_package}@base_ver@-64bit Summary: The GNU C Compiler 64bit support Group: Development/Languages/C and C++ Requires: gcc@base_ver@ = %{version}-%{release} @@ -445,7 +442,7 @@ Requires: libvtv%{libvtv_sover}-64bit >= %endif Requires: glibc-devel-64bit -%description -n gcc@base_ver@-64bit +%description -n %{obs_package}@base_ver@-64bit This package contains 64bit support for the GNU Compiler Collection. @@ -485,6 +482,7 @@ Independend Executable (PIE) variant. Th space randomization (ASLR). + # PACKAGE-BEGIN %package c++@variant@ Summary: The GNU C++ Compiler @@ -693,7 +691,15 @@ packages. # PACKAGE-BEGIN -%package ada@variant@ +# for bootstrapping Ada compiler separately +# has to be defined here for change_spec to process @variant@ +%define ada_package ada +%define ada_package_name_option %{nil} +%if "%{obs_package}" == "gnat" +%define ada_package gcc@base_ver@-ada +%define ada_package_name_option -n +%endif +%package %{ada_package_name_option} %{ada_package}@variant@ Summary: GNU Ada Compiler Based on GCC (GNAT) License: GPL-3.0-or-later Group: Development/Languages/Other @@ -701,7 +707,7 @@ Requires: gcc@base_ver@@variant@ = %{ver Requires: gcc@base_ver@-ada = %{version}-%{release} Requires: libada@base_ver@@variant@ = %{version}-%{release} -%description ada@variant@ +%description %{ada_package_name_option} %{ada_package}@variant@ This package contains an Ada compiler and associated development tools based on the GNU GCC technology. # PACKAGE-END @@ -984,7 +990,16 @@ Runtime library for the GNU Go language. # PACKAGE-BEGIN -%package d@variant@ +# for bootstrapping D compiler separately +# has to be defined here for change_spec to process @variant@ +%define d_package d +%define d_package_name_option %{nil} + +%if "%{obs_package}" == "gdc" +%define d_package gcc@base_ver@-d +%define d_package_name_option -n +%endif +%package %{d_package_name_option} %{d_package}@variant@ Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -993,7 +1008,7 @@ Requires: gcc@base_ver@-d = %{version}-% Requires: libgphobos%{libgphobos_sover}@variant@ >= %{version}-%{release} Requires: libgdruntime%{libgdruntime_sover}@variant@ >= %{version}-%{release} -%description d@variant@ +%description %{d_package_name_option} %{d_package}@variant@ This package contains a D compiler and associated development files based on the GNU GCC technology. # PACKAGE-END @@ -1034,6 +1049,7 @@ Runtime library for the GNU D language. %postun -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}@variant@ -p /sbin/ldconfig # PACKAGE-END + %package -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} Summary: The GNU Compiler Collection JIT library License: GPL-3.0-or-later @@ -1064,17 +1080,16 @@ Requires: libgccjit%{libgccjit_sover}%{l %description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} Package contains header files and documentation for GCC JIT front-end. -%package -n gcc@base_ver@-testresults +%package -n %{obs_package}@base_ver@-testresults # GCC-TESTSUITE-DELETE-END Summary: Testsuite results License: SUSE-Public-Domain Group: Development/Languages/C and C++ -%description -n gcc@base_ver@-testresults +%description -n %{obs_package}@base_ver@-testresults Results from running the gcc and target library testsuites. - # SRC-COMMON-BEGIN # Define the canonical target and host architecture @@ -1300,8 +1315,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -1344,11 +1359,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -1557,6 +1568,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -2232,7 +2246,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/lto-dump%{binsuffix}.1.gz %if %{separate_biarch} -%files -n gcc@base_ver@%{separate_biarch_suffix} +%files -n %{obs_package}@base_ver@%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib *crt*.o %versbiarchlib libgcc*.a @@ -2656,7 +2670,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %if %{build_ada} -%files ada +%files %{ada_package_name_option} %{ada_package} %defattr(-,root,root) %dir %{_libdir}/gcc %dir %{_libdir}/gcc/%{GCCDIST} @@ -2672,7 +2686,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %{versmainlibdir}/ada_target_properties %if %{separate_biarch} -%files ada%{separate_biarch_suffix} +%files %{ada_package_name_option} %{ada_package}%{separate_biarch_suffix} %defattr(-,root,root) %dir %{versmainlibdirbi}/adalib %{versmainlibdirbi}/adainclude @@ -2740,7 +2754,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %if %{build_d} -%files d +%files %{d_package_name_option} %{d_package} %defattr(-,root,root) %{_prefix}/bin/gdc%{binsuffix} %{libsubdir}/d21 @@ -2753,7 +2767,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/gdc%{binsuffix}.1.gz %if %{separate_biarch} -%files d%{separate_biarch_suffix} +%files %{d_package_name_option} %{d_package}%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib libgphobos.a %versbiarchlib libgphobos.so @@ -2800,7 +2814,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff # GCC-TESTSUITE-DELETE-END %if 0%{?run_tests:1} -%files -n gcc@base_ver@-testresults +%files -n %{obs_package}@base_ver@-testresults %defattr(-,root,root) %doc testresults/test_summary.txt %doc testresults/*.sum --- gcc11-testresults.spec.orig +++ gcc11-testresults.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc11-testresults +# spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -18,6 +18,20 @@ %define building_testsuite 1 %define run_tests 1 +Source1000: generate_cross_specs_11 +%define obs_package gcc +%define obs_package_base_ver 11%define obs_build_lang_options 1 +%define build_cp 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_nvptx 0 +%define build_gcn 0 +%define enable_plugins 1 +%define build_jit 1 +%define build_ada 0 +%define build_d 0 # # spec file for package gcc${version} # @@ -59,13 +73,6 @@ %define ada_arch %ix86 x86_64 ppc s390 ia64 %endif -%ifarch %ada_arch -%define build_ada 1 -%else -%define build_ada 0 -%endif - -%define quadmath_arch %ix86 x86_64 ia64 ppc64le %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 %define hwasan_arch aarch64 @@ -77,22 +84,19 @@ %define vtv_arch x86_64 %ix86 %endif +%if 0%{!?obs_build_lang_options:1} +%define build_ada 0 %define build_cp 1 -%define build_fortran 1 -%define build_objc 1 -%define build_objcp 1 -%define build_go 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 %ifarch x86_64 %ix86 %arm aarch64 riscv64 s390x %define build_d 1 %else %define build_d 0 %endif -%if %{build_objcp} -%define build_cp 1 -%define build_objc 1 -%endif - # For optional compilers only build C, C++, Fortran, Ada and Go %if 0%{?build_optional_compiler_languages:1} %define build_objc 0 @@ -100,22 +104,18 @@ %define build_d 0 %endif -%ifarch x86_64 -%define build_nvptx 1 -%else +# not for bootstrap %define build_nvptx 0 -%endif - -%ifarch x86_64 -# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does -# technically also SLE12 SP5 but do not bother there -%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 -%define build_gcn 1 -%else %define build_gcn 0 + +%define enable_plugins 1 +%define build_jit 1 + %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -125,13 +125,11 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} -%define enable_plugins 1 -%define build_jit 1 +# quadmath will be built but unpackaged if fortran is not built +%if %{build_fortran} +%define quadmath_arch %ix86 x86_64 ia64 ppc64le %else -%define enable_plugins 0 -%define build_jit 0 +%define quadmath_arch NONE %endif # Shared library SONAME versions @@ -213,7 +211,29 @@ Release: 0 %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -11 -Name: gcc11-testresults +# in these cases we only want to build one language +%if "%{obs_package}" == "gnat" +%define build_ada 1 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_d 0 +%define build_jit 0 +%endif +%if "%{obs_package}" == "gdc" +%define build_d 1 +%define build_ada 0 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_jit 0 +%endif + +Name: %{obs_package}11-testresults BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -242,27 +262,12 @@ BuildRequires: systemtap-headers BuildRequires: isl-devel %endif %define hostsuffix %{nil} +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} +%endif %if %{build_ada} -%if 0%{?gcc_version:%{gcc_version}} > 11 -%define hostsuffix %{binsuffix} -BuildRequires: gcc11-ada -BuildRequires: gcc11-c++ -%else -%if %{suse_version} < 1310 -%define hostsuffix -4.8 -BuildRequires: gcc48-ada -BuildRequires: gcc48-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -286,6 +291,8 @@ BuildRequires: cross-nvptx-newlib11-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc11 BuildRequires: cross-amdgcn-newlib11-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -393,12 +400,11 @@ Summary: Testsuite results License: SUSE-Public-Domain Group: Development/Languages/C and C++ -%description +%description -n %{obs_package}11-testresults Results from running the gcc and target library testsuites. - # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple # %%cross_arch is supposed to be the rpm target variant arch @@ -616,8 +622,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -660,11 +666,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -873,6 +875,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -917,7 +922,7 @@ chmod 644 ../testresults/* %endif %if 0%{?run_tests:1} -%files +%files -n %{obs_package}11-testresults %defattr(-,root,root) %doc testresults/test_summary.txt %doc testresults/*.sum --- gcc11.spec.orig +++ gcc11.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc11 +# spec file # -# Copyright (c) 2022 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -16,6 +16,39 @@ # +Source1000: generate_cross_specs_11 +%define obs_package gcc +%define obs_package_base_ver 11%define obs_build_lang_options 1 +%define build_cp 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_nvptx 0 +%define build_gcn 0 +%define enable_plugins 1 +%define build_jit 1 +%define build_ada 0 +%define build_d 0 +# +# spec file for package gcc${version} +# +# Copyright (c) 2021 SUSE LLC +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via https://bugs.opensuse.org/ +# + +# nospeccleaner + %if !0%{?usrmerged} %define _slibdir /%{_lib} %define slibdir /lib @@ -38,13 +71,6 @@ %define ada_arch %ix86 x86_64 ppc s390 ia64 %endif -%ifarch %ada_arch -%define build_ada 1 -%else -%define build_ada 0 -%endif - -%define quadmath_arch %ix86 x86_64 ia64 ppc64le %define tsan_arch x86_64 aarch64 ppc ppc64 ppc64le %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 %define hwasan_arch aarch64 @@ -56,22 +82,19 @@ %define vtv_arch x86_64 %ix86 %endif +%if 0%{!?obs_build_lang_options:1} +%define build_ada 0 %define build_cp 1 -%define build_fortran 1 -%define build_objc 1 -%define build_objcp 1 -%define build_go 1 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 %ifarch x86_64 %ix86 %arm aarch64 riscv64 s390x %define build_d 1 %else %define build_d 0 %endif -%if %{build_objcp} -%define build_cp 1 -%define build_objc 1 -%endif - # For optional compilers only build C, C++, Fortran, Ada and Go %if 0%{?build_optional_compiler_languages:1} %define build_objc 0 @@ -79,22 +102,18 @@ %define build_d 0 %endif -%ifarch x86_64 -%define build_nvptx 1 -%else +# not for bootstrap %define build_nvptx 0 -%endif - -%ifarch x86_64 -# SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does -# technically also SLE12 SP5 but do not bother there -%if %{suse_version} >= 1550 || 0%{?sle_version:%sle_version} >= 150100 -%define build_gcn 1 -%else %define build_gcn 0 + +%define enable_plugins 1 +%define build_jit 1 + %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -104,13 +123,11 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} -%define enable_plugins 1 -%define build_jit 1 +# quadmath will be built but unpackaged if fortran is not built +%if %{build_fortran} +%define quadmath_arch %ix86 x86_64 ia64 ppc64le %else -%define enable_plugins 0 -%define build_jit 0 +%define quadmath_arch NONE %endif # Shared library SONAME versions @@ -192,7 +209,29 @@ Release: 0 %define gcc_snapshot_revision %(echo %version | sed 's/[3-9]\.[0-9]\.[0-6]//' | sed 's/+/-/') %define binsuffix -11 -Name: gcc11 +# in these cases we only want to build one language +%if "%{obs_package}" == "gnat" +%define build_ada 1 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_d 0 +%define build_jit 0 +%endif +%if "%{obs_package}" == "gdc" +%define build_d 1 +%define build_ada 0 +%define build_cp 0 +%define build_fortran 0 +%define build_objc 0 +%define build_objcp 0 +%define build_go 0 +%define build_jit 0 +%endif + +Name: %{obs_package}11 BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -221,27 +260,12 @@ BuildRequires: systemtap-headers BuildRequires: isl-devel %endif %define hostsuffix %{nil} +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} +%endif %if %{build_ada} -%if 0%{?gcc_version:%{gcc_version}} > 11 -%define hostsuffix %{binsuffix} -BuildRequires: gcc11-ada -BuildRequires: gcc11-c++ -%else -%if %{suse_version} < 1310 -%define hostsuffix -4.8 -BuildRequires: gcc48-ada -BuildRequires: gcc48-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ -%endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference BuildRequires: doxygen @@ -265,6 +289,8 @@ BuildRequires: cross-nvptx-newlib11-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc11 BuildRequires: cross-amdgcn-newlib11-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -369,6 +395,7 @@ Patch61: gcc44-rename-info-files. Patch100: newlib-4.1.0-aligned_alloc.patch License: GPL-3.0-or-later +%if "%{obs_package}" == "gcc" Summary: The GNU C Compiler and Support Files %description @@ -377,8 +404,14 @@ 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. +%else +Summary: %{obs_package}11 -%package -n gcc11-32bit +%description +Dummy package for bootstrapping one of the optional gcc languages - %{obs_package} +%endif + +%package -n %{obs_package}11-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ Requires: gcc11 = %{version}-%{release} @@ -401,10 +434,10 @@ Requires: libvtv%{libvtv_sover}-32 %endif Requires: glibc-devel-32bit -%description -n gcc11-32bit +%description -n %{obs_package}11-32bit This package contains 32bit support for the GNU Compiler Collection. -%package -n gcc11-64bit +%package -n %{obs_package}11-64bit Summary: The GNU C Compiler 64bit support Group: Development/Languages/C and C++ Requires: gcc11 = %{version}-%{release} @@ -436,7 +469,7 @@ Requires: libvtv%{libvtv_sover}-64 %endif Requires: glibc-devel-64bit -%description -n gcc11-64bit +%description -n %{obs_package}11-64bit This package contains 64bit support for the GNU Compiler Collection. %package devel @@ -953,7 +986,17 @@ Group: Development/Languages/C This Package contains just the preprocessor that is used by the X11 packages. -%package ada + +# for bootstrapping Ada compiler separately +# has to be defined here for change_spec to process +%define ada_package ada +%define ada_package_name_option %{nil} +%if "%{obs_package}" == "gnat" +%define ada_package gcc11-ada +%define ada_package_name_option -n +%endif + +%package %{ada_package_name_option} %{ada_package} Summary: GNU Ada Compiler Based on GCC (GNAT) License: GPL-3.0-or-later Group: Development/Languages/Other @@ -961,11 +1004,19 @@ Requires: gcc11 = %{version}-%{rel Requires: gcc11-ada = %{version}-%{release} Requires: libada11 = %{version}-%{release} -%description ada +%description %{ada_package_name_option} %{ada_package} This package contains an Ada compiler and associated development tools based on the GNU GCC technology. +# for bootstrapping Ada compiler separately +# has to be defined here for change_spec to process -32bit +%define ada_package ada +%define ada_package_name_option %{nil} +%if "%{obs_package}" == "gnat" +%define ada_package gcc11-ada +%define ada_package_name_option -n +%endif -%package ada-32bit +%package %{ada_package_name_option} %{ada_package}-32bit Summary: GNU Ada Compiler Based on GCC (GNAT) License: GPL-3.0-or-later Group: Development/Languages/Other @@ -973,11 +1024,19 @@ Requires: gcc11-32bit = %{version} Requires: gcc11-ada = %{version}-%{release} Requires: libada11-32bit = %{version}-%{release} -%description ada-32bit +%description %{ada_package_name_option} %{ada_package}-32bit This package contains an Ada compiler and associated development tools based on the GNU GCC technology. +# for bootstrapping Ada compiler separately +# has to be defined here for change_spec to process -64bit +%define ada_package ada +%define ada_package_name_option %{nil} +%if "%{obs_package}" == "gnat" +%define ada_package gcc11-ada +%define ada_package_name_option -n +%endif -%package ada-64bit +%package %{ada_package_name_option} %{ada_package}-64bit Summary: GNU Ada Compiler Based on GCC (GNAT) License: GPL-3.0-or-later Group: Development/Languages/Other @@ -985,7 +1044,7 @@ Requires: gcc11-64bit = %{version} Requires: gcc11-ada = %{version}-%{release} Requires: libada11-64bit = %{version}-%{release} -%description ada-64bit +%description %{ada_package_name_option} %{ada_package}-64bit This package contains an Ada compiler and associated development tools based on the GNU GCC technology. @@ -1708,7 +1767,17 @@ Runtime library for the GNU Go language. %postun -n libgo%{libgo_sover}%{libgo_suffix}-64bit -p /sbin/ldconfig -%package d +# for bootstrapping D compiler separately +# has to be defined here for change_spec to process +%define d_package d +%define d_package_name_option %{nil} + +%if "%{obs_package}" == "gdc" +%define d_package gcc11-d +%define d_package_name_option -n +%endif + +%package %{d_package_name_option} %{d_package} Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -1717,11 +1786,20 @@ Requires: gcc11-d = %{version}-%{r Requires: libgdruntime%{libgdruntime_sover} >= %{version}-%{release} Requires: libgphobos%{libgphobos_sover} >= %{version}-%{release} -%description d +%description %{d_package_name_option} %{d_package} This package contains a D compiler and associated development files based on the GNU GCC technology. +# for bootstrapping D compiler separately +# has to be defined here for change_spec to process -32bit +%define d_package d +%define d_package_name_option %{nil} -%package d-32bit +%if "%{obs_package}" == "gdc" +%define d_package gcc11-d +%define d_package_name_option -n +%endif + +%package %{d_package_name_option} %{d_package}-32bit Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -1730,11 +1808,20 @@ Requires: gcc11-d = %{version}-%{r Requires: libgdruntime%{libgdruntime_sover}-32bit >= %{version}-%{release} Requires: libgphobos%{libgphobos_sover}-32bit >= %{version}-%{release} -%description d-32bit +%description %{d_package_name_option} %{d_package}-32bit This package contains a D compiler and associated development files based on the GNU GCC technology. +# for bootstrapping D compiler separately +# has to be defined here for change_spec to process -64bit +%define d_package d +%define d_package_name_option %{nil} + +%if "%{obs_package}" == "gdc" +%define d_package gcc11-d +%define d_package_name_option -n +%endif -%package d-64bit +%package %{d_package_name_option} %{d_package}-64bit Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -1743,7 +1830,7 @@ Requires: gcc11-d = %{version}-%{r Requires: libgdruntime%{libgdruntime_sover}-64bit >= %{version}-%{release} Requires: libgphobos%{libgphobos_sover}-64bit >= %{version}-%{release} -%description d-64bit +%description %{d_package_name_option} %{d_package}-64bit This package contains a D compiler and associated development files based on the GNU GCC technology. @@ -1873,17 +1960,16 @@ Requires: libgccjit%{libgccjit_sov %description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} Package contains header files and documentation for GCC JIT front-end. -%package -n gcc11-testresults +%package -n %{obs_package}11-testresults Summary: Testsuite results License: SUSE-Public-Domain Group: Development/Languages/C and C++ -%description -n gcc11-testresults +%description -n %{obs_package}11-testresults Results from running the gcc and target library testsuites. - # Define the canonical target and host architecture # %%gcc_target_arch is supposed to be the full target triple # %%cross_arch is supposed to be the rpm target variant arch @@ -2101,8 +2187,8 @@ cp -a /usr/bin/gnatmake%{hostsuffix} hos cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind %endif -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +cp -a /usr/bin/%{repo_cc} host-tools/bin/gcc +cp -a /usr/bin/%{repo_cxx} host-tools/bin/g++ ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif @@ -2145,11 +2231,7 @@ amdgcn-amdhsa,\ %if 0%{!?build_libvtv:1} --disable-libvtv \ %endif -%if 0%{suse_version} >= 1500 - --enable-cet=auto \ -%else --disable-cet \ -%endif --disable-libcc1 \ %if %{enable_plugins} --enable-plugin \ @@ -2358,6 +2440,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -3025,7 +3110,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/lto-dump%{binsuffix}.1.gz %if %{separate_biarch} -%files -n gcc11%{separate_biarch_suffix} +%files -n %{obs_package}11%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib *crt*.o %versbiarchlib libgcc*.a @@ -3437,7 +3522,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %if %{build_ada} -%files ada +%files %{ada_package_name_option} %{ada_package} %defattr(-,root,root) %dir %{_libdir}/gcc %dir %{_libdir}/gcc/%{GCCDIST} @@ -3453,7 +3538,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %{versmainlibdir}/ada_target_properties %if %{separate_biarch} -%files ada%{separate_biarch_suffix} +%files %{ada_package_name_option} %{ada_package}%{separate_biarch_suffix} %defattr(-,root,root) %dir %{versmainlibdirbi}/adalib %{versmainlibdirbi}/adainclude @@ -3521,7 +3606,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %if %{build_d} -%files d +%files %{d_package_name_option} %{d_package} %defattr(-,root,root) %{_prefix}/bin/gdc%{binsuffix} %{libsubdir}/d21 @@ -3534,7 +3619,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/gdc%{binsuffix}.1.gz %if %{separate_biarch} -%files d%{separate_biarch_suffix} +%files %{d_package_name_option} %{d_package}%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib libgphobos.a %versbiarchlib libgphobos.so @@ -3579,7 +3664,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %if 0%{?run_tests:1} -%files -n gcc11-testresults +%files -n %{obs_package}11-testresults %defattr(-,root,root) %doc testresults/test_summary.txt %doc testresults/*.sum --- pre_checkin.sh.orig +++ pre_checkin.sh @@ -1,6 +1,10 @@ #!/bin/bash # This script is called automatically during autobuild checkin. +export obs_package=$(osc meta pkg | xml sel -t -v "//package/@name") +export obs_project=$(osc meta pkg | xml sel -t -v "//package/@project") +export base_pkg="$(echo -n ${obs_package} | sed -re 's/[0-9]+$//g' )" +export base_proj="$(echo -n ${obs_project} | sed -re 's/[^:]+://g' )" case $0 in \./*) here=$PWD @@ -12,20 +16,25 @@ case $0 in here=$PWD ;; esac +export base_ver=unknown case ${here##*/} in - gcc*.*) + ${base_pkg}*.*) # Handle maintainance projects with .$REPO suffix suffix=${here##*/} suffix=${suffix%%\.*} - set ${suffix#gcc} + export base_ver=${suffix#${base_pkg}} + set $base_ver ;; - gcc-*) - suffix=${here##*/} - set ${suffix#*-}- - ;; - gcc[0-9]*) - suffix=${here##*/} - set ${suffix#gcc} + ${base_pkg}-*) + suffix=${here##*/} + export base_ver=${suffix#*-}- + set $base_ver + ;; + ${base_pkg}[0-9]*) + suffix=${here##*/} + export base_ver=${suffix#${base_pkg}} + set $base_ver ;; esac + . ${here}/change_spec
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor