Blame SPECS/gcc-libraries.spec

999445
%global DATE 20170829
999445
%global SVNREV 251415
999445
%global gcc_version 7.2.1
999445
%global gcc_major 7
999445
# Note, gcc_release must be integer, if you want to add suffixes to
999445
# %{release}, append them after %{gcc_release} on Release: line.
999445
%global gcc_release 1
999445
%global mpc_version 0.8.1
999445
%global _unpackaged_files_terminate_build 0
999445
%global multilib_64_archs sparc64 ppc64 s390x x86_64
999445
%ifarch s390x
999445
%global multilib_32_arch s390
999445
%endif
999445
%ifarch sparc64
999445
%global multilib_32_arch sparcv9
999445
%endif
999445
%ifarch ppc64
999445
%global multilib_32_arch ppc
999445
%endif
999445
%ifarch x86_64
999445
%global multilib_32_arch i686
999445
%endif
999445
%ifarch %{ix86} x86_64 ia64
999445
%global build_libquadmath 1
999445
%else
999445
%global build_libquadmath 0
999445
%endif
999445
%ifarch %{ix86} x86_64
999445
%global build_libcilkrts 1
999445
%else
999445
%global build_libcilkrts 0
999445
%endif
999445
%ifarch aarch64
999445
%if 0%{?rhel} >= 7
999445
%global build_libatomic 1
999445
%else
999445
%global build_libatomic 0
999445
%endif
999445
%endif
999445
%ifnarch aarch64
999445
%if 0%{?rhel} >= 7
999445
%global build_libatomic 0
999445
%else
999445
%global build_libatomic 1
999445
%endif
999445
%endif
999445
%if 0%{?rhel} >= 7
999445
%global build_libitm 0
999445
%else
999445
%global build_libitm 1
999445
%endif
999445
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64 %{mips}
999445
%global attr_ifunc 1
999445
%else
999445
%global attr_ifunc 0
999445
%endif
999445
Summary: GCC runtime libraries
999445
Name: gcc-libraries
999445
Provides: libatomic libitm libcilkrts libgfortran4
999445
Obsoletes: libitm
999445
999445
Version: %{gcc_version}
c80ea0
Release: %{gcc_release}.2.1%{?dist}
999445
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
999445
# GCC Runtime Exception.
999445
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
999445
Group: System Environment/Libraries
999445
# The source for this package was pulled from upstream's vcs.  Use the
999445
# following commands to generate the tarball:
999445
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-7-branch@%{SVNREV} gcc-%{version}-%{DATE}
999445
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
999445
Source0: gcc-%{version}-%{DATE}.tar.bz2
999445
Source1: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
999445
URL: http://gcc.gnu.org
999445
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
999445
# Need binutils with -pie support >= 2.14.90.0.4-4
999445
# Need binutils which can omit dot symbols and overlap .opd on ppc64 >= 2.15.91.0.2-4
999445
# Need binutils which handle -msecure-plt on ppc >= 2.16.91.0.2-2
999445
# Need binutils which support .weakref >= 2.16.91.0.3-1
999445
# Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7
999445
# Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
999445
# Need binutils which support --build-id >= 2.17.50.0.17-3
999445
# Need binutils which support %gnu_unique_object >= 2.19.51.0.14
999445
# Need binutils which support .cfi_sections >= 2.19.51.0.14-33
999445
# Need binutils which support --no-add-needed >= 2.20.51.0.2-12
999445
# Need binutils which support -plugin
999445
BuildRequires: binutils >= 2.24
999445
# While gcc doesn't include statically linked binaries, during testing
999445
# -static is used several times.
999445
BuildRequires: glibc-static
999445
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
999445
BuildRequires: /usr/bin/pod2man
999445
%if 0%{?rhel} >= 7
999445
BuildRequires: texinfo-tex
999445
%endif
999445
# For VTA guality testing
999445
BuildRequires: gdb
999445
# Make sure pthread.h doesn't contain __thread tokens
999445
# Make sure glibc supports stack protector
999445
# Make sure glibc supports DT_GNU_HASH
999445
BuildRequires: glibc-devel >= 2.4.90-13
999445
BuildRequires: elfutils-devel >= 0.147
999445
BuildRequires: elfutils-libelf-devel >= 0.147
999445
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
999445
# Make sure glibc supports TFmode long double
999445
BuildRequires: glibc >= 2.3.90-35
999445
%endif
999445
%ifarch %{multilib_64_archs} sparcv9 ppc
999445
# Ensure glibc{,-devel} is installed for both multilib arches
999445
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
999445
%endif
999445
%ifarch ia64
999445
BuildRequires: libunwind >= 0.98
999445
%endif
999445
# Need .eh_frame ld optimizations
999445
# Need proper visibility support
999445
# Need -pie support
999445
# Need --as-needed/--no-as-needed support
999445
# On ppc64, need omit dot symbols support and --non-overlapping-opd
999445
# Need binutils that owns /usr/bin/c++filt
999445
# Need binutils that support .weakref
999445
# Need binutils that supports --hash-style=gnu
999445
# Need binutils that support mffgpr/mftgpr
999445
# Need binutils that support --build-id
999445
# Need binutils that support %gnu_unique_object
999445
# Need binutils that support .cfi_sections
999445
# Need binutils that support --no-add-needed
999445
# Need binutils that support -plugin
999445
Requires: binutils >= 2.24
999445
# Make sure gdb will understand DW_FORM_strp
999445
Conflicts: gdb < 5.1-2
999445
Requires: glibc-devel >= 2.2.90-12
999445
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
999445
# Make sure glibc supports TFmode long double
999445
Requires: glibc >= 2.3.90-35
999445
%endif
999445
Requires: libgcc >= 4.1.2-43
999445
Requires: libgomp >= 4.4.4-13
999445
BuildRequires: gmp-devel >= 4.1.2-8
999445
BuildRequires: mpfr-devel >= 2.2.1
999445
%if 0%{?rhel} >= 7
999445
BuildRequires: libmpc-devel >= 0.8.1
999445
%endif
999445
Requires(post): /sbin/install-info
999445
Requires(preun): /sbin/install-info
999445
ExclusiveArch: %{ix86} x86_64 ppc ppc64 ppc64le s390 s390x aarch64
999445
999445
%global oformat %{nil}
999445
%global oformat2 %{nil}
999445
%ifarch %{ix86}
999445
%global oformat OUTPUT_FORMAT(elf32-i386)
999445
%endif
999445
%ifarch x86_64
999445
%global oformat OUTPUT_FORMAT(elf64-x86-64)
999445
%global oformat2 OUTPUT_FORMAT(elf32-i386)
999445
%endif
999445
%ifarch ppc
999445
%global oformat OUTPUT_FORMAT(elf32-powerpc)
999445
%global oformat2 OUTPUT_FORMAT(elf64-powerpc)
999445
%endif
999445
%ifarch ppc64
999445
%global oformat OUTPUT_FORMAT(elf64-powerpc)
999445
%global oformat2 OUTPUT_FORMAT(elf32-powerpc)
999445
%endif
999445
%ifarch s390
999445
%global oformat OUTPUT_FORMAT(elf32-s390)
999445
%endif
999445
%ifarch s390x
999445
%global oformat OUTPUT_FORMAT(elf64-s390)
999445
%global oformat2 OUTPUT_FORMAT(elf32-s390)
999445
%endif
999445
%ifarch ia64
999445
%global oformat OUTPUT_FORMAT(elf64-ia64-little)
999445
%endif
999445
%ifarch ppc64le
999445
%global oformat OUTPUT_FORMAT(elf64-powerpcle)
999445
%endif
999445
999445
Patch0: gcc7-hack.patch
999445
Patch1: gcc7-ppc32-retaddr.patch
999445
Patch2: gcc7-i386-libgomp.patch
999445
Patch3: gcc7-sparc-config-detection.patch
999445
Patch4: gcc7-libgomp-omp_h-multilib.patch
999445
Patch5: gcc7-libtool-no-rpath.patch
999445
Patch6: gcc7-isl-dl.patch
999445
Patch7: gcc7-libstdc++-docs.patch
999445
Patch8: gcc7-no-add-needed.patch
999445
Patch9: gcc7-aarch64-async-unw-tables.patch
999445
Patch10: gcc7-foffload-default.patch
999445
Patch11: gcc7-Wno-format-security.patch
999445
999445
Patch1002: gcc7-alt-compat-test.patch
999445
Patch1005: gcc7-rh1118870.patch
999445
Patch1100: gcc7-htm-in-asm.patch
999445
c80ea0
# Support for more DEC extensions in libgfortran runtime
c80ea0
# BZ1554429
c80ea0
Patch2000: 0000-infrastructure.patch
c80ea0
Patch2001: 0022-Default-values-for-certain-field-descriptors-in-form.patch
c80ea0
999445
%if 0%{?rhel} >= 7
999445
%global nonsharedver 48
999445
%else
999445
%global nonsharedver 44
999445
%endif
999445
999445
%global _gnu %{nil}
999445
%ifarch sparcv9
999445
%global gcc_target_platform sparc64-%{_vendor}-%{_target_os}%{?_gnu}
999445
%endif
999445
%ifarch ppc
999445
%global gcc_target_platform ppc64-%{_vendor}-%{_target_os}%{?_gnu}
999445
%endif
999445
%ifnarch sparcv9 ppc
999445
%global gcc_target_platform %{_target_platform}
999445
%endif
999445
999445
%description
999445
This package contains various GCC runtime libraries, such as libatomic,
999445
or libitm.
999445
999445
%package -n libitm
999445
Summary: The GNU Transactional Memory library
999445
Group: System Environment/Libraries
999445
Requires(post): /sbin/install-info
999445
Requires(preun): /sbin/install-info
999445
999445
%description -n libitm
999445
This package contains the GNU Transactional Memory library
999445
which is a GCC transactional memory support runtime library.
999445
999445
%package -n libatomic
999445
Summary: The GNU Atomic library
999445
Group: System Environment/Libraries
999445
Requires(post): /sbin/install-info
999445
Requires(preun): /sbin/install-info
999445
999445
%description -n libatomic
999445
This package contains the GNU Atomic library
999445
which is a GCC support runtime library for atomic operations not supported
999445
by hardware.
999445
999445
%package -n libcilkrts
999445
Summary: The Cilk+ runtime library
999445
Group: System Environment/Libraries
999445
Requires(post): /sbin/install-info
999445
Requires(preun): /sbin/install-info
999445
999445
%description -n libcilkrts
999445
This package contains the Cilk+ runtime library.
999445
999445
%package -n libmpx
999445
Summary: The Memory Protection Extensions runtime libraries
999445
Group: System Environment/Libraries
999445
Requires(post): /sbin/install-info
999445
Requires(preun): /sbin/install-info
999445
999445
%description -n libmpx
999445
This package contains the Memory Protection Extensions runtime libraries
999445
which is used for -fcheck-pointer-bounds -mmpx instrumented programs.
999445
999445
%package -n libgfortran4
999445
Summary: Fortran runtime
999445
Group: System Environment/Libraries
999445
Autoreq: true
999445
%if %{build_libquadmath}
999445
Requires: libquadmath
999445
%endif
999445
%if "%{version}" != "%{gcc_version}"
999445
Provides: libgfortran = %{gcc_provides}
999445
%endif
999445
999445
%description -n libgfortran4
999445
This package contains Fortran shared library which is needed to run
999445
Fortran dynamically linked programs.
999445
999445
%prep
999445
%if 0%{?rhel} >= 7
999445
%setup -q -n gcc-%{version}-%{DATE}
999445
%else
999445
%setup -q -n gcc-%{version}-%{DATE} -a 1
999445
%endif
999445
%patch0 -p0 -b .hack~
999445
%patch1 -p0 -b .ppc32-retaddr~
999445
%patch2 -p0 -b .i386-libgomp~
999445
%patch3 -p0 -b .sparc-config-detection~
999445
%patch4 -p0 -b .libgomp-omp_h-multilib~
999445
%patch5 -p0 -b .libtool-no-rpath~
999445
%patch8 -p0 -b .no-add-needed~
999445
%patch9 -p0 -b .aarch64-async-unw-tables~
999445
%patch10 -p0 -b .foffload-default~
999445
%patch11 -p0 -b .Wno-format-security~
999445
999445
sed -i -e 's/ -Wl,-z,nodlopen//g' gcc/ada/gcc-interface/Makefile.in
999445
999445
%ifarch %{ix86} x86_64
999445
%if 0%{?rhel} < 7
999445
# On i?86/x86_64 there are some incompatibilities in _Decimal* as well as
999445
# aggregates containing larger vector passing.
999445
%patch1002 -p0 -b .alt-compat-test~
999445
%endif
999445
%endif
999445
999445
%patch1005 -p0 -b .rh1118870~
999445
%patch1100 -p0 -b .gcc6-htm-in-asm~
999445
c80ea0
%patch2000 -p1 -b .dec-extensions~
c80ea0
%patch2001 -p1 -b .dec-extensions-2~
c80ea0
999445
%if 0%{?rhel} == 6
999445
# Default to -gdwarf-3 rather than -gdwarf-4
999445
sed -i '/UInteger Var(dwarf_version)/s/Init(4)/Init(3)/' gcc/common.opt
999445
sed -i 's/\(may be either 2, 3 or 4; the default version is \)4\./\13./' gcc/doc/invoke.texi
999445
%endif
999445
999445
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
999445
cp -a libstdc++-v3/config/cpu/i{4,3}86/opt
999445
999445
./contrib/gcc_update --touch
999445
999445
LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi
999445
999445
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
999445
999445
%ifarch ppc
999445
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
999445
  mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
