Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:owinebar:Staging:gcc12-bootstrap
gcc12
project.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File project.diff of Package gcc12
--- _multibuild.orig +++ _multibuild @@ -1,32 +1,12 @@ <multibuild> <flavor>gcc12-testresults</flavor> <flavor>cross-aarch64-gcc12-bootstrap</flavor> -<flavor>cross-aarch64-gcc12</flavor> <flavor>cross-riscv64-gcc12-bootstrap</flavor> -<flavor>cross-riscv64-gcc12</flavor> -<flavor>cross-arm-gcc12</flavor> -<flavor>cross-avr-gcc12-bootstrap</flavor> -<flavor>cross-avr-gcc12</flavor> -<flavor>cross-pru-gcc12-bootstrap</flavor> -<flavor>cross-pru-gcc12</flavor> -<flavor>cross-x86_64-gcc12</flavor> -<flavor>cross-s390x-gcc12</flavor> -<flavor>cross-sparc-gcc12</flavor> -<flavor>cross-sparc64-gcc12</flavor> -<flavor>cross-ppc64-gcc12</flavor> -<flavor>cross-ppc64le-gcc12</flavor> -<flavor>cross-m68k-gcc12</flavor> -<flavor>cross-mips-gcc12</flavor> -<flavor>cross-hppa-gcc12-bootstrap</flavor> -<flavor>cross-hppa-gcc12</flavor> <flavor>cross-arm-none-gcc12-bootstrap</flavor> -<flavor>cross-arm-none-gcc12</flavor> <flavor>cross-epiphany-gcc12-bootstrap</flavor> -<flavor>cross-epiphany-gcc12</flavor> <flavor>cross-riscv64-elf-gcc12-bootstrap</flavor> -<flavor>cross-riscv64-elf-gcc12</flavor> +<flavor>cross-pru-gcc12-bootstrap</flavor> <flavor>cross-rx-gcc12-bootstrap</flavor> -<flavor>cross-rx-gcc12</flavor> -<flavor>cross-nvptx-gcc12</flavor> -<flavor>cross-amdgcn-gcc12</flavor> +<flavor>cross-avr-gcc12-bootstrap</flavor> +<flavor>cross-hppa-gcc12-bootstrap</flavor> </multibuild> --- 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,15 +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 +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>'gcc$base_ver-testresults'</flavor>' >> _multibuild +echo '<flavor>'${base_pkg}$base_ver-testresults'</flavor>' >> _multibuild add_cross() { local pkgname="$1"; shift @@ -80,50 +185,43 @@ add_cross() { 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_newlib_cross cross-pru-gcc$base_ver pru pru -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-bootstrap hppa hppa-suse-linux %define gcc_libc_bootstrap 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 --- cross-aarch64-gcc12-bootstrap.spec.orig +++ cross-aarch64-gcc12-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 @@ -178,12 +178,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 @@ -228,17 +226,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -431,17 +419,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -481,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 \ @@ -698,6 +680,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-arm-none-gcc12-bootstrap.spec.orig +++ cross-arm-none-gcc12-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 @@ -179,12 +179,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 @@ -229,17 +227,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -432,17 +420,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -482,11 +468,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 \ @@ -699,6 +681,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-avr-gcc12-bootstrap.spec.orig +++ cross-avr-gcc12-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 @@ -178,12 +178,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 @@ -228,17 +226,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -431,17 +419,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -481,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 \ @@ -698,6 +680,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-epiphany-gcc12-bootstrap.spec.orig +++ cross-epiphany-gcc12-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 @@ -179,12 +179,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 @@ -229,17 +227,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -432,17 +420,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -482,11 +468,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 \ @@ -699,6 +681,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-hppa-gcc12-bootstrap.spec.orig +++ cross-hppa-gcc12-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 @@ -178,12 +178,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 @@ -228,17 +226,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -431,17 +419,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -481,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 \ @@ -698,6 +680,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-pru-gcc12-bootstrap.spec.orig +++ cross-pru-gcc12-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 @@ -179,12 +179,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 @@ -229,17 +227,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -432,17 +420,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -482,11 +468,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 \ @@ -699,6 +681,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-riscv64-elf-gcc12-bootstrap.spec.orig +++ cross-riscv64-elf-gcc12-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 @@ -179,12 +179,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 @@ -229,17 +227,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -432,17 +420,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -482,11 +468,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 \ @@ -699,6 +681,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-riscv64-gcc12-bootstrap.spec.orig +++ cross-riscv64-gcc12-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 @@ -178,12 +178,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 @@ -228,17 +226,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -431,17 +419,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -481,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 \ @@ -698,6 +680,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ --- cross-rx-gcc12-bootstrap.spec.orig +++ cross-rx-gcc12-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 @@ -179,12 +179,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 @@ -229,17 +227,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} Requires: lld # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does @@ -432,17 +420,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -482,11 +468,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 \ @@ -699,6 +681,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 @@ -85,12 +85,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 @@ -135,17 +133,7 @@ ExclusiveArch: x86_64 %endif %if "%{cross_arch}" == "amdgcn" # amdgcn uses the llvm assembler and linker -%if %{suse_version} < 1550 -BuildRequires: llvm11 -%else -BuildRequires: llvm -%endif -BuildRequires: lld -%if %{suse_version} < 1550 -Requires: llvm11 -%else Requires: llvm -%endif 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,7 @@ %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 s390 s390x %define asan_arch x86_64 %ix86 ppc ppc64 ppc64le s390 s390x %sparc %arm aarch64 riscv64 %define hwasan_arch aarch64 @@ -57,22 +51,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 +71,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 +92,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 +182,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,34 +233,17 @@ 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} <= 1315 -%define hostsuffix -7 -BuildRequires: gcc7-ada -BuildRequires: gcc7-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif %if %{build_d} %if %{suse_version} < 1550 -BuildRequires: gcc11-d -BuildRequires: libstdc++6-devel-gcc11 -%else -BuildRequires: gcc-d +BuildRequires: libstdc++6-devel %endif -%endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ +BuildRequires: gcc-d %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -278,6 +268,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 @@ -385,6 +377,7 @@ Patch61: gcc44-rename-info-files.patch # 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 @@ -393,10 +386,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} @@ -419,10 +415,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} @@ -454,7 +450,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. @@ -494,6 +490,7 @@ Independend Executable (PIE) variant. Th space randomization (ASLR). + # PACKAGE-BEGIN %package c++@variant@ Summary: The GNU C++ Compiler @@ -706,7 +703,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 @@ -714,7 +719,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 @@ -997,7 +1002,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 @@ -1006,7 +1020,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 @@ -1047,6 +1061,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 @@ -1077,17 +1092,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 @@ -1316,16 +1330,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment @@ -1366,11 +1379,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 \ @@ -1583,6 +1592,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -2263,7 +2275,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 @@ -2687,7 +2699,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} @@ -2703,7 +2715,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 @@ -2771,7 +2783,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 @@ -2784,7 +2796,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 @@ -2831,7 +2843,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 --- gcc12-testresults.spec.orig +++ gcc12-testresults.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc12-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_12 +%define obs_package gcc +%define obs_package_base_ver 12%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 s390 s390x %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 -12 -Name: gcc12-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}12-testresults BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -242,34 +262,17 @@ 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}} > 12 -%define hostsuffix %{binsuffix} -BuildRequires: gcc12-ada -BuildRequires: gcc12-c++ -%else -%if %{suse_version} <= 1315 -%define hostsuffix -7 -BuildRequires: gcc7-ada -BuildRequires: gcc7-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif %if %{build_d} %if %{suse_version} < 1550 -BuildRequires: gcc11-d -BuildRequires: libstdc++6-devel-gcc11 -%else -BuildRequires: gcc-d -%endif +BuildRequires: libstdc++6-devel %endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ +BuildRequires: gcc-d %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -294,6 +297,8 @@ BuildRequires: cross-nvptx-newlib12-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc12 BuildRequires: cross-amdgcn-newlib12-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -402,12 +407,11 @@ Summary: Testsuite results License: SUSE-Public-Domain Group: Development/Languages/C and C++ -%description +%description -n %{obs_package}12-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 @@ -629,17 +633,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -679,11 +681,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 \ @@ -896,6 +894,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -940,7 +941,7 @@ chmod 644 ../testresults/* %endif %if 0%{?run_tests:1} -%files +%files -n %{obs_package}12-testresults %defattr(-,root,root) %doc testresults/test_summary.txt %doc testresults/*.sum --- gcc12.spec.orig +++ gcc12.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc12 +# 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_12 +%define obs_package gcc +%define obs_package_base_ver 12%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 s390 s390x %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 -12 -Name: gcc12 +# 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}12 BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -221,34 +260,17 @@ 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}} > 12 -%define hostsuffix %{binsuffix} -BuildRequires: gcc12-ada -BuildRequires: gcc12-c++ -%else -%if %{suse_version} <= 1315 -%define hostsuffix -7 -BuildRequires: gcc7-ada -BuildRequires: gcc7-c++ -%else -%define hostsuffix %{nil} BuildRequires: gcc-ada %endif -%endif -%endif %if %{build_d} %if %{suse_version} < 1550 -BuildRequires: gcc11-d -BuildRequires: libstdc++6-devel-gcc11 -%else -BuildRequires: gcc-d -%endif +BuildRequires: libstdc++6-devel %endif -# We now require a C++ 11 capable compiler for bootstrapping -%if %{suse_version} < 1220 -%define hostsuffix -4.8 -BuildRequires: gcc48-c++ +BuildRequires: gcc-d %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -273,6 +295,8 @@ BuildRequires: cross-nvptx-newlib12-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc12 BuildRequires: cross-amdgcn-newlib12-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -378,6 +402,7 @@ Patch60: gcc44-textdomain.patch Patch61: gcc44-rename-info-files.patch License: GPL-3.0-or-later +%if "%{obs_package}" == "gcc" Summary: The GNU C Compiler and Support Files %description @@ -386,8 +411,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}12 + +%description +Dummy package for bootstrapping one of the optional gcc languages - %{obs_package} +%endif -%package -n gcc12-32bit +%package -n %{obs_package}12-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ Requires: gcc12 = %{version}-%{release} @@ -410,10 +441,10 @@ Requires: libvtv%{libvtv_sover}-32 %endif Requires: glibc-devel-32bit -%description -n gcc12-32bit +%description -n %{obs_package}12-32bit This package contains 32bit support for the GNU Compiler Collection. -%package -n gcc12-64bit +%package -n %{obs_package}12-64bit Summary: The GNU C Compiler 64bit support Group: Development/Languages/C and C++ Requires: gcc12 = %{version}-%{release} @@ -445,7 +476,7 @@ Requires: libvtv%{libvtv_sover}-64 %endif Requires: glibc-devel-64bit -%description -n gcc12-64bit +%description -n %{obs_package}12-64bit This package contains 64bit support for the GNU Compiler Collection. %package devel @@ -977,7 +1008,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 gcc12-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 @@ -985,11 +1026,19 @@ Requires: gcc12 = %{version}-%{rel Requires: gcc12-ada = %{version}-%{release} Requires: libada12 = %{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 gcc12-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 @@ -997,11 +1046,19 @@ Requires: gcc12-32bit = %{version} Requires: gcc12-ada = %{version}-%{release} Requires: libada12-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 gcc12-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 @@ -1009,7 +1066,7 @@ Requires: gcc12-64bit = %{version} Requires: gcc12-ada = %{version}-%{release} Requires: libada12-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. @@ -1732,7 +1789,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 gcc12-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 @@ -1741,11 +1808,20 @@ Requires: gcc12-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} + +%if "%{obs_package}" == "gdc" +%define d_package gcc12-d +%define d_package_name_option -n +%endif -%package d-32bit +%package %{d_package_name_option} %{d_package}-32bit Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -1754,11 +1830,20 @@ Requires: gcc12-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 gcc12-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 @@ -1767,7 +1852,7 @@ Requires: gcc12-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. @@ -1897,17 +1982,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 gcc12-testresults +%package -n %{obs_package}12-testresults Summary: Testsuite results License: SUSE-Public-Domain Group: Development/Languages/C and C++ -%description -n gcc12-testresults +%description -n %{obs_package}12-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 @@ -2129,17 +2213,15 @@ 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++ +%if %{build_d} +cp -a /usr/bin/%{repo_d} host-tools/bin/gdc +%endif ln -sf /usr/%{_lib} host-tools/%{_lib} export PATH="`pwd`/host-tools/bin:$PATH" %endif -%if %{build_d} && %{suse_version} < 1550 -# We are using gcc11-d to bootstrap d -export GDC=gdc-11 -%endif - # libsanitizer needs <crypt.h> and since the glibc/libxcrypt split # we don't have that yet in a pure cross environment %if 0%{?gcc_target_arch:1} @@ -2179,11 +2261,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 \ @@ -2396,6 +2474,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif $CONFARGS \ --build=%{GCCDIST} \ --host=%{GCCDIST} || \ @@ -3068,7 +3149,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/lto-dump%{binsuffix}.1.gz %if %{separate_biarch} -%files -n gcc12%{separate_biarch_suffix} +%files -n %{obs_package}12%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib *crt*.o %versbiarchlib libgcc*.a @@ -3480,7 +3561,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} @@ -3496,7 +3577,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 @@ -3564,7 +3645,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 @@ -3577,7 +3658,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 @@ -3622,7 +3703,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %if 0%{?run_tests:1} -%files -n gcc12-testresults +%files -n %{obs_package}12-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