Blame SPECS/compat-sap-c++-6.spec

7d9f3d
# SAP HACK: Start custom scl information for SAP build.
7d9f3d
%global scl 1
7d9f3d
%global scl_prefix compat-sap-
7d9f3d
%global _root_prefix /opt/rh/SAP
7d9f3d
%global _root_infodir %{_root_prefix}/%{_infodir}
7d9f3d
%global _root_mandir %{_root_prefix}/%{_mandir}
7d9f3d
# END SAP HACK.
7d9f3d
%{?scl:%global __strip strip}
7d9f3d
%{?scl:%global __objdump objdump}
7d9f3d
%global DATE 20170216
7d9f3d
%global SVNREV 245503
7d9f3d
%global gcc_version 6.3.1
7d9f3d
# Note, gcc_release must be integer, if you want to add suffixes to
7d9f3d
# %{release}, append them after %{gcc_release} on Release: line.
7d9f3d
%global gcc_release 1
7d9f3d
%global mpc_version 0.8.1
7d9f3d
%global _unpackaged_files_terminate_build 0
7d9f3d
%global multilib_64_archs sparc64 ppc64 s390x x86_64
7d9f3d
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64
7d9f3d
%global attr_ifunc 1
7d9f3d
%else
7d9f3d
%global attr_ifunc 0
7d9f3d
%endif
7d9f3d
%ifarch x86_64
7d9f3d
%global multilib_32_arch i686
7d9f3d
%endif
7d9f3d
Summary: C++ compatibility runtime library for SAP applications
7d9f3d
Name: %{?scl_prefix}c++-6
7d9f3d
ExclusiveArch: x86_64 ppc64le
7d9f3d
Version: %{gcc_version}
7d9f3d
Release: %{gcc_release}%{?dist}
7d9f3d
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
7d9f3d
# GCC Runtime Exception.
7d9f3d
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
7d9f3d
Group: Development/Languages
7d9f3d
# The source for this package was pulled from upstream's vcs.  Use the
7d9f3d
# following commands to generate the tarball:
7d9f3d
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-6-branch@%{SVNREV} gcc-%{version}-%{DATE}
7d9f3d
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
7d9f3d
Source0: gcc-%{version}-%{DATE}.tar.bz2
7d9f3d
Source1: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
7d9f3d
URL: http://gcc.gnu.org
7d9f3d
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
7d9f3d
# Need binutils with -pie support >= 2.14.90.0.4-4
7d9f3d
# Need binutils which can omit dot symbols and overlap .opd on ppc64 >= 2.15.91.0.2-4
7d9f3d
# Need binutils which handle -msecure-plt on ppc >= 2.16.91.0.2-2
7d9f3d
# Need binutils which support .weakref >= 2.16.91.0.3-1
7d9f3d
# Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7
7d9f3d
# Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
7d9f3d
# Need binutils which support --build-id >= 2.17.50.0.17-3
7d9f3d
# Need binutils which support %gnu_unique_object >= 2.19.51.0.14
7d9f3d
# Need binutils which support .cfi_sections >= 2.19.51.0.14-33
7d9f3d
BuildRequires: binutils >= 2.19.51.0.14-33
7d9f3d
# While gcc doesn't include statically linked binaries, during testing
7d9f3d
# -static is used several times.
7d9f3d
BuildRequires: glibc-static
7d9f3d
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
7d9f3d
#BuildRequires: systemtap-sdt-devel >= 1.3
7d9f3d
# For VTA guality testing
7d9f3d
BuildRequires: gdb
7d9f3d
# Make sure pthread.h doesn't contain __thread tokens
7d9f3d
# Make sure glibc supports stack protector
7d9f3d
# Make sure glibc supports DT_GNU_HASH
7d9f3d
BuildRequires: glibc-devel >= 2.4.90-13
7d9f3d
BuildRequires: elfutils-devel >= 0.147
7d9f3d
BuildRequires: elfutils-libelf-devel >= 0.147
7d9f3d
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
7d9f3d
# Make sure glibc supports TFmode long double
7d9f3d
BuildRequires: glibc >= 2.3.90-35
7d9f3d
%endif
7d9f3d
%ifarch %{multilib_64_archs} sparcv9 ppc
7d9f3d
# Ensure glibc{,-devel} is installed for both multilib arches
7d9f3d
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
7d9f3d
%endif
7d9f3d
# Need .eh_frame ld optimizations
7d9f3d
# Need proper visibility support
7d9f3d
# Need -pie support
7d9f3d
# Need --as-needed/--no-as-needed support
7d9f3d
# On ppc64, need omit dot symbols support and --non-overlapping-opd
7d9f3d
# Need binutils that owns /usr/bin/c++filt
7d9f3d
# Need binutils that support .weakref
7d9f3d
# Need binutils that supports --hash-style=gnu
7d9f3d
# Need binutils that support mffgpr/mftgpr
7d9f3d
# Need binutils which support --build-id >= 2.17.50.0.17-3
7d9f3d
# Need binutils which support %gnu_unique_object >= 2.19.51.0.14
7d9f3d
# Need binutils which support .cfi_sections >= 2.19.51.0.14-33
7d9f3d
Requires: binutils >= 2.19.51.0.14-33
7d9f3d
# Make sure gdb will understand DW_FORM_strp
7d9f3d
Conflicts: gdb < 5.1-2
7d9f3d
Requires: glibc-devel >= 2.2.90-12
7d9f3d
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
7d9f3d
# Make sure glibc supports TFmode long double
7d9f3d
Requires: glibc >= 2.3.90-35
7d9f3d
%endif
7d9f3d
Requires: libgcc >= 4.1.2-43
7d9f3d
Requires: libgomp >= 4.4.4-13
7d9f3d
BuildRequires: gmp-devel >= 4.1.2-8
7d9f3d
BuildRequires: mpfr-devel >= 2.2.1
7d9f3d
%if 0%{?rhel} >= 7
7d9f3d
BuildRequires: libmpc-devel >= 0.8.1
7d9f3d
%endif
7d9f3d
AutoReq: true
7d9f3d
AutoProv: false
7d9f3d
%ifarch sparc64 ppc64 ppc64le s390x x86_64 ia64
7d9f3d
Provides: liblto_plugin.so.0()(64bit)
7d9f3d
%else
7d9f3d
Provides: liblto_plugin.so.0
7d9f3d
%endif
7d9f3d
%global oformat %{nil}
7d9f3d
%global oformat2 %{nil}
7d9f3d
%ifarch %{ix86}
7d9f3d
%global oformat OUTPUT_FORMAT(elf32-i386)
7d9f3d
%endif
7d9f3d
%ifarch x86_64
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-x86-64)
7d9f3d
%global oformat2 OUTPUT_FORMAT(elf32-i386)
7d9f3d
%endif
7d9f3d
%ifarch ppc
7d9f3d
%global oformat OUTPUT_FORMAT(elf32-powerpc)
7d9f3d
%global oformat2 OUTPUT_FORMAT(elf64-powerpc)
7d9f3d
%endif
7d9f3d
%ifarch ppc64
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-powerpc)
7d9f3d
%global oformat2 OUTPUT_FORMAT(elf32-powerpc)
7d9f3d
%endif
7d9f3d
%ifarch s390
7d9f3d
%global oformat OUTPUT_FORMAT(elf32-s390)
7d9f3d
%endif
7d9f3d
%ifarch s390x
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-s390)
7d9f3d
%global oformat2 OUTPUT_FORMAT(elf32-s390)
7d9f3d
%endif
7d9f3d
%ifarch ia64
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-ia64-little)
7d9f3d
%endif
7d9f3d
%ifarch ppc64le
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-powerpcle)
7d9f3d
%endif
7d9f3d
%ifarch aarch64
7d9f3d
%global oformat OUTPUT_FORMAT(elf64-littleaarch64)
7d9f3d
%endif
7d9f3d
7d9f3d
Patch0: gcc6-hack.patch
7d9f3d
Patch1: gcc6-java-nomulti.patch
7d9f3d
Patch2: gcc6-ppc32-retaddr.patch
7d9f3d
Patch3: gcc6-rh330771.patch
7d9f3d
Patch4: gcc6-i386-libgomp.patch
7d9f3d
Patch5: gcc6-sparc-config-detection.patch
7d9f3d
Patch6: gcc6-libgomp-omp_h-multilib.patch
7d9f3d
Patch7: gcc6-libtool-no-rpath.patch
7d9f3d
Patch8: gcc6-isl-dl.patch
7d9f3d
Patch9: gcc6-libstdc++-docs.patch
7d9f3d
Patch10: gcc6-no-add-needed.patch
7d9f3d
Patch11: gcc6-libgo-p224.patch
7d9f3d
Patch12: gcc6-aarch64-async-unw-tables.patch
7d9f3d
Patch13: gcc6-libsanitize-aarch64-va42.patch
7d9f3d
7d9f3d
Patch1000: gcc6-libstdc++-compat.patch
7d9f3d
Patch1001: gcc6-libgfortran-compat.patch
7d9f3d
Patch1002: gcc6-alt-compat-test.patch
7d9f3d
Patch1003: gcc6-libquadmath-compat.patch
7d9f3d
Patch1004: gcc6-libstdc++44-xfail.patch
7d9f3d
Patch1005: gcc6-rh1118870.patch
7d9f3d
Patch1006: gcc6-isl-dl2.patch
7d9f3d
7d9f3d
%if 0%{?rhel} >= 7
7d9f3d
%global nonsharedver 48
7d9f3d
%else
7d9f3d
%global nonsharedver 44
7d9f3d
%endif
7d9f3d
7d9f3d
%if 0%{?scl:1}
7d9f3d
%global _gnu %{nil}
7d9f3d
%else
7d9f3d
%global _gnu 7E
7d9f3d
%endif
7d9f3d
%ifarch sparcv9
7d9f3d
%global gcc_target_platform sparc64-%{_vendor}-%{_target_os}%{?_gnu}
7d9f3d
%endif
7d9f3d
%ifarch ppc
7d9f3d
%global gcc_target_platform ppc64-%{_vendor}-%{_target_os}%{?_gnu}
7d9f3d
%endif
7d9f3d
%ifnarch sparcv9 ppc
7d9f3d
%global gcc_target_platform %{_target_platform}
7d9f3d
%endif
7d9f3d
7d9f3d
%description
7d9f3d
This package provides runtime compatibility libraries for use by SAP
7d9f3d
application binaries only.
7d9f3d
7d9f3d
%prep
7d9f3d
%setup -q -n gcc-%{version}-%{DATE} -a 1
7d9f3d
%patch0 -p0 -b .hack~
7d9f3d
%patch1 -p0 -b .java-nomulti~
7d9f3d
%patch2 -p0 -b .ppc32-retaddr~
7d9f3d
%patch3 -p0 -b .rh330771~
7d9f3d
%patch4 -p0 -b .i386-libgomp~
7d9f3d
%patch5 -p0 -b .sparc-config-detection~
7d9f3d
%patch6 -p0 -b .libgomp-omp_h-multilib~
7d9f3d
%patch7 -p0 -b .libtool-no-rpath~
7d9f3d
%patch10 -p0 -b .no-add-needed~
7d9f3d
%patch11 -p0 -b .libgo-p224~
7d9f3d
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
7d9f3d
%patch12 -p0 -b .aarch64-async-unw-tables~
7d9f3d
%patch13 -p0 -b .libsanitize-aarch64-va42~
7d9f3d
sed -i -e 's/ -Wl,-z,nodlopen//g' gcc/ada/gcc-interface/Makefile.in
7d9f3d
7d9f3d
%patch1000 -p0 -b .libstdc++-compat~
7d9f3d
%patch1001 -p0 -b .libgfortran-compat~
7d9f3d
%ifarch %{ix86} x86_64
7d9f3d
%if 0%{?rhel} < 7
7d9f3d
# On i?86/x86_64 there are some incompatibilities in _Decimal* as well as
7d9f3d
# aggregates containing larger vector passing.
7d9f3d
%patch1002 -p0 -b .alt-compat-test~
7d9f3d
%endif
7d9f3d
%endif
7d9f3d
%if 0%{?rhel} < 7
7d9f3d
%patch1003 -p0 -b .libquadmath-compat~
7d9f3d
%endif
7d9f3d
%if 0%{?rhel} == 6
7d9f3d
# Fix this up
7d9f3d
#%patch1004 -p0 -b .libstdc++44-xfail~
7d9f3d
%endif
7d9f3d
%patch1005 -p0 -b .rh1118870~
7d9f3d
7d9f3d
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
7d9f3d
7d9f3d
%if 0%{?rhel} == 6
7d9f3d
# Default to -gdwarf-3 rather than -gdwarf-4
7d9f3d
sed -i '/UInteger Var(dwarf_version)/s/Init(4)/Init(3)/' gcc/common.opt
7d9f3d
sed -i 's/\(may be either 2, 3 or 4; the default version is \)4\./\13./' gcc/doc/invoke.texi
7d9f3d
%endif
7d9f3d
7d9f3d
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
7d9f3d
cp -a libstdc++-v3/config/cpu/i{4,3}86/opt
7d9f3d
7d9f3d
./contrib/gcc_update --touch
7d9f3d
7d9f3d
LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi
7d9f3d
7d9f3d
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
7d9f3d
7d9f3d
%ifarch ppc
7d9f3d
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
7d9f3d
  mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