999445
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{,64/}baseline_symbols.txt
999445
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{32/,}baseline_symbols.txt
999445
  rm -rf libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32
999445
fi
999445
%endif
999445
%build
999445
999445
# Undo the broken autoconf change in recent Fedora versions
999445
export CONFIG_SITE=NONE
999445
999445
rm -fr obj-%{gcc_target_platform}
999445
mkdir obj-%{gcc_target_platform}
999445
cd obj-%{gcc_target_platform}
999445
999445
999445
%if 0%{?rhel} < 7
999445
mkdir mpc mpc-install
999445
cd mpc
999445
../../mpc-%{mpc_version}/configure --disable-shared \
999445
  CFLAGS="${CFLAGS:-%optflags} -fPIC" CXXFLAGS="${CXXFLAGS:-%optflags} -fPIC" \
999445
  --prefix=`cd ..; pwd`/mpc-install
999445
make %{?_smp_mflags}
999445
make install
999445
cd ..
999445
%endif
999445
999445
CC=gcc
999445
CXX=g++
999445
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
999445
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
999445
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
999445
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
999445
%ifarch sparc
999445
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
999445
%endif
999445
%ifarch %{ix86}
999445
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
999445
%endif
999445
%ifarch sparc64
999445
cat > gcc64 <<"EOF"
999445
#!/bin/sh
999445
exec /usr/bin/gcc -m64 "$@"
999445
EOF
999445
chmod +x gcc64
999445
CC=`pwd`/gcc64
999445
cat > g++64 <<"EOF"
999445
#!/bin/sh
999445
exec /usr/bin/g++ -m64 "$@"
999445
EOF
999445
chmod +x g++64
999445
CXX=`pwd`/g++64
999445
%endif
999445
%ifarch ppc64 ppc64le ppc64p7
999445
if gcc -m64 -xc -S /dev/null -o - > /dev/null 2>&1; then
999445
  cat > gcc64 <<"EOF"
