Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:owinebar:Staging:gcc10-bootstrap
gcc10
project.diff
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File project.diff of Package gcc10
--- 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,52 +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_cross cross-aarch64-gcc$base_ver aarch64 aarch64-suse-linux %define gcc_icecream 1 -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-i386-gcc$base_ver i386 i586-suse-linux %define gcc_icecream 1 -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_cross cross-riscv64-gcc$base_ver riscv64 riscv64-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 -osc service localrun format_spec_file +echo '</multibuild>' >> _multibuild -exit 0 +osc service localrun format_spec_file --- cross-arm-none-gcc10-bootstrap.spec.orig +++ cross-arm-none-gcc10-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 @@ -187,6 +187,9 @@ BuildRequires: cross-%{binutils_target} Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -226,13 +229,12 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} -Requires: lld11 -Requires: llvm11 +Requires: lld +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 @@ -369,6 +371,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -389,21 +394,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -425,6 +433,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -433,11 +444,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 \ @@ -644,6 +651,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} --- cross-avr-gcc10-bootstrap.spec.orig +++ cross-avr-gcc10-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,6 +186,9 @@ BuildRequires: cross-%{binutils_target} Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -225,13 +228,12 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} -Requires: lld11 -Requires: llvm11 +Requires: lld +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 @@ -368,6 +370,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -388,21 +393,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -424,6 +432,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -432,11 +443,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 \ @@ -643,6 +650,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} --- cross-epiphany-gcc10-bootstrap.spec.orig +++ cross-epiphany-gcc10-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 @@ -187,6 +187,9 @@ BuildRequires: cross-%{binutils_target} Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -226,13 +229,12 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} -Requires: lld11 -Requires: llvm11 +Requires: lld +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 @@ -369,6 +371,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -389,21 +394,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -425,6 +433,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -433,11 +444,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 \ @@ -644,6 +651,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} --- cross-riscv64-elf-gcc10-bootstrap.spec.orig +++ cross-riscv64-elf-gcc10-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 @@ -187,6 +187,9 @@ BuildRequires: cross-%{binutils_target} Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -226,13 +229,12 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} -Requires: lld11 -Requires: llvm11 +Requires: lld +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 @@ -369,6 +371,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -389,21 +394,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -425,6 +433,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -433,11 +444,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 \ @@ -644,6 +651,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} --- cross-rx-gcc10-bootstrap.spec.orig +++ cross-rx-gcc10-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 @@ -187,6 +187,9 @@ BuildRequires: cross-%{binutils_target} Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -226,13 +229,12 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} -Requires: lld11 -Requires: llvm11 +Requires: lld +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 @@ -369,6 +371,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -389,21 +394,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -425,6 +433,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -433,11 +444,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 \ @@ -644,6 +651,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} --- cross.spec.in.orig +++ cross.spec.in @@ -97,6 +97,9 @@ BuildRequires: cross-%{binutils_target}- Requires: cross-%{binutils_target}-binutils %endif %endif +%if 0%{?repocc_version} +%define hostsuffix -%{repocc} +%endif BuildRequires: gcc-c++ %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -136,12 +139,11 @@ ExclusiveArch: x86_64 %define nvptx_newlib 1 %endif %if "%{cross_arch}" == "amdgcn" -# amdgcn uses the llvm assembler and linker, llvm12 doesn't -# work at the moment -BuildRequires: llvm11 -BuildRequires: lld11 -Requires: llvm11 -Requires: lld11 +# amdgcn uses the llvm assembler and linker +BuildRequires: llvm +BuildRequires: lld +Requires: llvm +Requires: lld Requires: cross-amdgcn-newlib-devel >= %{version}-%{release} # SLE12 does not fulfil build requirements for GCN, SLE15 SP1 does # technically also SLE12 SP5 but do not bother there --- gcc.spec.in.orig +++ gcc.spec.in @@ -27,25 +27,6 @@ %define slibdir64 %{_prefix}/lib64 %endif -# Ada currently fails to build on a few platforms, enable it only -# on those that work -%if %{suse_version} >= 1310 -%if %{suse_version} >= 1330 -%define ada_arch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64 -%else -%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64 -%endif -%else -%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 itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc @@ -56,22 +37,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 +57,14 @@ %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 %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -104,11 +74,16 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} +%if 0%{!?obs_build_lang_options:1} %define enable_plugins 1 +%define build_jit 1 +%endif + +# 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 quadmath_arch NONE %endif # Shared library SONAME versions @@ -136,6 +111,7 @@ %define libgo_sover 16 %define libgphobos_sover 1 %define libgdruntime_sover 1 +%define libgccjit_sover 0 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -167,6 +143,7 @@ %define libgo_suffix %{plv libgo %{libgo_sover}} %define libgphobos_suffix %{plv libgphobos %{libgphobos_sover}} %define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}} +%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}} # libFOO-devel package suffix @@ -180,7 +157,29 @@ %endif -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 @@ -208,21 +207,12 @@ BuildRequires: systemtap-headers %if %{suse_version} >= 1230 BuildRequires: isl-devel %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 +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} %endif +%if %{build_ada} +BuildRequires: gcc-ada %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -243,6 +233,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 @@ -351,6 +343,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 @@ -359,10 +352,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} @@ -385,10 +381,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} @@ -417,7 +413,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. @@ -457,6 +453,7 @@ Independend Executable (PIE) variant. Th space randomization (ASLR). + # PACKAGE-BEGIN %package c++@variant@ Summary: The GNU C++ Compiler @@ -660,7 +657,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 @@ -668,7 +673,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 @@ -931,7 +936,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 @@ -940,7 +954,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 @@ -982,12 +996,43 @@ Runtime library for the GNU D language. # PACKAGE-END -%package -n gcc@base_ver@-testresults +%package -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Summary: The GNU Compiler Collection JIT library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: %selfconflict libgccjit%{libgccjit_sover} +Requires: gcc@base_ver@ + +%description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Support for embedding GCC inside programs and libraries + +%post -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%postun -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%package -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Summary: Support for embedding GCC inside programs and libraries +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover}-devel = %{version}-%{release} +# Only one gccjit package can be installed at the same time since +# header files conflict +Conflicts: %selfconflict libgccjit%{libgccjit_sover}-devel +Requires: libgccjit%{libgccjit_sover}%{libgccjit_suffix} + +%description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Package contains header files and documentation for GCC JIT front-end. + + +%package -n %{obs_package}@base_ver@-testresults # GCC-TESTSUITE-DELETE-END Summary: Testsuite results License: SUSE-Public-Domain -%description -n gcc@base_ver@-testresults +%description -n %{obs_package}@base_ver@-testresults Results from running the gcc and target library testsuites. @@ -1177,6 +1222,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -1197,21 +1245,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -1233,6 +1284,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -1241,11 +1295,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 \ @@ -1452,6 +1502,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} @@ -1737,7 +1790,12 @@ chmod 644 ../testresults/* %endif # GCC-TESTSUITE-DELETE-BEGIN # Remove files that we do not need to clean up filelist + +# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver +mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot} rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/ + rm -rf %{buildroot}/%{libsubdir}/install-tools rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h @@ -1859,6 +1917,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %endif %{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{_prefix}/bin/gcov%{binsuffix} %{_prefix}/bin/gcov-dump%{binsuffix} %{_prefix}/bin/gcov-tool%{binsuffix} @@ -2093,7 +2152,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 @@ -2513,7 +2572,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} @@ -2529,7 +2588,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 @@ -2597,7 +2656,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 @@ -2610,7 +2669,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 @@ -2639,10 +2698,25 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %biarchlib libgdruntime.so.%{libgdruntime_sover}* %endif %endif + +%if %{build_jit} +%files -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +%defattr(-,root,root) +%{_prefix}/%{_lib}/libgccjit.so.%{libgccjit_sover}* + +%files -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +%defattr(-,root,root) +%doc gcc/jit/docs/examples +%{_prefix}/%{_lib}/libgccjit.so +%{_prefix}/include/libgccjit.h +%{_prefix}/include/libgccjit++.h +%{_infodir}/libgccjit.info.gz +%endif + # 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 --- gcc10-testresults.spec.orig +++ gcc10-testresults.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc10-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_10 +%define obs_package gcc +%define obs_package_base_ver 10%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} # @@ -47,25 +61,6 @@ %define slibdir64 %{_prefix}/lib64 %endif -# Ada currently fails to build on a few platforms, enable it only -# on those that work -%if %{suse_version} >= 1310 -%if %{suse_version} >= 1330 -%define ada_arch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64 -%else -%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64 -%endif -%else -%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 itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc @@ -76,22 +71,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 @@ -99,22 +91,14 @@ %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 %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -124,11 +108,16 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} +%if 0%{!?obs_build_lang_options:1} %define enable_plugins 1 +%define build_jit 1 +%endif + +# 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 quadmath_arch NONE %endif # Shared library SONAME versions @@ -156,6 +145,7 @@ %define libgo_sover 16 %define libgphobos_sover 1 %define libgdruntime_sover 1 +%define libgccjit_sover 0 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -187,6 +177,7 @@ %define libgo_suffix %{plv libgo %{libgo_sover}} %define libgphobos_suffix %{plv libgphobos %{libgphobos_sover}} %define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}} +%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}} # libFOO-devel package suffix %define libdevel_suffix -gcc10 @@ -197,7 +188,29 @@ %define selfconflict() otherproviders(%1) %endif -Name: gcc10-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}10-testresults BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -225,21 +238,12 @@ BuildRequires: systemtap-headers %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif -%if %{build_ada} -%if 0%{?gcc_version:%{gcc_version}} > 10 -%define hostsuffix %{binsuffix} -BuildRequires: gcc10-ada -BuildRequires: gcc10-c++ -%else -%if %{suse_version} < 1310 -%define hostsuffix -4.8 -BuildRequires: gcc48-ada -BuildRequires: gcc48-c++ -%else %define hostsuffix %{nil} -BuildRequires: gcc-ada -%endif +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} %endif +%if %{build_ada} +BuildRequires: gcc-ada %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -260,6 +264,8 @@ BuildRequires: cross-nvptx-newlib10-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc10 BuildRequires: cross-amdgcn-newlib10-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -366,7 +372,7 @@ Patch61: gcc44-rename-info-files. Summary: Testsuite results License: SUSE-Public-Domain -%description +%description -n %{obs_package}10-testresults Results from running the gcc and target library testsuites. @@ -549,6 +555,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -569,21 +578,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -605,6 +617,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -613,11 +628,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 \ @@ -824,6 +835,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} @@ -860,7 +874,7 @@ chmod 644 ../testresults/* %endif %if 0%{?run_tests:1} -%files +%files -n %{obs_package}10-testresults %defattr(-,root,root) %doc testresults/test_summary.txt %doc testresults/*.sum --- gcc10.spec.orig +++ gcc10.spec @@ -1,7 +1,7 @@ # -# spec file for package gcc10 +# 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_10 +%define obs_package gcc +%define obs_package_base_ver 10%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 @@ -26,25 +59,6 @@ %define slibdir64 %{_prefix}/lib64 %endif -# Ada currently fails to build on a few platforms, enable it only -# on those that work -%if %{suse_version} >= 1310 -%if %{suse_version} >= 1330 -%define ada_arch %ix86 x86_64 ppc ppc64 ppc64le s390 s390x ia64 aarch64 riscv64 -%else -%define ada_arch %ix86 x86_64 ppc ppc64 s390 ia64 -%endif -%else -%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 itm_arch x86_64 %ix86 %arm aarch64 ppc ppc64 ppc64le s390 s390x %sparc @@ -55,22 +69,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 @@ -78,22 +89,14 @@ %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 %endif -%else -%define build_gcn 0 + +%if %{build_objcp} +%define build_cp 1 +%define build_objc 1 %endif %define use_lto_bootstrap 0 @@ -103,11 +106,16 @@ %endif %endif -# Enable plugins just for Tumbleweed, not for SLES -%if 0%{!?sle_version:1} +%if 0%{!?obs_build_lang_options:1} %define enable_plugins 1 +%define build_jit 1 +%endif + +# 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 quadmath_arch NONE %endif # Shared library SONAME versions @@ -135,6 +143,7 @@ %define libgo_sover 16 %define libgphobos_sover 1 %define libgdruntime_sover 1 +%define libgccjit_sover 0 # Shared library package suffix # This is used for the "non-standard" set of libraries, the standard @@ -166,6 +175,7 @@ %define libgo_suffix %{plv libgo %{libgo_sover}} %define libgphobos_suffix %{plv libgphobos %{libgphobos_sover}} %define libgdruntime_suffix %{plv libgdruntime %{libgdruntime_sover}} +%define libgccjit_suffix %{plv libgccjit %{libgccjit_sover}} # libFOO-devel package suffix %define libdevel_suffix -gcc10 @@ -176,7 +186,29 @@ %define selfconflict() otherproviders(%1) %endif -Name: gcc10 +# 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}10 BuildRequires: xz %if %{suse_version} > 1500 BuildRequires: libzstd-devel @@ -204,21 +236,12 @@ BuildRequires: systemtap-headers %if %{suse_version} >= 1230 BuildRequires: isl-devel %endif -%if %{build_ada} -%if 0%{?gcc_version:%{gcc_version}} > 10 -%define hostsuffix %{binsuffix} -BuildRequires: gcc10-ada -BuildRequires: gcc10-c++ -%else -%if %{suse_version} < 1310 -%define hostsuffix -4.8 -BuildRequires: gcc48-ada -BuildRequires: gcc48-c++ -%else %define hostsuffix %{nil} -BuildRequires: gcc-ada -%endif +%if 0%{?repocc_version:1} +%define hostsuffix -%{repocc_version} %endif +%if %{build_ada} +BuildRequires: gcc-ada %endif %if 0%{?building_testsuite:1} # For building the libstdc++ API reference @@ -239,6 +262,8 @@ BuildRequires: cross-nvptx-newlib10-dev %if %{build_gcn} BuildRequires: cross-amdgcn-gcc10 BuildRequires: cross-amdgcn-newlib10-devel +BuildRequires: lld +BuildRequires: llvm %endif %endif #!BuildIgnore: gcc-PIE @@ -343,6 +368,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 @@ -351,8 +377,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}10 + +%description +Dummy package for bootstrapping one of the optional gcc languages - %{obs_package} +%endif -%package -n gcc10-32bit +%package -n %{obs_package}10-32bit Summary: The GNU C Compiler 32bit support Group: Development/Languages/C and C++ Requires: gcc10 = %{version}-%{release} @@ -375,10 +407,10 @@ Requires: libvtv%{libvtv_sover}-32 %endif Requires: glibc-devel-32bit -%description -n gcc10-32bit +%description -n %{obs_package}10-32bit This package contains 32bit support for the GNU Compiler Collection. -%package -n gcc10-64bit +%package -n %{obs_package}10-64bit Summary: The GNU C Compiler 64bit support Group: Development/Languages/C and C++ Requires: gcc10 = %{version}-%{release} @@ -407,7 +439,7 @@ Requires: libvtv%{libvtv_sover}-64 %endif Requires: glibc-devel-64bit -%description -n gcc10-64bit +%description -n %{obs_package}10-64bit This package contains 64bit support for the GNU Compiler Collection. %package devel @@ -909,7 +941,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 gcc10-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 @@ -917,11 +959,19 @@ Requires: gcc10 = %{version}-%{rel Requires: gcc10-ada = %{version}-%{release} Requires: libada10 = %{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 gcc10-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 @@ -929,11 +979,19 @@ Requires: gcc10-32bit = %{version} Requires: gcc10-ada = %{version}-%{release} Requires: libada10-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 gcc10-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 @@ -941,7 +999,7 @@ Requires: gcc10-64bit = %{version} Requires: gcc10-ada = %{version}-%{release} Requires: libada10-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. @@ -1613,7 +1671,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 gcc10-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 @@ -1622,11 +1690,20 @@ Requires: gcc10-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 gcc10-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 @@ -1635,11 +1712,20 @@ Requires: gcc10-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} -%package d-64bit +%if "%{obs_package}" == "gdc" +%define d_package gcc10-d +%define d_package_name_option -n +%endif + +%package %{d_package_name_option} %{d_package}-64bit Summary: GNU D Compiler License: GPL-3.0-or-later Group: Development/Languages/Other @@ -1648,7 +1734,7 @@ Requires: gcc10-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. @@ -1748,11 +1834,41 @@ Runtime library for the GNU D language. %postun -n libgdruntime%{libgdruntime_sover}%{libgdruntime_suffix}-64bit -p /sbin/ldconfig -%package -n gcc10-testresults +%package -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Summary: The GNU Compiler Collection JIT library +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover} = %{version}-%{release} +# Only one package may provide this - allows multiple gcc versions +# to co-exist without an overly large list of provides/obsoletes +Conflicts: %selfconflict libgccjit%{libgccjit_sover} +Requires: gcc10 + +%description -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +Support for embedding GCC inside programs and libraries + +%post -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%postun -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} -p /sbin/ldconfig + +%package -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Summary: Support for embedding GCC inside programs and libraries +License: GPL-3.0-or-later +Group: Development/Languages/C and C++ +Provides: libgccjit%{libgccjit_sover}-devel = %{version}-%{release} +# Only one gccjit package can be installed at the same time since +# header files conflict +Conflicts: %selfconflict libgccjit%{libgccjit_sover}-devel +Requires: libgccjit%{libgccjit_sover}%{libgccjit_suffix} + +%description -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +Package contains header files and documentation for GCC JIT front-end. + +%package -n %{obs_package}10-testresults Summary: Testsuite results License: SUSE-Public-Domain -%description -n gcc10-testresults +%description -n %{obs_package}10-testresults Results from running the gcc and target library testsuites. @@ -1935,6 +2051,9 @@ languages=$languages,go %if %{build_d} languages=$languages,d %endif +%if %{build_jit} +languages=$languages,jit +%endif # In general we want to ship release checking enabled compilers # which is the default for released compilers @@ -1955,21 +2074,24 @@ ln -s /usr/bin/llvm-ranlib target-tools/ export PATH="`pwd`/target-tools/bin:$PATH" %endif +%if "%{hostsuffix}" != "" +mkdir -p host-tools/bin %if %{build_ada} # Using the host gnatmake like # CC="gcc%%{hostsuffix}" GNATBIND="gnatbind%%{hostsuffix}" # GNATMAKE="gnatmake%%{hostsuffix}" # doesn't work due to PR33857, so an un-suffixed gnatmake has to be # available -mkdir -p host-tools/bin cp -a /usr/bin/gnatmake%{hostsuffix} host-tools/bin/gnatmake cp -a /usr/bin/gnatlink%{hostsuffix} host-tools/bin/gnatlink cp -a /usr/bin/gnatbind%{hostsuffix} host-tools/bin/gnatbind -cp -a /usr/bin/gcc%{hostsuffix} host-tools/bin/gcc -cp -a /usr/bin/g++%{hostsuffix} host-tools/bin/g++ +%endif +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 + CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" XCFLAGS="$RPM_OPT_FLAGS" \ TCFLAGS="$RPM_OPT_FLAGS" \ ../configure \ @@ -1991,6 +2113,9 @@ amdgcn-amdhsa,\ %if %{build_nvptx} --without-cuda-driver \ %endif +%if %{build_jit} + --enable-host-shared \ +%endif $ENABLE_CHECKING \ --disable-werror \ --with-gxx-include-dir=%{_prefix}/include/c++/%{gcc_dir_version} \ @@ -1999,11 +2124,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 \ @@ -2210,6 +2331,9 @@ amdgcn-amdhsa,\ %ifarch riscv64 --enable-link-mutex \ %endif +%ifnarch %{quadmath_arch} + --disable-libquadmath \ +%endif --build=%{GCCDIST} \ --host=%{GCCDIST} @@ -2490,7 +2614,12 @@ cp `find . -name "*.log" \! -name "conf chmod 644 ../testresults/* %endif # Remove files that we do not need to clean up filelist + +# Preserve %{GCCDIST}-gcc%{binsuffix} binary for libgccjit as it is used as a driver +mv %{buildroot}/%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{buildroot} rm -f %{buildroot}/%{_prefix}/bin/%{GCCDIST}-* +mv %{buildroot}/%{GCCDIST}-gcc%{binsuffix} %{buildroot}/%{_prefix}/bin/ + rm -rf %{buildroot}/%{libsubdir}/install-tools rm -f %{buildroot}/%{libsubdir}/include-fixed/zutil.h rm -f %{buildroot}/%{libsubdir}/include-fixed/linux/a.out.h @@ -2610,6 +2739,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %endif %{_prefix}/bin/gcc%{binsuffix} +%{_prefix}/bin/%{GCCDIST}-gcc%{binsuffix} %{_prefix}/bin/gcov%{binsuffix} %{_prefix}/bin/gcov-dump%{binsuffix} %{_prefix}/bin/gcov-tool%{binsuffix} @@ -2844,7 +2974,7 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %doc %{_mandir}/man1/lto-dump%{binsuffix}.1.gz %if %{separate_biarch} -%files -n gcc10%{separate_biarch_suffix} +%files -n %{obs_package}10%{separate_biarch_suffix} %defattr(-,root,root) %versbiarchlib *crt*.o %versbiarchlib libgcc*.a @@ -3251,7 +3381,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} @@ -3267,7 +3397,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 @@ -3335,7 +3465,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 @@ -3348,7 +3478,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 @@ -3378,8 +3508,22 @@ cat cpplib%{binsuffix}.lang gcc%{binsuff %endif %endif +%if %{build_jit} +%files -n libgccjit%{libgccjit_sover}%{libgccjit_suffix} +%defattr(-,root,root) +%{_prefix}/%{_lib}/libgccjit.so.%{libgccjit_sover}* + +%files -n libgccjit%{libgccjit_sover}-devel%{libdevel_suffix} +%defattr(-,root,root) +%doc gcc/jit/docs/examples +%{_prefix}/%{_lib}/libgccjit.so +%{_prefix}/include/libgccjit.h +%{_prefix}/include/libgccjit++.h +%{_infodir}/libgccjit.info.gz +%endif + %if 0%{?run_tests:1} -%files -n gcc10-testresults +%files -n %{obs_package}10-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