7d9f3d
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{,64/}baseline_symbols.txt
7d9f3d
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{32/,}baseline_symbols.txt
7d9f3d
  rm -rf libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32
7d9f3d
fi
7d9f3d
%endif
7d9f3d
%ifarch sparc
7d9f3d
if [ -d libstdc++-v3/config/abi/post/sparc64-linux-gnu ]; then
7d9f3d
  mkdir -p libstdc++-v3/config/abi/post/sparc64-linux-gnu/64
7d9f3d
  mv libstdc++-v3/config/abi/post/sparc64-linux-gnu/{,64/}baseline_symbols.txt
7d9f3d
  mv libstdc++-v3/config/abi/post/sparc64-linux-gnu/{32/,}baseline_symbols.txt
7d9f3d
  rm -rf libstdc++-v3/config/abi/post/sparc64-linux-gnu/32
7d9f3d
fi
7d9f3d
%endif
7d9f3d
7d9f3d
%build
7d9f3d
7d9f3d
# Undo the broken autoconf change in recent Fedora versions
7d9f3d
export CONFIG_SITE=NONE
7d9f3d
7d9f3d
rm -fr obj-%{gcc_target_platform}
7d9f3d
mkdir obj-%{gcc_target_platform}
7d9f3d
cd obj-%{gcc_target_platform}
7d9f3d
7d9f3d
%if 0%{?rhel} < 7
7d9f3d
mkdir mpc mpc-install
7d9f3d
cd mpc
7d9f3d
../../mpc-%{mpc_version}/configure --disable-shared \
7d9f3d
  CFLAGS="${CFLAGS:-%optflags} -fPIC" CXXFLAGS="${CXXFLAGS:-%optflags} -fPIC" \