999445
#!/bin/sh
999445
exec /usr/bin/gcc -m64 "$@"
999445
EOF
999445
  chmod +x gcc64
999445
  CC=`pwd`/gcc64
999445
  cat > g++64 <<"EOF"
999445
#!/bin/sh
999445
exec /usr/bin/g++ -m64 "$@"
999445
EOF
999445
  chmod +x g++64
999445
  CXX=`pwd`/g++64
999445
fi
999445
%endif
999445
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`
999445
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
999445
	CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g'`" \
999445
	XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
999445
	GCJFLAGS="$OPT_FLAGS" \
999445
	../configure --prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
999445
	--with-bugurl=http://bugzilla.redhat.com/bugzilla --enable-bootstrap \
999445
	--enable-shared --enable-threads=posix --enable-checking=release \
999445
	--enable-multilib --disable-libsanitizer \
999445
	--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
999445
	--enable-gnu-unique-object \
999445
	--enable-linker-build-id \
999445
	--enable-languages=c,c++,lto,fortran \
999445
	--enable-plugin --with-linker-hash-style=gnu \
999445
%if 0%{?rhel} >= 7
999445
	--enable-initfini-array \
999445
%else
999445
	--disable-initfini-array \
999445
%endif
999445
	--disable-libgcj \
999445
	--without-ppl --without-cloog \
