# Copyright Verizon Media. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. # Force special prefix for Vespa %define _prefix /opt/vespa-deps # Only strip debug info %global _find_debuginfo_opts -g # Version %define ver_major 10 %define ver_minor 2 %define ver_patch 0 %define ver_release 7 Summary : gcc compiled for vespa Name : vespa-gcc Version : %{ver_major}.%{ver_minor}.%{ver_patch} Release : %{ver_release}%{?dist} Group : Development/Tools License : GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD URL : http://gcc.gnu.org Source0 : ftp://ftp.nluug.nl/mirror/languages/gcc/releases/gcc-10.2.0/gcc-10.2.0.tar.gz %if 0%{?el7} %define _devtoolset_enable /opt/rh/devtoolset-9/enable BuildRequires: devtoolset-9-gcc %endif %if 0%{?el8} %define _devtoolset_enable /opt/rh/gcc-toolset-9/enable BuildRequires: gcc-toolset-9-gcc %endif %if 0%{?fedora} BuildRequires: gcc %endif BuildRequires: bison BuildRequires: flex BuildRequires: gawk BuildRequires: gettext BuildRequires: libzstd-devel BuildRequires: m4 BuildRequires: make BuildRequires: texinfo BuildRequires: vespa-dwz BuildRequires: vespa-gmp BuildRequires: vespa-libmpc BuildRequires: vespa-mpfr BuildRequires: zlib-devel Requires: vespa-binutils Requires: vespa-dwz Requires: vespa-gmp Requires: vespa-libmpc Requires: vespa-mpfr %description gcc compiled for vespa Contains the GNU Compiler Collection version 10. %prep %setup -q -n gcc-%{version} %build %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export PATH=%{_prefix}/bin:$PATH export LD_RUN_PATH=%{_libdir} export LIBTOOLFLAGS='--silent' CFLAGS='-O3 -g' ./configure --enable-linker-build-id --with-gmp-include=%{_prefix}/include --with-gmp-lib=%{_libdir} --prefix=%{_prefix} --libdir=%{_libdir} --disable-multilib make %{?_smp_mflags} %install %if 0%{?_devtoolset_enable:1} source %{_devtoolset_enable} || true %endif export PATH=%{_prefix}/bin:$PATH export LD_RUN_PATH=%{_libdir} make install DESTDIR=$RPM_BUILD_ROOT rm -f $RPM_BUILD_ROOT%{_infodir}/dir %files %{_prefix} %changelog