7d9f3d
  --prefix=`cd ..; pwd`/mpc-install
7d9f3d
make %{?_smp_mflags}
7d9f3d
make install
7d9f3d
cd ..
7d9f3d
%endif
7d9f3d
7d9f3d
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
7d9f3d
7d9f3d
CC=gcc
7d9f3d
CXX=g++
7d9f3d
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
7d9f3d
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
7d9f3d
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
7d9f3d
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
7d9f3d
%ifarch sparc
7d9f3d
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
7d9f3d
%endif
7d9f3d
%ifarch %{ix86}
7d9f3d
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
7d9f3d
%endif
7d9f3d
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`
7d9f3d
CONFIGURE_OPTS="\
7d9f3d
	--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
7d9f3d
	--with-bugurl=http://bugzilla.redhat.com/bugzilla \
7d9f3d
	--enable-shared --enable-threads=posix --enable-checking=release \
7d9f3d
%ifarch ppc64le
7d9f3d
	--enable-targets=powerpcle-linux --disable-multilib \
7d9f3d
%else
7d9f3d
	--enable-multilib \
7d9f3d
%endif
7d9f3d
	--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
7d9f3d
	--enable-gnu-unique-object \
7d9f3d
	--enable-linker-build-id \
7d9f3d
	--enable-plugin --with-linker-hash-style=gnu \
7d9f3d
	--enable-initfini-array \
7d9f3d
	--disable-libgcj \
7d9f3d
	--with-default-libstdcxx-abi=gcc4-compatible \
7d9f3d
	--disable-libquadmath \
7d9f3d
	--disable-libsanitizer \
7d9f3d
	--disable-libvtv \
7d9f3d
	--disable-libgomp \
7d9f3d
	--disable-libitm \
7d9f3d
	--disable-libssp \
7d9f3d
	--disable-libatomic \
7d9f3d
	--disable-libcilkrts \
7d9f3d
	--without-isl \
7d9f3d
	--disable-libmpx \
7d9f3d
%if 0%{?rhel} < 7
7d9f3d
	--with-mpc=`pwd`/mpc-install \
7d9f3d
%endif
7d9f3d
%if 0%{?rhel} >= 7
7d9f3d
%if %{attr_ifunc}
7d9f3d
        --enable-gnu-indirect-function \
7d9f3d
%endif
7d9f3d
%endif
7d9f3d
%ifarch ppc ppc64 ppc64le ppc64p7
7d9f3d
	--enable-secureplt \
7d9f3d
%endif
7d9f3d
%ifarch ppc ppc64 ppc64p7
7d9f3d
%if 0%{?rhel} >= 7
7d9f3d
	--with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \
7d9f3d
%else
7d9f3d
	--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
7d9f3d
%endif
7d9f3d
%endif
7d9f3d
%ifarch ppc64le
7d9f3d
%if 0%{?rhel} >= 7
7d9f3d
	--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \
7d9f3d
%endif
7d9f3d
%endif
7d9f3d
%ifarch ppc
7d9f3d
	--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
7d9f3d
%endif
7d9f3d
%ifarch %{ix86} x86_64
7d9f3d
	--with-tune=generic \
7d9f3d
%endif
7d9f3d
%ifarch %{ix86}
7d9f3d
	--with-arch=i686 \
7d9f3d
%endif
7d9f3d
%ifarch x86_64
7d9f3d
	--with-arch_32=i686 \
7d9f3d
%endif
7d9f3d
	--build=%{gcc_target_platform} \
7d9f3d
	"
7d9f3d
7d9f3d
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
7d9f3d
	CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g'`" \
7d9f3d
	XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