999445
%if 0%{?rhel} < 7
999445
	--with-mpc=`pwd`/mpc-install \
999445
%endif
999445
%if 0%{?rhel} >= 7
999445
%if %{attr_ifunc}
999445
        --enable-gnu-indirect-function \
999445
%endif
999445
%endif
999445
%ifarch %{arm}
999445
	--disable-sjlj-exceptions \
999445
%endif
999445
%ifarch ppc ppc64 ppc64le ppc64p7
999445
	--enable-secureplt \
999445
%endif
999445
%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64le ppc64p7 s390 s390x alpha
999445
	--with-long-double-128 \
999445
%endif
999445
%ifarch sparc
999445
	--disable-linux-futex \
999445
%endif
999445
%ifarch sparc64
999445
	--with-cpu=ultrasparc \
999445
%endif
999445
%ifarch sparc sparcv9
999445
	--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
999445
%endif
999445
%ifarch ppc ppc64 ppc64le ppc64p7
999445
%if 0%{?rhel} >= 7
999445
	--with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \
999445
%else
999445
	--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
999445
%endif
999445
%endif
999445
%ifarch ppc
999445
	--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
999445
%endif
999445
%ifarch %{ix86} x86_64
999445
	--with-tune=generic \
999445
%endif
999445
%ifarch %{ix86}
999445
	--with-arch=i686 \
999445
%endif
999445
%ifarch x86_64
999445
	--with-arch_32=i686 \
999445
%endif
999445
%ifarch s390 s390x
999445
	--with-arch=z9-109 --with-tune=z10 --enable-decimal-float \
999445
%endif
999445
%ifnarch sparc sparcv9 ppc
999445
	--build=%{gcc_target_platform}
999445
%endif
999445
999445
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS"
999445
999445
# Copy various doc files here and there
999445
cd ..
999445
mkdir -p rpm.doc/gfortran rpm.doc/libatomic rpm.doc/libitm rpm.doc/libcilkrts rpm.doc/libmpx
999445
999445
(cd libgfortran; for i in ChangeLog*; do
999445
	cp -p $i ../rpm.doc/gfortran/$i.libgfortran
999445
done)
999445
999445
%if %{build_libitm}
999445
(cd libitm; for i in ChangeLog*; do
999445
	cp -p $i ../rpm.doc/libitm/$i.libitm
999445
done)
999445
%endif
999445
999445
%if %{build_libatomic}
999445
(cd libatomic; for i in ChangeLog*; do
999445
	cp -p $i ../rpm.doc/libatomic/$i.libatomic
999445
done)
999445
%endif
999445
999445
%if %{build_libcilkrts}
999445
(cd libcilkrts; for i in ChangeLog*; do
999445
	cp -p $i ../rpm.doc/libcilkrts/$i.libcilkrts
999445
done)
999445
%endif
999445
999445
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
999445
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
999445
999445
%install
999445
rm -fr %{buildroot}
999445
999445
cd obj-%{gcc_target_platform}
999445
999445
# Make sure libcilkrts can use system libgcc_s.so.1.
999445
rm -f gcc/libgcc_s.so
999445
echo '/* GNU ld script
999445
   Use the shared library, but some functions are only in
999445
   the static library, so try that secondarily.  */