7d9f3d
	GCJFLAGS="$OPT_FLAGS" \
7d9f3d
	../configure --enable-bootstrap \
7d9f3d
	--enable-languages=c,c++,lto \
7d9f3d
	$CONFIGURE_OPTS
7d9f3d
7d9f3d
7d9f3d
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS"
7d9f3d
7d9f3d
%install
7d9f3d
rm -fr %{buildroot}
7d9f3d
7d9f3d
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
7d9f3d
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}
7d9f3d
cd obj-%{gcc_target_platform}
7d9f3d
7d9f3d
TARGET_PLATFORM=%{gcc_target_platform}
7d9f3d
cp %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6.0.* %{buildroot}%{_root_prefix}/%{_lib}/compat-sap-c++-%{gcc_version}.so
7d9f3d
cd %{buildroot}%{_root_prefix}/%{_lib}/
7d9f3d
ln -sf compat-sap-c++-%{gcc_version}.so %{buildroot}%{_root_prefix}/%{_lib}/compat-sap-c++-6.so
7d9f3d
7d9f3d
%check
7d9f3d
cd obj-%{gcc_target_platform}
7d9f3d
7d9f3d
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
7d9f3d
7d9f3d
# run the tests.
7d9f3d
make %{?_smp_mflags} -k check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
7d9f3d
( LC_ALL=C ../contrib/test_summary -t || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' > testresults
7d9f3d
rm -rf gcc/testsuite.prev
7d9f3d
mv gcc/testsuite{,.prev}
7d9f3d
rm -f gcc/site.exp
7d9f3d
make %{?_smp_mflags} -C gcc -k check-gcc check-g++ ALT_CC_UNDER_TEST=gcc ALT_CXX_UNDER_TEST=g++ RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}' compat.exp struct-layout-1.exp" || :
7d9f3d
mv gcc/testsuite/gcc/gcc.sum{,.sent}
7d9f3d
mv gcc/testsuite/g++/g++.sum{,.sent}
7d9f3d
( LC_ALL=C ../contrib/test_summary -o -t || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' > testresults2
7d9f3d
rm -rf gcc/testsuite.compat
7d9f3d
mv gcc/testsuite{,.compat}
7d9f3d
mv gcc/testsuite{.prev,}
7d9f3d
echo ====================TESTING=========================
7d9f3d
cat testresults
7d9f3d
echo ===`gcc --version | head -1` compatibility tests====
7d9f3d
cat testresults2
7d9f3d
echo ====================TESTING END=====================
7d9f3d
mkdir testlogs-%{_target_platform}-%{version}-%{release}
7d9f3d
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
7d9f3d
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || :
7d9f3d
done
7d9f3d
for i in `find gcc/testsuite.compat -name \*.log | grep -v 'config.log\|acats.*/tests/'`; do
7d9f3d
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/`basename $i`.compat || :
7d9f3d
done
7d9f3d
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \
7d9f3d
  | uuencode testlogs-%{_target_platform}.tar.bz2 || :
7d9f3d
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
7d9f3d
7d9f3d
%clean
7d9f3d
rm -rf %{buildroot}
7d9f3d
7d9f3d
%files
7d9f3d
%defattr(-,root,root,-)
7d9f3d
%dir %{_root_prefix}
7d9f3d
%dir %{_root_prefix}/%{_lib}
7d9f3d
%{_root_prefix}/%{_lib}/compat-sap-c++-%{gcc_version}.so
7d9f3d
%{_root_prefix}/%{_lib}/compat-sap-c++-6.so
7d9f3d
7d9f3d
%changelog
7d9f3d
* Thu Feb 23 2017 Marek Polacek <polacek@redhat.com> 6.3.1-1
7d9f3d
- new package