999445
%{oformat}
999445
GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > gcc/libgcc_s.so
999445
999445
mkdir -p %{buildroot}%{_prefix}/%{_lib}
999445
mkdir -p %{buildroot}%{_infodir}
999445
999445
# Use make install DESTDIR trick to avoid bogus RPATHs.
999445
%if %{build_libitm}
999445
cd %{gcc_target_platform}/libitm/
999445
mkdir temp
999445
make install DESTDIR=`pwd`/temp
999445
cp -a temp/usr/%{_lib}/libitm.so.1* %{buildroot}%{_prefix}/%{_lib}/
999445
cp -a libitm.info %{buildroot}%{_infodir}/
999445
cd ../..
999445
%endif
999445
999445
%if %{build_libatomic}
999445
cd %{gcc_target_platform}/libatomic/
999445
mkdir temp
999445
make install DESTDIR=`pwd`/temp
999445
cp -a temp/usr/%{_lib}/libatomic.so.1* %{buildroot}%{_prefix}/%{_lib}/
999445
cd ../..
999445
%endif
999445
999445
%if %{build_libcilkrts}
999445
cd %{gcc_target_platform}/libcilkrts/
999445
mkdir temp
999445
make install DESTDIR=`pwd`/temp
999445
cp -a temp/usr/%{_lib}/libcilkrts.so.5* %{buildroot}%{_prefix}/%{_lib}/
999445
cd ../..
999445
%endif
999445
999445
%if %{build_libquadmath}
999445
cd %{gcc_target_platform}/libquadmath/
999445
mkdir temp
999445
make install DESTDIR=`pwd`/temp
999445
cp -a temp/usr/%{_lib}/libquadmath.so.0* %{buildroot}%{_prefix}/%{_lib}/
999445
cd ../..
999445
%endif
999445
999445
cd %{gcc_target_platform}/libgfortran/
999445
mkdir temp
999445
%if %{build_libquadmath}
999445
# It needs to find libquadmath.so.
999445
export LIBRARY_PATH=`pwd`/../../%{gcc_target_platform}/libquadmath/temp/usr/%{_lib}
999445
%endif
999445
make install DESTDIR=`pwd`/temp
999445
cp -a temp/usr/%{_lib}/libgfortran.so.4* %{buildroot}%{_prefix}/%{_lib}/
999445
cd ../..
999445
999445
999445
# Remove binaries we will not be including, so that they don't end up in
999445
# gcc-libraries-debuginfo.
999445
%if 0%{?rhel} >= 7
999445
rm -f %{buildroot}%{_prefix}/%{_lib}/libquadmath.so*
999445
%endif
999445
999445
rm -f gcc/libgcc_s.so
999445
ln -sf libgcc_s.so.1 gcc/libgcc_s.so
999445
999445
%check
999445
cd obj-%{gcc_target_platform}
999445
999445
# run the tests.
999445
%ifnarch ppc64le
999445
make %{?_smp_mflags} -k check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
999445
%else
999445
make %{?_smp_mflags} -k check || :
999445
%endif
999445
( LC_ALL=C ../contrib/test_summary -t || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' > testresults
999445
echo ====================TESTING=========================
999445
cat testresults
999445
echo ====================TESTING END=====================
999445
mkdir testlogs-%{_target_platform}-%{version}-%{release}
999445
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
999445
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || :
999445
done
999445
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \
999445
  | uuencode testlogs-%{_target_platform}.tar.bz2 || :
999445
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
999445
999445
%clean
999445
rm -rf %{buildroot}
999445
999445
%post -n libitm
999445
/sbin/ldconfig
999445
if [ -f %{_infodir}/libitm.info.gz ]; then
999445
  /sbin/install-info \
999445
    --info-dir=%{_infodir} %{_infodir}/libitm.info.gz || :
999445
fi
999445
999445
%post -n libatomic
999445
/sbin/ldconfig
999445
if [ -f %{_infodir}/libatomic.info.gz ]; then
999445
  /sbin/install-info \
999445
    --info-dir=%{_infodir} %{_infodir}/libatomic.info.gz || :
999445
fi
999445
999445
%post -n libcilkrts
999445
/sbin/ldconfig
999445
if [ -f %{_infodir}/libcilkrts.info.gz ]; then
999445
  /sbin/install-info \
999445
    --info-dir=%{_infodir} %{_infodir}/libcilkrts.info.gz || :
999445
fi
999445
999445
%post -n libgfortran4
999445
/sbin/ldconfig
999445
if [ -f %{_infodir}/libgfortran.info.gz ]; then
999445
  /sbin/install-info \
999445
    --info-dir=%{_infodir} %{_infodir}/libgfortran.info.gz || :
999445
fi
999445
999445
%post -n libmpx -p /sbin/ldconfig
999445
999445
%preun -n libitm
999445
if [ $1 = 0 -a -f %{_infodir}/libitm.info.gz ]; then
999445
  /sbin/install-info --delete \
999445
    --info-dir=%{_infodir} %{_infodir}/libitm.info.gz || :
999445
fi
999445
999445
%preun -n libatomic
999445
if [ $1 = 0 -a -f %{_infodir}/libatomic.info.gz ]; then
999445
  /sbin/install-info --delete \
999445
    --info-dir=%{_infodir} %{_infodir}/libatomic.info.gz || :
999445
fi
999445
999445
%preun -n libgfortran4
999445
if [ $1 = 0 -a -f %{_infodir}/libgfortran.info.gz ]; then
999445
  /sbin/install-info --delete \
999445
    --info-dir=%{_infodir} %{_infodir}/libgfortran.info.gz || :
999445
fi
999445
999445
%preun -n libcilkrts
999445
if [ $1 = 0 -a -f %{_infodir}/libcilkrts.info.gz ]; then
999445
  /sbin/install-info --delete \
999445
    --info-dir=%{_infodir} %{_infodir}/libcilkrts.info.gz || :
999445
fi
999445
999445
%postun -n libitm -p /sbin/ldconfig
999445
999445
%postun -n libatomic -p /sbin/ldconfig
999445
999445
%postun -n libcilkrts -p /sbin/ldconfig
999445
999445
%postun -n libgfortran4 -p /sbin/ldconfig
999445
999445
%postun -n libmpx -p /sbin/ldconfig
999445
999445
%if %{build_libitm}
999445
%files -n libitm
999445
%defattr(-,root,root,-)
999445
%{_prefix}/%{_lib}/libitm.so.1*
999445
%{_infodir}/libitm.info*
999445
999445
%doc gcc/COPYING3 COPYING.RUNTIME rpm.doc/libitm/*
999445
%endif
999445
999445
%if %{build_libatomic}
999445
%files -n libatomic
999445
%defattr(-,root,root,-)
999445
%{_prefix}/%{_lib}/libatomic.so.1*
999445
999445
%doc gcc/COPYING3 COPYING.RUNTIME rpm.doc/libatomic/*
999445
%endif
999445
999445
%if %{build_libcilkrts}
999445
%files -n libcilkrts
999445
%defattr(-,root,root,-)
999445
%{_prefix}/%{_lib}/libcilkrts.so.5*
999445
999445
%doc gcc/COPYING3 COPYING.RUNTIME rpm.doc/libcilkrts/*
999445
%endif
999445
999445
%files -n libgfortran4
999445
%defattr(-,root,root,-)
999445
%{_prefix}/%{_lib}/libgfortran.so.4*
999445
999445
%doc gcc/COPYING3 COPYING.RUNTIME rpm.doc/gfortran/*
999445
999445
%changelog
c80ea0
* Thu Apr  5 2018 Marek Polacek <polacek@redhat.com> 7.2.1-1.2.1
c80ea0
- Add support for DEC formatting extensions (#1564043)
c80ea0
999445
* Thu Oct 19 2017 Marek Polacek <polacek@redhat.com> 7.2.1-1.1.1
999445
- update from gcc-7.2.1-1 (#1477224)
999445
999445
* Tue Jun 20 2017 Marek Polacek <polacek@redhat.com> 7.1.1-2.2.1
999445
- don't run make check with -fstack-protector on ppc64le
999445
999445
* Thu Jun 15 2017 Marek Polacek <polacek@redhat.com> 7.1.1-2.1.1
999445
- bump gcc_release (DTS7 gcc-gfortran requires libgfortran4 >= 7.1.1-2)
999445
999445
* Mon Jun 12 2017 Marek Polacek <polacek@redhat.com> 7.1.1-1.2.1
999445
- remove libquadmath.so.* so that it doesn't end up in debuginfo
999445
999445
* Mon Jun  5 2017 Marek Polacek <polacek@redhat.com> 7.1.1-1.1.1
999445
- rename libgfortran2 to libgfortran4
999445
- update from Fedora gcc-7.1.1-2.fc27
999445
 
999445
* Wed May 24 2017 Marek Polacek <polacek@redhat.com> 7.0.1-4.2.1
999445
- also build on ppc64le
999445
999445
* Mon Mar 20 2017 Marek Polacek <polacek@redhat.com> 7.0.1-4.1.1
999445
- also build on aarch64
999445
- drop libitm
999445
- only enable libatomic for aarch64
999445
999445
* Fri Mar 17 2017 Marek Polacek <polacek@redhat.com> 7.0.1-3.1.1
999445
- drop libquadmath and rename libgfortran to libgfortran2
999445
999445
* Wed Mar 15 2017 Marek Polacek <polacek@redhat.com> 7.0.1-2.1.1
999445
- also include the libquadmath subpackage
999445
999445
* Tue Mar 14 2017 Marek Polacek <polacek@redhat.com> 7.0.1-1.1.1
999445
- update from Fedora 7.0.1-0.12.fc26 (#1412815)
999445
- add the libgfortran subpackage
999445
999445
* Wed Oct 19 2016 Marek Polacek <polacek@redhat.com> 6.2.1-1.1.1
999445
- update from DTS 6.2.1 (#1265255)
999445
999445
* Tue Oct 18 2016 Marek Polacek <polacek@redhat.com> 5.3.1-1.1.1
999445
- update from DTS 5.3.1 (#1265255)
999445
- run the whole testsuite (because of Cilk+)
999445
999445
* Tue Dec 15 2015 Marek Polacek <polacek@redhat.com> 5.2.1-2.1.1
999445
- update from DTS 5.2.1-2 (#1265253)
999445
- drop libmpx (#1275357)
999445
999445
* Fri Apr 10 2015 Marek Polacek <polacek@redhat.com> 5.0.0-1.1.1
999445
- update from Fedora gcc-5.0.0-0.21.fc22
999445
- add libmpx subpackage on x86
999445
999445
* Mon Jun 02 2014 Marek Polacek <polacek@redhat.com> 4.9.0-6.1.1
999445
- make sure libcilkrts can use system libgcc_s.so.1 (#1101277)
999445
- update from DTS gcc-4.9.0-6
999445
999445
* Fri May 23 2014 Marek Polacek <polacek@redhat.com> 4.9.0-5.2.1
999445
- prevent bogus RPATHs
999445
999445
* Wed May 14 2014 Marek Polacek <polacek@redhat.com> 4.9.0-5.1.1
999445
- update from DTS gcc-4.9.0-5
999445
- add libcilkrts
999445
999445
* Mon Apr 28 2014 Marek Polacek <polacek@redhat.com> 4.8.2-12.1.1
999445
- update from DTS gcc-4.8.2-12
999445
999445
* Wed Aug 14 2013 Marek Polacek <polacek@redhat.com> 4.8.1-4.2.1
999445
- always build HTM bits in libitm (#996683, #996682)
999445
999445
* Fri Jul 19 2013 Marek Polacek <polacek@redhat.com> 4.8.1-4.1.1
999445
- update from DTS gcc-4.8.1-4
999445
999445
* Wed May 29 2013 Marek Polacek <polacek@redhat.com> 4.8.0-5.1.1
999445
- update from DTS gcc-4.8.0-5
999445
- build libitm even for s390{,x}
999445
999445
* Thu May 02 2013 Marek Polacek <polacek@redhat.com> 4.8.0-3.1.1
999445
- new package