Blame SPECS/gcc.spec

78ce48
%{?scl:%global __strip %%{_scl_root}/usr/bin/strip}
78ce48
%{?scl:%global __objdump %%{_scl_root}/usr/bin/objdump}
78ce48
%{?scl:%scl_package gcc}
78ce48
%global DATE 20160916
78ce48
%global SVNREV 240184
78ce48
%global gcc_version 6.2.1
78ce48
# Note, gcc_release must be integer, if you want to add suffixes to
78ce48
# %{release}, append them after %{gcc_release} on Release: line.
78ce48
%global gcc_release 3
78ce48
%global mpc_version 0.8.1
78ce48
%global isl_version 0.14
78ce48
%global graphviz_version 2.26.0
78ce48
%global doxygen_version 1.8.0
78ce48
%global _unpackaged_files_terminate_build 0
78ce48
%global multilib_64_archs sparc64 ppc64 s390x x86_64
78ce48
%ifarch %{ix86} x86_64 ia64
78ce48
%global build_libquadmath 1
78ce48
%else
78ce48
%global build_libquadmath 0
78ce48
%endif
78ce48
%global build_fortran 1
78ce48
%ifarch %{ix86} x86_64 %{arm} alpha ppc ppc64 ppc64le ppc64p7 s390 s390x aarch64
78ce48
%global build_libitm 1
78ce48
%else
78ce48
%global build_libitm 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le %{arm} aarch64
78ce48
%global build_libasan 1
78ce48
%else
78ce48
%global build_libasan 0
78ce48
%endif
78ce48
%ifarch x86_64 aarch64
78ce48
%global build_libtsan 1
78ce48
%else
78ce48
%global build_libtsan 0
78ce48
%endif
78ce48
%ifarch x86_64 aarch64
78ce48
%global build_liblsan 1
78ce48
%else
78ce48
%global build_liblsan 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 %{arm} aarch64
78ce48
%global build_libubsan 1
78ce48
%else
78ce48
%global build_libubsan 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64
78ce48
%global build_libcilkrts 1
78ce48
%else
78ce48
%global build_libcilkrts 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64 ppc ppc64 ppc64p7 ppc64le s390 s390x %{arm} aarch64
78ce48
%global build_libatomic 1
78ce48
%else
78ce48
%global build_libatomic 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64 ppc ppc64 ppc64le ppc64p7 s390 s390x %{arm} aarch64
78ce48
%global attr_ifunc 1
78ce48
%else
78ce48
%global attr_ifunc 0
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64
78ce48
%global build_libmpx 1
78ce48
%else
78ce48
%global build_libmpx 0
78ce48
%endif
78ce48
%global build_isl 1
78ce48
%global build_libstdcxx_docs 1
78ce48
%ifarch s390x
78ce48
%global multilib_32_arch s390
78ce48
%endif
78ce48
%ifarch sparc64
78ce48
%global multilib_32_arch sparcv9
78ce48
%endif
78ce48
%ifarch ppc64
78ce48
%global multilib_32_arch ppc
78ce48
%endif
78ce48
%ifarch x86_64
78ce48
%global multilib_32_arch i686
78ce48
%endif
78ce48
Summary: GCC version 6
78ce48
Name: %{?scl_prefix}gcc
78ce48
#Name: %{?scl_prefix}gcc%{!?scl:5}
78ce48
Version: %{gcc_version}
78ce48
Release: %{gcc_release}.1%{?dist}
78ce48
# libgcc, libgfortran, libmudflap, libgomp, libstdc++ and crtstuff have
78ce48
# GCC Runtime Exception.
78ce48
License: GPLv3+ and GPLv3+ with exceptions and GPLv2+ with exceptions and LGPLv2+ and BSD
78ce48
Group: Development/Languages
78ce48
# The source for this package was pulled from upstream's vcs.  Use the
78ce48
# following commands to generate the tarball:
78ce48
# svn export svn://gcc.gnu.org/svn/gcc/branches/redhat/gcc-6-branch@%{SVNREV} gcc-%{version}-%{DATE}
78ce48
# tar cf - gcc-%{version}-%{DATE} | bzip2 -9 > gcc-%{version}-%{DATE}.tar.bz2
78ce48
Source0: gcc-%{version}-%{DATE}.tar.bz2
78ce48
Source1: ftp://gcc.gnu.org/pub/gcc/infrastructure/isl-%{isl_version}.tar.bz2
78ce48
Source2: http://www.multiprecision.org/mpc/download/mpc-%{mpc_version}.tar.gz
78ce48
Source3: ftp://ftp.stack.nl/pub/users/dimitri/doxygen-%{doxygen_version}.src.tar.gz
78ce48
URL: http://gcc.gnu.org
78ce48
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
78ce48
# Need binutils with -pie support >= 2.14.90.0.4-4
78ce48
# Need binutils which can omit dot symbols and overlap .opd on ppc64 >= 2.15.91.0.2-4
78ce48
# Need binutils which handle -msecure-plt on ppc >= 2.16.91.0.2-2
78ce48
# Need binutils which support .weakref >= 2.16.91.0.3-1
78ce48
# Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7
78ce48
# Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8
78ce48
# Need binutils which support --build-id >= 2.17.50.0.17-3
78ce48
# Need binutils which support %gnu_unique_object >= 2.19.51.0.14
78ce48
# Need binutils which support .cfi_sections >= 2.19.51.0.14-33
78ce48
BuildRequires: binutils >= 2.19.51.0.14-33
78ce48
# While gcc doesn't include statically linked binaries, during testing
78ce48
# -static is used several times.
78ce48
BuildRequires: glibc-static
78ce48
%if 0%{?scl:1}
78ce48
BuildRequires: %{?scl_prefix}binutils >= 2.22.52.0.1
78ce48
# For testing
78ce48
BuildRequires: %{?scl_prefix}gdb >= 7.4.50
78ce48
%endif
78ce48
BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils
78ce48
BuildRequires: /usr/bin/pod2man
78ce48
%if 0%{?rhel} >= 7
78ce48
BuildRequires: texinfo-tex
78ce48
%endif
78ce48
#BuildRequires: systemtap-sdt-devel >= 1.3
78ce48
# For VTA guality testing
78ce48
BuildRequires: gdb
78ce48
# Make sure pthread.h doesn't contain __thread tokens
78ce48
# Make sure glibc supports stack protector
78ce48
# Make sure glibc supports DT_GNU_HASH
78ce48
BuildRequires: glibc-devel >= 2.4.90-13
78ce48
BuildRequires: elfutils-devel >= 0.147
78ce48
BuildRequires: elfutils-libelf-devel >= 0.147
78ce48
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
78ce48
# Make sure glibc supports TFmode long double
78ce48
BuildRequires: glibc >= 2.3.90-35
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs} sparcv9 ppc
78ce48
# Ensure glibc{,-devel} is installed for both multilib arches
78ce48
BuildRequires: /lib/libc.so.6 /usr/lib/libc.so /lib64/libc.so.6 /usr/lib64/libc.so
78ce48
%endif
78ce48
%ifarch ia64
78ce48
BuildRequires: libunwind >= 0.98
78ce48
%endif
78ce48
# Need .eh_frame ld optimizations
78ce48
# Need proper visibility support
78ce48
# Need -pie support
78ce48
# Need --as-needed/--no-as-needed support
78ce48
# On ppc64, need omit dot symbols support and --non-overlapping-opd
78ce48
# Need binutils that owns /usr/bin/c++filt
78ce48
# Need binutils that support .weakref
78ce48
# Need binutils that supports --hash-style=gnu
78ce48
# Need binutils that support mffgpr/mftgpr
78ce48
# Need binutils which support --build-id >= 2.17.50.0.17-3
78ce48
# Need binutils which support %gnu_unique_object >= 2.19.51.0.14
78ce48
# Need binutils which support .cfi_sections >= 2.19.51.0.14-33
78ce48
%if 0%{?scl:1}
78ce48
Requires: %{?scl_prefix}binutils >= 2.22.52.0.1
78ce48
%else
78ce48
Requires: binutils >= 2.19.51.0.14-33
78ce48
%endif
78ce48
# Make sure gdb will understand DW_FORM_strp
78ce48
Conflicts: gdb < 5.1-2
78ce48
Requires: glibc-devel >= 2.2.90-12
78ce48
%ifarch ppc ppc64 ppc64le ppc64p7 s390 s390x sparc sparcv9 alpha
78ce48
# Make sure glibc supports TFmode long double
78ce48
Requires: glibc >= 2.3.90-35
78ce48
%endif
78ce48
Requires: libgcc >= 4.1.2-43
78ce48
Requires: libgomp >= 4.4.4-13
78ce48
BuildRequires: gmp-devel >= 4.1.2-8
78ce48
BuildRequires: mpfr-devel >= 2.2.1
78ce48
%if 0%{?rhel} >= 7
78ce48
BuildRequires: libmpc-devel >= 0.8.1
78ce48
%endif
78ce48
%if %{build_libstdcxx_docs}
78ce48
BuildRequires: libxml2
78ce48
BuildRequires: graphviz
78ce48
%if 0%{?rhel} < 7
78ce48
# doxygen BRs
78ce48
BuildRequires: perl
78ce48
BuildRequires: texlive-dvips, texlive-utils, texlive-latex
78ce48
BuildRequires: ghostscript
78ce48
%endif
78ce48
%if 0%{?rhel} >= 7
78ce48
BuildRequires: doxygen >= 1.7.1
78ce48
BuildRequires: dblatex, texlive-collection-latex, docbook5-style-xsl
78ce48
%endif
78ce48
%endif
78ce48
%{?scl:Requires:%scl_runtime}
78ce48
%{?scl:Provides:gcc = %{version}-%{release}}
78ce48
AutoReq: true
78ce48
AutoProv: false
78ce48
%ifarch sparc64 ppc64 ppc64le s390x x86_64 ia64
78ce48
Provides: liblto_plugin.so.0()(64bit)
78ce48
%else
78ce48
Provides: liblto_plugin.so.0
78ce48
%endif
78ce48
%global oformat %{nil}
78ce48
%global oformat2 %{nil}
78ce48
%ifarch %{ix86}
78ce48
%global oformat OUTPUT_FORMAT(elf32-i386)
78ce48
%endif
78ce48
%ifarch x86_64
78ce48
%global oformat OUTPUT_FORMAT(elf64-x86-64)
78ce48
%global oformat2 OUTPUT_FORMAT(elf32-i386)
78ce48
%endif
78ce48
%ifarch ppc
78ce48
%global oformat OUTPUT_FORMAT(elf32-powerpc)
78ce48
%global oformat2 OUTPUT_FORMAT(elf64-powerpc)
78ce48
%endif
78ce48
%ifarch ppc64
78ce48
%global oformat OUTPUT_FORMAT(elf64-powerpc)
78ce48
%global oformat2 OUTPUT_FORMAT(elf32-powerpc)
78ce48
%endif
78ce48
%ifarch s390
78ce48
%global oformat OUTPUT_FORMAT(elf32-s390)
78ce48
%endif
78ce48
%ifarch s390x
78ce48
%global oformat OUTPUT_FORMAT(elf64-s390)
78ce48
%global oformat2 OUTPUT_FORMAT(elf32-s390)
78ce48
%endif
78ce48
%ifarch ia64
78ce48
%global oformat OUTPUT_FORMAT(elf64-ia64-little)
78ce48
%endif
78ce48
%ifarch ppc64le
78ce48
%global oformat OUTPUT_FORMAT(elf64-powerpcle)
78ce48
%endif
78ce48
%ifarch aarch64
78ce48
%global oformat OUTPUT_FORMAT(elf64-littleaarch64)
78ce48
%endif
78ce48
78ce48
Patch0: gcc6-hack.patch
78ce48
Patch1: gcc6-java-nomulti.patch
78ce48
Patch2: gcc6-ppc32-retaddr.patch
78ce48
Patch3: gcc6-rh330771.patch
78ce48
Patch4: gcc6-i386-libgomp.patch
78ce48
Patch5: gcc6-sparc-config-detection.patch
78ce48
Patch6: gcc6-libgomp-omp_h-multilib.patch
78ce48
Patch7: gcc6-libtool-no-rpath.patch
78ce48
Patch8: gcc6-isl-dl.patch
78ce48
Patch9: gcc6-libstdc++-docs.patch
78ce48
Patch10: gcc6-no-add-needed.patch
78ce48
Patch11: gcc6-libgo-p224.patch
78ce48
Patch12: gcc6-aarch64-async-unw-tables.patch
78ce48
Patch13: gcc6-libsanitize-aarch64-va42.patch
78ce48
78ce48
Patch1000: gcc6-libstdc++-compat.patch
78ce48
Patch1001: gcc6-libgfortran-compat.patch
78ce48
Patch1002: gcc6-alt-compat-test.patch
78ce48
Patch1003: gcc6-libquadmath-compat.patch
78ce48
Patch1004: gcc6-libstdc++44-xfail.patch
78ce48
Patch1005: gcc6-rh1118870.patch
78ce48
Patch1006: gcc6-isl-dl2.patch
78ce48
78ce48
Patch2001: doxygen-1.7.1-config.patch
78ce48
Patch2002: doxygen-1.7.5-timestamp.patch
78ce48
Patch2003: doxygen-1.8.0-rh856725.patch
78ce48
78ce48
%if 0%{?rhel} >= 7
78ce48
%global nonsharedver 48
78ce48
%else
78ce48
%global nonsharedver 44
78ce48
%endif
78ce48
78ce48
%if 0%{?scl:1}
78ce48
%global _gnu %{nil}
78ce48
%else
78ce48
%global _gnu 7E
78ce48
%endif
78ce48
%ifarch sparcv9
78ce48
%global gcc_target_platform sparc64-%{_vendor}-%{_target_os}%{?_gnu}
78ce48
%endif
78ce48
%ifarch ppc
78ce48
%global gcc_target_platform ppc64-%{_vendor}-%{_target_os}%{?_gnu}
78ce48
%endif
78ce48
%ifnarch sparcv9 ppc
78ce48
%global gcc_target_platform %{_target_platform}
78ce48
%endif
78ce48
78ce48
%description
78ce48
The %{?scl_prefix}gcc%{!?scl:5} package contains the GNU Compiler Collection version 6.
78ce48
78ce48
%package c++
78ce48
Summary: C++ support for GCC version 6
78ce48
Group: Development/Languages
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libstdc++
78ce48
%else
78ce48
Requires: libstdc++ >= 4.4.4-13
78ce48
%endif
78ce48
Requires: %{?scl_prefix}libstdc++%{!?scl:5}-devel = %{version}-%{release}
78ce48
Autoreq: true
78ce48
Autoprov: true
78ce48
78ce48
%description c++
78ce48
This package adds C++ support to the GNU Compiler Collection
78ce48
version 6.  It includes support for most of the current C++ specification
78ce48
and a lot of support for the upcoming C++ specification.
78ce48
78ce48
%package -n %{?scl_prefix}libstdc++%{!?scl:5}-devel
78ce48
Summary: Header files and libraries for C++ development
78ce48
Group: Development/Libraries
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libstdc++
78ce48
%else
78ce48
Requires: libstdc++ >= 4.4.4-13
78ce48
%endif
78ce48
Requires: libstdc++%{?_isa}
78ce48
Autoreq: true
78ce48
Autoprov: true
78ce48
78ce48
%description -n %{?scl_prefix}libstdc++%{!?scl:5}-devel
78ce48
This is the GNU implementation of the standard C++ libraries.  This
78ce48
package includes the header files and libraries needed for C++
78ce48
development. This includes rewritten implementation of STL.
78ce48
78ce48
%package -n %{?scl_prefix}libstdc++%{!?scl:5}-docs
78ce48
Summary: Documentation for the GNU standard C++ library
78ce48
Group: Development/Libraries
78ce48
Autoreq: true
78ce48
78ce48
%description -n %{?scl_prefix}libstdc++%{!?scl:5}-docs
78ce48
Manual, doxygen generated API information and Frequently Asked Questions
78ce48
for the GNU standard C++ library.
78ce48
78ce48
%package gfortran
78ce48
Summary: Fortran support for GCC 6
78ce48
Group: Development/Languages
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libgfortran
78ce48
%else
78ce48
Requires: libgfortran >= 4.4.4-13
78ce48
%endif
78ce48
%if %{build_libquadmath}
78ce48
%if 0%{!?scl:1}
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libquadmath
78ce48
%else
78ce48
Requires: %{?scl_prefix}libquadmath = %{version}-%{release}
78ce48
%endif
78ce48
%else
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libquadmath
78ce48
%endif
78ce48
%endif
78ce48
Requires: %{?scl_prefix}libquadmath-devel = %{version}-%{release}
78ce48
%endif
78ce48
Autoreq: true
78ce48
Autoprov: true
78ce48
78ce48
%description gfortran
78ce48
The %{?scl_prefix}gcc%{!?scl:5}-gfortran package provides support for compiling Fortran
78ce48
programs with the GNU Compiler Collection.
78ce48
78ce48
%package gdb-plugin
78ce48
Summary: GCC 6 plugin for GDB
78ce48
Group: Development/Debuggers
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
78ce48
%description gdb-plugin
78ce48
This package contains GCC 6 plugin for GDB C expression evaluation.
78ce48
78ce48
%package -n %{?scl_prefix}libgccjit
78ce48
Summary: Library for embedding GCC inside programs and libraries
78ce48
Group: System Environment/Libraries
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
78ce48
%description -n %{?scl_prefix}libgccjit
78ce48
This package contains shared library with GCC 6 JIT front end.
78ce48
78ce48
%package -n %{?scl_prefix}libgccjit-devel
78ce48
Summary: Support for embedding GCC inside programs and libraries
78ce48
Group: Development/Libraries
78ce48
Requires: %{?scl_prefix}libgccjit = %{version}-%{release}
78ce48
Requires: %{?scl_prefix}libgccjit-docs = %{version}-%{release}
78ce48
78ce48
%description -n %{?scl_prefix}libgccjit-devel
78ce48
This package contains header files for GCC 6 JIT front end.
78ce48
78ce48
%package -n %{?scl_prefix}libgccjit-docs
78ce48
Summary: Documentation for embedding GCC inside programs and libraries
78ce48
Group: Development/Libraries
78ce48
BuildRequires: python-sphinx
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n %{?scl_prefix}libgccjit-docs
78ce48
This package contains documentation for GCC 6 JIT front end.
78ce48
78ce48
%package -n %{?scl_prefix}libquadmath
78ce48
Summary: GCC 6 __float128 shared support library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n %{?scl_prefix}libquadmath
78ce48
This package contains GCC shared support library which is needed
78ce48
for __float128 math support and for Fortran REAL*16 support.
78ce48
78ce48
%package -n %{?scl_prefix}libquadmath-devel
78ce48
Summary: GCC 6 __float128 support
78ce48
Group: Development/Libraries
78ce48
%if 0%{!?scl:1}
78ce48
Requires: %{?scl_prefix}libquadmath = %{version}-%{release}
78ce48
%else
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libquadmath
78ce48
%endif
78ce48
%endif
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
78ce48
%description -n %{?scl_prefix}libquadmath-devel
78ce48
This package contains headers for building Fortran programs using
78ce48
REAL*16 and programs using __float128 math.
78ce48
78ce48
%package -n libitm
78ce48
Summary: The GNU Transactional Memory library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libitm
78ce48
This package contains the GNU Transactional Memory library
78ce48
which is a GCC transactional memory support runtime library.
78ce48
78ce48
%package -n %{?scl_prefix}libitm-devel
78ce48
Summary: The GNU Transactional Memory support
78ce48
Group: Development/Libraries
78ce48
Requires: libitm >= 4.7.0-1
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
78ce48
%description -n %{?scl_prefix}libitm-devel
78ce48
This package contains headers and support files for the
78ce48
GNU Transactional Memory library.
78ce48
78ce48
%package plugin-devel
78ce48
Summary: Support for compiling GCC plugins
78ce48
Group: Development/Languages
78ce48
Requires: %{?scl_prefix}gcc%{!?scl:5} = %{version}-%{release}
78ce48
Requires: gmp-devel >= 4.1.2-8
78ce48
Requires: mpfr-devel >= 2.2.1
78ce48
%if 0%{?rhel} >= 7
78ce48
Requires: libmpc-devel >= 0.8.1
78ce48
%endif
78ce48
78ce48
%description plugin-devel
78ce48
This package contains header files and other support files
78ce48
for compiling GCC 6 plugins.  The GCC plugin ABI is currently
78ce48
not stable, so plugins must be rebuilt any time GCC is updated.
78ce48
78ce48
%package -n libatomic
78ce48
Summary: The GNU Atomic library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libatomic
78ce48
This package contains the GNU Atomic library
78ce48
which is a GCC support runtime library for atomic operations not supported
78ce48
by hardware.
78ce48
78ce48
%package -n %{?scl_prefix}libatomic-devel
78ce48
Summary: The GNU Atomic static library
78ce48
Group: Development/Libraries
78ce48
Requires: libatomic >= 4.8.0
78ce48
78ce48
%description -n %{?scl_prefix}libatomic-devel
78ce48
This package contains GNU Atomic static libraries.
78ce48
78ce48
%package -n libasan3
78ce48
Summary: The Address Sanitizer runtime library from GCC 6
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libasan3
78ce48
This package contains the Address Sanitizer library from GCC 6
78ce48
which is used for -fsanitize=address instrumented programs.
78ce48
78ce48
%package -n %{?scl_prefix}libasan-devel
78ce48
Summary: The Address Sanitizer static library
78ce48
Group: Development/Libraries
78ce48
Requires: libasan3 >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}libasan-devel
78ce48
This package contains Address Sanitizer static runtime library.
78ce48
78ce48
%package -n libtsan
78ce48
Summary: The Thread Sanitizer runtime library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libtsan
78ce48
This package contains the Thread Sanitizer library
78ce48
which is used for -fsanitize=thread instrumented programs.
78ce48
78ce48
%package -n %{?scl_prefix}libtsan-devel
78ce48
Summary: The Thread Sanitizer static library
78ce48
Group: Development/Libraries
78ce48
Requires: libtsan >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}libtsan-devel
78ce48
This package contains Thread Sanitizer static runtime library.
78ce48
78ce48
%package -n libubsan
78ce48
Summary: The Undefined Behavior Sanitizer runtime library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libubsan
78ce48
This package contains the Undefined Behavior Sanitizer library
78ce48
which is used for -fsanitize=undefined instrumented programs.
78ce48
78ce48
%package -n %{?scl_prefix}libubsan-devel
78ce48
Summary: The Undefined Behavior Sanitizer static library
78ce48
Group: Development/Libraries
78ce48
Requires: libubsan >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}libubsan-devel
78ce48
This package contains Undefined behavior Sanitizer static runtime library.
78ce48
78ce48
%package -n liblsan
78ce48
Summary: The Leak Sanitizer runtime library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n liblsan
78ce48
This package contains the Leak Sanitizer library
78ce48
which is used for -fsanitize=leak instrumented programs.
78ce48
78ce48
%package -n %{?scl_prefix}liblsan-devel
78ce48
Summary: The Leak Sanitizer static library
78ce48
Group: Development/Libraries
78ce48
Requires: liblsan >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}liblsan-devel
78ce48
This package contains Leak Sanitizer static runtime library.
78ce48
78ce48
%package -n libcilkrts
78ce48
Summary: The Cilk+ runtime library
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libcilkrts
78ce48
This package contains the Cilk+ runtime library.
78ce48
78ce48
%package -n %{?scl_prefix}libcilkrts-devel
78ce48
Summary: The Cilk+ static runtime library
78ce48
Group: Development/Libraries
78ce48
Requires: libcilkrts >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}libcilkrts-devel
78ce48
This package contains the Cilk+ static runtime library.
78ce48
78ce48
%package -n libmpx
78ce48
Summary: The Memory Protection Extensions runtime libraries
78ce48
Group: System Environment/Libraries
78ce48
Requires(post): /sbin/install-info
78ce48
Requires(preun): /sbin/install-info
78ce48
78ce48
%description -n libmpx
78ce48
This package contains the Memory Protection Extensions runtime libraries
78ce48
which is used for -fcheck-pointer-bounds -mmpx instrumented programs.
78ce48
78ce48
%package -n %{?scl_prefix}libmpx-devel
78ce48
Summary: The Memory Protection Extensions static libraries
78ce48
Group: Development/Libraries
78ce48
Requires: libmpx >= 5.1.1
78ce48
78ce48
%description -n %{?scl_prefix}libmpx-devel
78ce48
This package contains the Memory Protection Extensions static runtime libraries.
78ce48
78ce48
%prep
78ce48
%if 0%{?rhel} >= 7
78ce48
%setup -q -n gcc-%{version}-%{DATE} -a 1
78ce48
%else
78ce48
%setup -q -n gcc-%{version}-%{DATE} -a 1 -a 2 -a 3
78ce48
%endif
78ce48
%patch0 -p0 -b .hack~
78ce48
%patch1 -p0 -b .java-nomulti~
78ce48
%patch2 -p0 -b .ppc32-retaddr~
78ce48
%patch3 -p0 -b .rh330771~
78ce48
%patch4 -p0 -b .i386-libgomp~
78ce48
%patch5 -p0 -b .sparc-config-detection~
78ce48
%patch6 -p0 -b .libgomp-omp_h-multilib~
78ce48
%patch7 -p0 -b .libtool-no-rpath~
78ce48
%if %{build_isl}
78ce48
%patch8 -p0 -b .isl-dl~
78ce48
%endif
78ce48
%if %{build_libstdcxx_docs}
78ce48
%patch9 -p0 -b .libstdc++-docs~
78ce48
%endif
78ce48
%patch10 -p0 -b .no-add-needed~
78ce48
%patch11 -p0 -b .libgo-p224~
78ce48
rm -f libgo/go/crypto/elliptic/p224{,_test}.go
78ce48
%patch12 -p0 -b .aarch64-async-unw-tables~
78ce48
%patch13 -p0 -b .libsanitize-aarch64-va42~
78ce48
sed -i -e 's/ -Wl,-z,nodlopen//g' gcc/ada/gcc-interface/Makefile.in
78ce48
78ce48
%patch1000 -p0 -b .libstdc++-compat~
78ce48
%patch1001 -p0 -b .libgfortran-compat~
78ce48
%ifarch %{ix86} x86_64
78ce48
%if 0%{?rhel} < 7
78ce48
# On i?86/x86_64 there are some incompatibilities in _Decimal* as well as
78ce48
# aggregates containing larger vector passing.
78ce48
%patch1002 -p0 -b .alt-compat-test~
78ce48
%endif
78ce48
%endif
78ce48
%if 0%{?rhel} < 7
78ce48
%patch1003 -p0 -b .libquadmath-compat~
78ce48
%endif
78ce48
%if 0%{?rhel} == 6
78ce48
# Fix this up
78ce48
#%patch1004 -p0 -b .libstdc++44-xfail~
78ce48
%endif
78ce48
%patch1005 -p0 -b .rh1118870~
78ce48
%patch1006 -p0 -b .isl-dl2~
78ce48
78ce48
%if %{build_libstdcxx_docs}
78ce48
%if 0%{?rhel} < 7
78ce48
cd doxygen-%{doxygen_version}
78ce48
%patch2001 -p1 -b .config~
78ce48
%patch2002 -p1 -b .timestamp~
78ce48
%patch2003 -p1 -b .rh856725~
78ce48
cd ..
78ce48
%endif
78ce48
%endif
78ce48
78ce48
echo 'Red Hat %{version}-%{gcc_release}' > gcc/DEV-PHASE
78ce48
78ce48
%if 0%{?rhel} == 6
78ce48
# Default to -gdwarf-3 rather than -gdwarf-4
78ce48
sed -i '/UInteger Var(dwarf_version)/s/Init(4)/Init(3)/' gcc/common.opt
78ce48
sed -i 's/\(may be either 2, 3 or 4; the default version is \)4\./\13./' gcc/doc/invoke.texi
78ce48
%endif
78ce48
78ce48
cp -a libstdc++-v3/config/cpu/i{4,3}86/atomicity.h
78ce48
cp -a libstdc++-v3/config/cpu/i{4,3}86/opt
78ce48
78ce48
./contrib/gcc_update --touch
78ce48
78ce48
LC_ALL=C sed -i -e 's/\xa0/ /' gcc/doc/options.texi
78ce48
78ce48
sed -i -e 's/Common Driver Var(flag_report_bug)/& Init(1)/' gcc/common.opt
78ce48
78ce48
%ifarch ppc
78ce48
if [ -d libstdc++-v3/config/abi/post/powerpc64-linux-gnu ]; then
78ce48
  mkdir -p libstdc++-v3/config/abi/post/powerpc64-linux-gnu/64
78ce48
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{,64/}baseline_symbols.txt
78ce48
  mv libstdc++-v3/config/abi/post/powerpc64-linux-gnu/{32/,}baseline_symbols.txt
78ce48
  rm -rf libstdc++-v3/config/abi/post/powerpc64-linux-gnu/32
78ce48
fi
78ce48
%endif
78ce48
%ifarch sparc
78ce48
if [ -d libstdc++-v3/config/abi/post/sparc64-linux-gnu ]; then
78ce48
  mkdir -p libstdc++-v3/config/abi/post/sparc64-linux-gnu/64
78ce48
  mv libstdc++-v3/config/abi/post/sparc64-linux-gnu/{,64/}baseline_symbols.txt
78ce48
  mv libstdc++-v3/config/abi/post/sparc64-linux-gnu/{32/,}baseline_symbols.txt
78ce48
  rm -rf libstdc++-v3/config/abi/post/sparc64-linux-gnu/32
78ce48
fi
78ce48
%endif
78ce48
78ce48
%build
78ce48
78ce48
# Undo the broken autoconf change in recent Fedora versions
78ce48
export CONFIG_SITE=NONE
78ce48
78ce48
rm -fr obj-%{gcc_target_platform}
78ce48
mkdir obj-%{gcc_target_platform}
78ce48
cd obj-%{gcc_target_platform}
78ce48
78ce48
%if %{build_libstdcxx_docs}
78ce48
78ce48
%if 0%{?rhel} < 7
78ce48
mkdir doxygen-install
78ce48
pushd ../doxygen-%{doxygen_version}
78ce48
./configure --prefix `cd ..; pwd`/obj-%{gcc_target_platform}/doxygen-install \
78ce48
  --shared --release --english-only
78ce48
78ce48
make %{?_smp_mflags} all
78ce48
make install
78ce48
popd
78ce48
export PATH=`pwd`/doxygen-install/bin/${PATH:+:${PATH}}
78ce48
%endif
78ce48
%endif
78ce48
78ce48
%if 0%{?rhel} < 7
78ce48
mkdir mpc mpc-install
78ce48
cd mpc
78ce48
../../mpc-%{mpc_version}/configure --disable-shared \
78ce48
  CFLAGS="${CFLAGS:-%optflags} -fPIC" CXXFLAGS="${CXXFLAGS:-%optflags} -fPIC" \
78ce48
  --prefix=`cd ..; pwd`/mpc-install
78ce48
make %{?_smp_mflags}
78ce48
make install
78ce48
cd ..
78ce48
%endif
78ce48
78ce48
%if %{build_isl}
78ce48
mkdir isl-build isl-install
78ce48
%ifarch s390 s390x
78ce48
ISL_FLAG_PIC=-fPIC
78ce48
%else
78ce48
ISL_FLAG_PIC=-fpic
78ce48
%endif
78ce48
cd isl-build
78ce48
sed -i 's|libisl|libgcc6privateisl|g' \
78ce48
  ../../isl-%{isl_version}/Makefile.{am,in}
78ce48
../../isl-%{isl_version}/configure \
78ce48
  CC=/usr/bin/gcc CXX=/usr/bin/g++ \
78ce48
  CFLAGS="${CFLAGS:-%optflags} $ISL_FLAG_PIC" --prefix=`cd ..; pwd`/isl-install
78ce48
make %{?_smp_mflags}
78ce48
make install
78ce48
cd ../isl-install/lib
78ce48
rm libgcc6privateisl.so{,.13}
78ce48
mv libgcc6privateisl.so.13.1.0 libisl.so.13
78ce48
ln -sf libisl.so.13 libisl.so
78ce48
cd ../..
78ce48
%endif
78ce48
78ce48
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
78ce48
78ce48
CC=gcc
78ce48
CXX=g++
78ce48
OPT_FLAGS=`echo %{optflags}|sed -e 's/\(-Wp,\)\?-D_FORTIFY_SOURCE=[12]//g'`
78ce48
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-m64//g;s/-m32//g;s/-m31//g'`
78ce48
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mfpmath=sse/-mfpmath=sse -msse2/g'`
78ce48
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/ -pipe / /g'`
78ce48
%ifarch sparc
78ce48
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-mcpu=ultrasparc/-mtune=ultrasparc/g;s/-mcpu=v[78]//g'`
78ce48
%endif
78ce48
%ifarch %{ix86}
78ce48
OPT_FLAGS=`echo $OPT_FLAGS|sed -e 's/-march=i.86//g'`
78ce48
%endif
78ce48
OPT_FLAGS=`echo "$OPT_FLAGS" | sed -e 's/[[:blank:]]\+/ /g'`
78ce48
CONFIGURE_OPTS="\
78ce48
	--prefix=%{_prefix} --mandir=%{_mandir} --infodir=%{_infodir} \
78ce48
	--with-bugurl=http://bugzilla.redhat.com/bugzilla \
78ce48
	--enable-shared --enable-threads=posix --enable-checking=release \
78ce48
%ifarch ppc64le
78ce48
	--enable-targets=powerpcle-linux --disable-multilib \
78ce48
%else
78ce48
	--enable-multilib \
78ce48
%endif
78ce48
	--with-system-zlib --enable-__cxa_atexit --disable-libunwind-exceptions \
78ce48
	--enable-gnu-unique-object \
78ce48
	--enable-linker-build-id \
78ce48
	--enable-plugin --with-linker-hash-style=gnu \
78ce48
%if 0%{?scl:1}
78ce48
	--enable-initfini-array \
78ce48
%else
78ce48
%ifnarch ia64
78ce48
%if 0%{?rhel} >= 7
78ce48
	--enable-initfini-array \
78ce48
%else
78ce48
	--disable-initfini-array \
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
	--disable-libgcj \
78ce48
%if 0%{rhel} < 8
78ce48
	--with-default-libstdcxx-abi=gcc4-compatible \
78ce48
%endif
78ce48
%if %{build_isl}
78ce48
	--with-isl=`pwd`/isl-install \
78ce48
%else
78ce48
	--without-isl \
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
	--enable-libmpx \
78ce48
%else
78ce48
	--disable-libmpx \
78ce48
%endif
78ce48
%if 0%{?rhel} < 7
78ce48
	--with-mpc=`pwd`/mpc-install \
78ce48
%endif
78ce48
%if 0%{?rhel} >= 7
78ce48
%if %{attr_ifunc}
78ce48
        --enable-gnu-indirect-function \
78ce48
%endif
78ce48
%endif
78ce48
%ifarch %{arm}
78ce48
	--disable-sjlj-exceptions \
78ce48
%endif
78ce48
%ifarch ppc ppc64 ppc64le ppc64p7
78ce48
	--enable-secureplt \
78ce48
%endif
78ce48
%ifarch sparc sparcv9 sparc64 ppc ppc64 ppc64le ppc64p7 s390 s390x alpha
78ce48
	--with-long-double-128 \
78ce48
%endif
78ce48
%ifarch sparc
78ce48
	--disable-linux-futex \
78ce48
%endif
78ce48
%ifarch sparc64
78ce48
	--with-cpu=ultrasparc \
78ce48
%endif
78ce48
%ifarch sparc sparcv9
78ce48
	--host=%{gcc_target_platform} --build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=v7
78ce48
%endif
78ce48
%ifarch ppc ppc64 ppc64p7
78ce48
%if 0%{?rhel} >= 7
78ce48
	--with-cpu-32=power7 --with-tune-32=power7 --with-cpu-64=power7 --with-tune-64=power7 \
78ce48
%else
78ce48
	--with-cpu-32=power4 --with-tune-32=power6 --with-cpu-64=power4 --with-tune-64=power6 \
78ce48
%endif
78ce48
%endif
78ce48
%ifarch ppc64le
78ce48
%if 0%{?rhel} >= 7
78ce48
	--with-cpu-32=power8 --with-tune-32=power8 --with-cpu-64=power8 --with-tune-64=power8 \
78ce48
%endif
78ce48
%endif
78ce48
%ifarch ppc
78ce48
	--build=%{gcc_target_platform} --target=%{gcc_target_platform} --with-cpu=default32
78ce48
%endif
78ce48
%ifarch %{ix86} x86_64
78ce48
	--with-tune=generic \
78ce48
%endif
78ce48
%ifarch %{ix86}
78ce48
	--with-arch=i686 \
78ce48
%endif
78ce48
%ifarch x86_64
78ce48
	--with-arch_32=i686 \
78ce48
%endif
78ce48
%ifarch s390 s390x
78ce48
	--with-arch=z9-109 --with-tune=z10 --enable-decimal-float \
78ce48
%endif
78ce48
%ifnarch sparc sparcv9 ppc
78ce48
	--build=%{gcc_target_platform} \
78ce48
%endif
78ce48
	"
78ce48
78ce48
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
78ce48
	CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g'`" \
78ce48
	XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
78ce48
	GCJFLAGS="$OPT_FLAGS" \
78ce48
	../configure --enable-bootstrap \
78ce48
%if %{build_fortran}
78ce48
	--enable-languages=c,c++,fortran,lto \
78ce48
%else
78ce48
	--enable-languages=c,c++,lto \
78ce48
%endif
78ce48
	$CONFIGURE_OPTS
78ce48
78ce48
%ifarch ia64
78ce48
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" bootstrap
78ce48
%else
78ce48
GCJFLAGS="$OPT_FLAGS" make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" profiledbootstrap
78ce48
%endif
78ce48
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 -lstdc++_nonshared%{nonsharedver} )' \
78ce48
  > %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_system.so
78ce48
78ce48
# Relink libcc1 against -lstdc++_nonshared:
78ce48
sed -i -e '/^postdeps/s/-lstdc++/-lstdc++_system/' libcc1/libtool
78ce48
rm -f libcc1/libcc1.la
78ce48
make -C libcc1 libcc1.la
78ce48
78ce48
CC="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cc`"
78ce48
CXX="`%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-cxx` `%{gcc_target_platform}/libstdc++-v3/scripts/testsuite_flags --build-includes`"
78ce48
78ce48
# Build libgccjit separately, so that normal compiler binaries aren't -fpic
78ce48
# unnecessarily.
78ce48
mkdir objlibgccjit
78ce48
cd objlibgccjit
78ce48
CC="$CC" CXX="$CXX" CFLAGS="$OPT_FLAGS" \
78ce48
	CXXFLAGS="`echo " $OPT_FLAGS " | sed 's/ -Wall / /g;s/ -fexceptions / /g'`" \
78ce48
	XCFLAGS="$OPT_FLAGS" TCFLAGS="$OPT_FLAGS" \
78ce48
	../../configure --disable-bootstrap --enable-host-shared \
78ce48
	--enable-languages=jit $CONFIGURE_OPTS
78ce48
make %{?_smp_mflags} BOOT_CFLAGS="$OPT_FLAGS" all-gcc
78ce48
cp -a gcc/libgccjit.so* ../gcc/
78ce48
cd ../gcc/
78ce48
ln -sf xgcc %{gcc_target_platform}-gcc-%{version}
78ce48
cp -a Makefile{,.orig}
78ce48
sed -i -e '/^CHECK_TARGETS/s/$/ check-jit/' Makefile
78ce48
touch -r Makefile.orig Makefile
78ce48
rm Makefile.orig
78ce48
make jit.sphinx.html
78ce48
make jit.sphinx.install-html jit_htmldir=`pwd`/../../rpm.doc/libgccjit-devel/html
78ce48
cd ..
78ce48
78ce48
%if %{build_isl}
78ce48
cp -a isl-install/lib/libisl.so.13 gcc/
78ce48
%endif
78ce48
78ce48
# Make generated man pages even if Pod::Man is not new enough
78ce48
perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
78ce48
for i in ../gcc/doc/*.texi; do
78ce48
  cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i
78ce48
done
78ce48
make -C gcc generated-manpages
78ce48
for i in ../gcc/doc/*.texi; do mv -f $i.orig $i; done
78ce48
78ce48
# Make generated doxygen pages.
78ce48
%if %{build_libstdcxx_docs}
78ce48
cd %{gcc_target_platform}/libstdc++-v3
78ce48
make doc-html-doxygen
78ce48
make doc-man-doxygen
78ce48
cd ../..
78ce48
%endif
78ce48
78ce48
# Copy various doc files here and there
78ce48
cd ..
78ce48
mkdir -p rpm.doc/gfortran rpm.doc/libquadmath rpm.doc/libitm
78ce48
mkdir -p rpm.doc/changelogs/{gcc/cp,gcc/jit,libstdc++-v3,libgomp,libcc1,libatomic,libsanitizer,libcilkrts,libmpx}
78ce48
78ce48
for i in {gcc,gcc/cp,gcc/jit,libstdc++-v3,libgomp,libcc1,libatomic,libsanitizer,libcilkrts,libmpx}/ChangeLog*; do
78ce48
	cp -p $i rpm.doc/changelogs/$i
78ce48
done
78ce48
78ce48
%if %{build_fortran}
78ce48
(cd gcc/fortran; for i in ChangeLog*; do
78ce48
	cp -p $i ../../rpm.doc/gfortran/$i
78ce48
done)
78ce48
(cd libgfortran; for i in ChangeLog*; do
78ce48
	cp -p $i ../rpm.doc/gfortran/$i.libgfortran
78ce48
done)
78ce48
%endif
78ce48
78ce48
%if %{build_libquadmath}
78ce48
(cd libquadmath; for i in ChangeLog* COPYING.LIB; do
78ce48
	cp -p $i ../rpm.doc/libquadmath/$i.libquadmath
78ce48
done)
78ce48
%endif
78ce48
78ce48
%if %{build_libitm}
78ce48
(cd libitm; for i in ChangeLog*; do
78ce48
	cp -p $i ../rpm.doc/libitm/$i.libitm
78ce48
done)
78ce48
%endif
78ce48
78ce48
rm -f rpm.doc/changelogs/gcc/ChangeLog.[1-9]
78ce48
find rpm.doc -name \*ChangeLog\* | xargs bzip2 -9
78ce48
78ce48
%install
78ce48
rm -fr %{buildroot}
78ce48
78ce48
%if %{build_libstdcxx_docs}
78ce48
%if 0%{?rhel} < 7
78ce48
export PATH=`pwd`/obj-%{gcc_target_platform}/doxygen-install/bin/${PATH:+:${PATH}}
78ce48
%endif
78ce48
%endif
78ce48
78ce48
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
78ce48
78ce48
perl -pi -e \
78ce48
  's~href="l(ibstdc|atest)~href="http://gcc.gnu.org/onlinedocs/libstdc++/l\1~' \
78ce48
  libstdc++-v3/doc/html/api.html
78ce48
78ce48
cd obj-%{gcc_target_platform}
78ce48
78ce48
TARGET_PLATFORM=%{gcc_target_platform}
78ce48
78ce48
# There are some MP bugs in libstdc++ Makefiles
78ce48
make -C %{gcc_target_platform}/libstdc++-v3
78ce48
78ce48
%if 0%{?scl:1}
78ce48
rm -f gcc/libgcc_s.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > gcc/libgcc_s.so
78ce48
%endif
78ce48
78ce48
make prefix=%{buildroot}%{_prefix} mandir=%{buildroot}%{_mandir} \
78ce48
  infodir=%{buildroot}%{_infodir} install
78ce48
78ce48
%if 0%{?scl:1}
78ce48
rm -f gcc/libgcc_s.so
78ce48
ln -sf libgcc_s.so.1 gcc/libgcc_s.so
78ce48
%endif
78ce48
78ce48
FULLPATH=%{buildroot}%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
FULLEPATH=%{buildroot}%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
78ce48
%if 0%{?scl:1}
78ce48
ln -sf ../../../../bin/ar $FULLEPATH/ar
78ce48
ln -sf ../../../../bin/as $FULLEPATH/as
78ce48
ln -sf ../../../../bin/ld $FULLEPATH/ld
78ce48
ln -sf ../../../../bin/ld.bfd $FULLEPATH/ld.bfd
78ce48
ln -sf ../../../../bin/ld.gold $FULLEPATH/ld.gold
78ce48
ln -sf ../../../../bin/nm $FULLEPATH/nm
78ce48
ln -sf ../../../../bin/ranlib $FULLEPATH/ranlib
78ce48
ln -sf ../../../../bin/strip $FULLEPATH/strip
78ce48
%endif
78ce48
78ce48
%if %{build_isl}
78ce48
cp -a isl-install/lib/libisl.so.13 $FULLPATH/
78ce48
%endif
78ce48
78ce48
# fix some things
78ce48
ln -sf gcc %{buildroot}%{_prefix}/bin/cc
78ce48
mkdir -p %{buildroot}/lib
78ce48
ln -sf ..%{_prefix}/bin/cpp %{buildroot}/lib/cpp
78ce48
%if %{build_fortran}
78ce48
ln -sf gfortran %{buildroot}%{_prefix}/bin/f95
78ce48
%endif
78ce48
rm -f %{buildroot}%{_infodir}/dir
78ce48
gzip -9 %{buildroot}%{_infodir}/*.info*
78ce48
ln -sf gcc %{buildroot}%{_prefix}/bin/gnatgcc
78ce48
78ce48
cxxconfig="`find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h`"
78ce48
for i in `find %{gcc_target_platform}/[36]*/libstdc++-v3/include -name c++config.h 2>/dev/null`; do
78ce48
  if ! diff -up $cxxconfig $i; then
78ce48
    cat > %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/c++config.h <
78ce48
#ifndef _CPP_CPPCONFIG_WRAPPER
78ce48
#define _CPP_CPPCONFIG_WRAPPER 1
78ce48
#include <bits/wordsize.h>
78ce48
#if __WORDSIZE == 32
78ce48
%ifarch %{multilib_64_archs}
78ce48
`cat $(find %{gcc_target_platform}/32/libstdc++-v3/include -name c++config.h)`
78ce48
%else
78ce48
`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)`
78ce48
%endif
78ce48
#else
78ce48
%ifarch %{multilib_64_archs}
78ce48
`cat $(find %{gcc_target_platform}/libstdc++-v3/include -name c++config.h)`
78ce48
%else
78ce48
`cat $(find %{gcc_target_platform}/64/libstdc++-v3/include -name c++config.h)`
78ce48
%endif
78ce48
#endif
78ce48
#endif
78ce48
EOF
78ce48
    break
78ce48
  fi
78ce48
done
78ce48
78ce48
for f in `find %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/ -name c++config.h`; do
78ce48
  for i in 1 2 4 8; do
78ce48
    sed -i -e 's/#define _GLIBCXX_ATOMIC_BUILTINS_'$i' 1/#ifdef __GCC_HAVE_SYNC_COMPARE_AND_SWAP_'$i'\
78ce48
&\
78ce48
#endif/' $f
78ce48
  done
78ce48
  # Force the old ABI unconditionally, the new one does not work in the
78ce48
  # libstdc++_nonshared.a model against RHEL 6/7 libstdc++.so.6.
78ce48
  sed -i -e 's/\(define[[:blank:]]*_GLIBCXX_USE_DUAL_ABI[[:blank:]]*\)1/\10/' $f
78ce48
done
78ce48
78ce48
# Nuke bits/*.h.gch dirs
78ce48
# 1) there is no bits/*.h header installed, so when gch file can't be
78ce48
#    used, compilation fails
78ce48
# 2) sometimes it is hard to match the exact options used for building
78ce48
#    libstdc++-v3 or they aren't desirable
78ce48
# 3) there are multilib issues, conflicts etc. with this
78ce48
# 4) it is huge
78ce48
# People can always precompile on their own whatever they want, but
78ce48
# shipping this for everybody is unnecessary.
78ce48
rm -rf %{buildroot}%{_prefix}/include/c++/%{gcc_version}/%{gcc_target_platform}/bits/*.h.gch
78ce48
78ce48
%if %{build_libstdcxx_docs}
78ce48
libstdcxx_doc_builddir=%{gcc_target_platform}/libstdc++-v3/doc/doxygen
78ce48
mkdir -p ../rpm.doc/libstdc++-v3
78ce48
cp -r -p ../libstdc++-v3/doc/html ../rpm.doc/libstdc++-v3/html
78ce48
cp -r -p $libstdcxx_doc_builddir/html ../rpm.doc/libstdc++-v3/html/api
78ce48
mkdir -p %{buildroot}%{_mandir}/man3
78ce48
cp -r -p $libstdcxx_doc_builddir/man/man3/* %{buildroot}%{_mandir}/man3/
78ce48
find ../rpm.doc/libstdc++-v3 -name \*~ | xargs rm
78ce48
%endif
78ce48
78ce48
%ifarch sparcv9 sparc64
78ce48
ln -f %{buildroot}%{_prefix}/bin/%{gcc_target_platform}-gcc \
78ce48
  %{buildroot}%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}%{?_gnu}-gcc
78ce48
%endif
78ce48
%ifarch ppc ppc64
78ce48
ln -f %{buildroot}%{_prefix}/bin/%{gcc_target_platform}-gcc \
78ce48
  %{buildroot}%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}%{?_gnu}-gcc
78ce48
%endif
78ce48
78ce48
%ifarch sparcv9 ppc
78ce48
FULLLPATH=$FULLPATH/lib32
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
FULLLPATH=$FULLPATH/lib64
78ce48
%endif
78ce48
if [ -n "$FULLLPATH" ]; then
78ce48
  mkdir -p $FULLLPATH
78ce48
else
78ce48
  FULLLPATH=$FULLPATH
78ce48
fi
78ce48
78ce48
find %{buildroot} -name \*.la | xargs rm -f
78ce48
78ce48
%if %{build_fortran}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libgfortran.spec $FULLPATH/libgfortran.spec
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libitm.spec $FULLPATH/
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libsanitizer.spec $FULLPATH/
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libcilkrts.spec $FULLPATH/
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libmpx.spec $FULLPATH/
78ce48
%endif
78ce48
78ce48
mkdir -p %{buildroot}/%{_lib}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libgcc_s.so.1 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
78ce48
chmod 755 %{buildroot}/%{_lib}/libgcc_s-%{gcc_version}-%{DATE}.so.1
78ce48
ln -sf libgcc_s-%{gcc_version}-%{DATE}.so.1 %{buildroot}/%{_lib}/libgcc_s.so.1
78ce48
ln -sf /%{_lib}/libgcc_s.so.1 $FULLPATH/libgcc_s.so
78ce48
%ifarch sparcv9 ppc
78ce48
ln -sf /lib64/libgcc_s.so.1 $FULLPATH/64/libgcc_s.so
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
ln -sf /lib/libgcc_s.so.1 $FULLPATH/32/libgcc_s.so
78ce48
%endif
78ce48
78ce48
rm -f $FULLPATH/libgcc_s.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
GROUP ( /%{_lib}/libgcc_s.so.1 libgcc.a )' > $FULLPATH/libgcc_s.so
78ce48
%ifarch sparcv9 ppc
78ce48
rm -f $FULLPATH/64/libgcc_s.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
GROUP ( /lib64/libgcc_s.so.1 libgcc.a )' > $FULLPATH/64/libgcc_s.so
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
rm -f $FULLPATH/32/libgcc_s.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
GROUP ( /lib/libgcc_s.so.1 libgcc.a )' > $FULLPATH/32/libgcc_s.so
78ce48
%endif
78ce48
78ce48
%if %{build_libquadmath}
78ce48
%if 0%{?scl:1}
78ce48
%if 0%{?rhel} < 7
78ce48
cp -a %{gcc_target_platform}/libquadmath/.libs/libquadmathconvenience.a \
78ce48
  %{buildroot}%{_prefix}/%{_lib}/libquadmath.a
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.spec $FULLPATH/
78ce48
cp -a %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_nonshared%{nonsharedver}.a \
78ce48
  $FULLLPATH/libstdc++_nonshared.a
78ce48
%if %{build_fortran}
78ce48
cp -a %{gcc_target_platform}/libgfortran/.libs/libgfortran_nonshared%{nonsharedver}.a \
78ce48
  $FULLPATH/libgfortran_nonshared.a
78ce48
%ifarch sparcv9 ppc
78ce48
cp -a %{gcc_target_platform}/64/libgfortran/.libs/libgfortran_nonshared%{nonsharedver}.a \
78ce48
  $FULLPATH/64/libgfortran_nonshared.a
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
cp -a %{gcc_target_platform}/32/libgfortran/.libs/libgfortran_nonshared%{nonsharedver}.a \
78ce48
  $FULLPATH/32/libgfortran_nonshared.a
78ce48
%endif
78ce48
%endif
78ce48
78ce48
rm -f $FULLEPATH/libgccjit.so
78ce48
mkdir -p %{buildroot}%{_prefix}/%{_lib}/
78ce48
cp -a objlibgccjit/gcc/libgccjit.so.* %{buildroot}%{_prefix}/%{_lib}/
78ce48
rm -f $FULLPATH/libgccjit.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{_prefix}/%{_lib}/libgccjit.so.0 )' > $FULLPATH/libgccjit.so
78ce48
cp -a ../gcc/jit/libgccjit*.h $FULLPATH/include/
78ce48
/usr/bin/install -c -m 644 objlibgccjit/gcc/doc/libgccjit.info %{buildroot}/%{_infodir}/
78ce48
gzip -9 %{buildroot}/%{_infodir}/libgccjit.info
78ce48
78ce48
pushd $FULLPATH
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgomp.so.1 )' > libgomp.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 -lstdc++_nonshared )' > libstdc++.so
78ce48
%if %{build_fortran}
78ce48
rm -f libgfortran.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
INPUT ( -lgfortran_nonshared %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libgfortran.so.3 AS_NEEDED ( -ldl ) )' > libgfortran.so
78ce48
%endif
78ce48
%if %{build_libquadmath}
78ce48
rm -f libquadmath.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
%if 0%{!?scl:1}
78ce48
INPUT ( %{_prefix}/%{_lib}/libquadmath.so.0 )' > libquadmath.so
78ce48
%else
78ce48
%if 0%{?rhel} >= 7
78ce48
INPUT ( %{_root_prefix}/%{_lib}/libquadmath.so.0 )' > libquadmath.so
78ce48
%else
78ce48
INPUT ( libquadmath.a )' > libquadmath.so
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
rm -f libitm.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libitm.so.1 )' > libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
rm -f libatomic.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libatomic.so.1 )' > libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
rm -f libasan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libasan.so.3 )' > libasan.so
78ce48
%endif
78ce48
%if %{build_libtsan}
78ce48
rm -f libtsan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libtsan.so.0 )' > libtsan.so
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
rm -f libubsan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libubsan.so.0 )' > libubsan.so
78ce48
%endif
78ce48
%if %{build_liblsan}
78ce48
rm -f liblsan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/liblsan.so.0 )' > liblsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
rm -f libcilkrts.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libcilkrts.so.5 )' > libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
rm -f libmpx.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libmpx.so.2 )' > libmpx.so
78ce48
rm -f libmpxwrappers.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libmpxwrappers.so.2 )' > libmpxwrappers.so
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++.*a $FULLLPATH/
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libstdc++fs.*a $FULLLPATH/
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libsupc++.*a .
78ce48
%if %{build_fortran}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libgfortran.*a .
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libgomp.*a .
78ce48
%if %{build_libquadmath}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libquadmath.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libitm.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libatomic.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libasan.*a $FULLLPATH/
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libasan_preinit.o $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libtsan}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libtsan.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libubsan.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_liblsan}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/liblsan.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libcilkrts.*a $FULLLPATH/
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libmpx.*a $FULLLPATH/
78ce48
mv -f %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.*a $FULLLPATH/
78ce48
%endif
78ce48
78ce48
%ifarch sparcv9 ppc
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libstdc++.so.6 -lstdc++_nonshared )' > 64/libstdc++.so
78ce48
%if %{build_fortran}
78ce48
rm -f 64/libgfortran.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
INPUT ( -lgfortran_nonshared %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libgfortran.so.3 AS_NEEDED ( -ldl ) )' > 64/libgfortran.so
78ce48
%endif
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libgomp.so.1 )' > 64/libgomp.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{_prefix}/lib64/libgccjit.so.0 )' > 64/libgccjit.so
78ce48
%if %{build_libquadmath}
78ce48
rm -f 64/libquadmath.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
%if 0%{!?scl:1}
78ce48
INPUT ( %{_prefix}/lib64/libquadmath.so.0 )' > 64/libquadmath.so
78ce48
%else
78ce48
%if 0%{?rhel} >= 7
78ce48
INPUT ( %{_root_prefix}/lib64/libquadmath.so.0 )' > 64/libquadmath.so
78ce48
%else
78ce48
INPUT ( libquadmath.a )' > 64/libquadmath.so
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
rm -f 64/libitm.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libitm.so.1 )' > 64/libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
rm -f 64/libatomic.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libatomic.so.1 )' > 64/libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
rm -f 64/libasan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libasan.so.3 )' > 64/libasan.so
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
rm -f 64/libubsan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libubsan.so.0 )' > 64/libubsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
rm -f 64/libcilkrts.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libcilkrts.so.5 )' > 64/libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
rm -f 64/libmpx.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libmpx.so.2 )' > 64/libmpx.so
78ce48
rm -f 64/libmpxwrappers.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib64/libmpxwrappers.so.2 )' > 64/libmpxwrappers.so
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/lib64/libsupc++.*a 64/
78ce48
%if %{build_fortran}
78ce48
mv -f %{buildroot}%{_prefix}/lib64/libgfortran.*a 64/
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/lib64/libgomp.*a 64/
78ce48
%if %{build_libquadmath}
78ce48
mv -f %{buildroot}%{_prefix}/lib64/libquadmath.*a 64/
78ce48
%endif
78ce48
ln -sf lib32/libstdc++.a libstdc++.a
78ce48
ln -sf ../lib64/libstdc++.a 64/libstdc++.a
78ce48
ln -sf lib32/libstdc++fs.a libstdc++fs.a
78ce48
ln -sf ../lib64/libstdc++fs.a 64/libstdc++fs.a
78ce48
ln -sf lib32/libstdc++_nonshared.a libstdc++_nonshared.a
78ce48
ln -sf ../lib64/libstdc++_nonshared.a 64/libstdc++_nonshared.a
78ce48
%if %{build_libquadmath}
78ce48
ln -sf lib32/libquadmath.a libquadmath.a
78ce48
ln -sf ../lib64/libquadmath.a 64/libquadmath.a
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
ln -sf lib32/libitm.a libitm.a
78ce48
ln -sf ../lib64/libitm.a 64/libitm.a
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
ln -sf lib32/libatomic.a libatomic.a
78ce48
ln -sf ../lib64/libatomic.a 64/libatomic.a
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
ln -sf lib32/libasan.a libasan.a
78ce48
ln -sf ../lib64/libasan.a 64/libasan.a
78ce48
ln -sf lib32/libasan_preinit.o libasan_preinit.o
78ce48
ln -sf ../lib64/libasan_preinit.o 64/libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
ln -sf lib32/libubsan.a libubsan.a
78ce48
ln -sf ../lib64/libubsan.a 64/libubsan.a
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
ln -sf lib32/libcilkrts.a libcilkrts.a
78ce48
ln -sf ../lib64/libcilkrts.a 64/libcilkrts.a
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
ln -sf lib32/libmpx.a libmpx.a
78ce48
ln -sf ../lib64/libmpx.a 64/libmpx.a
78ce48
ln -sf lib32/libmpxwrappers.a libmpxwrappers.a
78ce48
ln -sf ../lib64/libmpxwrappers.a 64/libmpxwrappers.a
78ce48
%endif
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
mkdir -p 32
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libstdc++.so.6 -lstdc++_nonshared )' > 32/libstdc++.so
78ce48
%if %{build_fortran}
78ce48
rm -f 32/libgfortran.so
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat2}
78ce48
INPUT ( -lgfortran_nonshared %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgfortran.so.3 AS_NEEDED ( -ldl ) )' > 32/libgfortran.so
78ce48
%endif
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libgomp.so.1 )' > 32/libgomp.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{_prefix}/lib/libgccjit.so.0 )' > 32/libgccjit.so
78ce48
%if %{build_libquadmath}
78ce48
rm -f 32/libquadmath.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
%if 0%{!?scl:1}
78ce48
INPUT ( %{_prefix}/lib/libquadmath.so.0 )' > 32/libquadmath.so
78ce48
%else
78ce48
%if 0%{?rhel} >= 7
78ce48
INPUT ( %{_root_prefix}/lib/libquadmath.so.0 )' > 32/libquadmath.so
78ce48
%else
78ce48
INPUT ( libquadmath.a )' > 32/libquadmath.so
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
rm -f 32/libitm.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libitm.so.1 )' > 32/libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
rm -f 32/libatomic.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libatomic.so.1 )' > 32/libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
rm -f 32/libasan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libasan.so.3 )' > 32/libasan.so
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
rm -f 32/libubsan.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libubsan.so.0 )' > 32/libubsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
rm -f 32/libcilkrts.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libcilkrts.so.5 )' > 32/libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
rm -f 32/libmpx.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libmpx.so.2 )' > 32/libmpx.so
78ce48
rm -f 32/libmpxwrappers.so
78ce48
echo '/* GNU ld script */
78ce48
%{oformat2}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/libmpxwrappers.so.2 )' > 32/libmpxwrappers.so
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/lib/libsupc++.*a 32/
78ce48
%if %{build_fortran}
78ce48
mv -f %{buildroot}%{_prefix}/lib/libgfortran.*a 32/
78ce48
%endif
78ce48
mv -f %{buildroot}%{_prefix}/lib/libgomp.*a 32/
78ce48
%if %{build_libquadmath}
78ce48
mv -f %{buildroot}%{_prefix}/lib/libquadmath.*a 32/
78ce48
%endif
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
ln -sf ../lib32/libstdc++.a 32/libstdc++.a
78ce48
ln -sf lib64/libstdc++.a libstdc++.a
78ce48
ln -sf ../lib32/libstdc++fs.a 32/libstdc++fs.a
78ce48
ln -sf lib64/libstdc++fs.a libstdc++fs.a
78ce48
ln -sf ../lib32/libstdc++_nonshared.a 32/libstdc++_nonshared.a
78ce48
ln -sf lib64/libstdc++_nonshared.a libstdc++_nonshared.a
78ce48
%if %{build_libquadmath}
78ce48
ln -sf ../lib32/libquadmath.a 32/libquadmath.a
78ce48
ln -sf lib64/libquadmath.a libquadmath.a
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
ln -sf ../lib32/libitm.a 32/libitm.a
78ce48
ln -sf lib64/libitm.a libitm.a
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
ln -sf ../lib32/libatomic.a 32/libatomic.a
78ce48
ln -sf lib64/libatomic.a libatomic.a
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
ln -sf ../lib32/libasan.a 32/libasan.a
78ce48
ln -sf lib64/libasan.a libasan.a
78ce48
ln -sf ../lib32/libasan_preinit.o 32/libasan_preinit.o
78ce48
ln -sf lib64/libasan_preinit.o libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
ln -sf ../lib32/libubsan.a 32/libubsan.a
78ce48
ln -sf lib64/libubsan.a libubsan.a
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
ln -sf ../lib32/libcilkrts.a 32/libcilkrts.a
78ce48
ln -sf lib64/libcilkrts.a libcilkrts.a
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
ln -sf ../lib32/libmpx.a 32/libmpx.a
78ce48
ln -sf lib64/libmpx.a libmpx.a
78ce48
ln -sf ../lib32/libmpxwrappers.a 32/libmpxwrappers.a
78ce48
ln -sf lib64/libmpxwrappers.a libmpxwrappers.a
78ce48
%endif
78ce48
%else
78ce48
%ifarch %{multilib_64_archs}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libstdc++.a 32/libstdc++.a
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libstdc++fs.a 32/libstdc++fs.a
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libstdc++_nonshared.a 32/libstdc++_nonshared.a
78ce48
%if %{build_libquadmath}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libquadmath.a 32/libquadmath.a
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libitm.a 32/libitm.a
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libatomic.a 32/libatomic.a
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libasan.a 32/libasan.a
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libasan_preinit.o 32/libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libubsan.a 32/libubsan.a
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libcilkrts.a 32/libcilkrts.a
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libmpx.a 32/libmpx.a
78ce48
ln -sf ../../../%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}/%{gcc_version}/libmpxwrappers.a 32/libmpxwrappers.a
78ce48
%endif
78ce48
%endif
78ce48
%endif
78ce48
78ce48
# If we are building a debug package then copy all of the static archives
78ce48
# into the debug directory to keep them as unstripped copies.
78ce48
%if 0%{?_enable_debug_packages}
78ce48
mkdir -p $RPM_BUILD_ROOT%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/debug%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
adirs="$FULLPATH"
78ce48
if [ $FULLLPATH -ne $FULLPATH ]; then
78ce48
  adirs="$adirs $FULLLPATH"
78ce48
fi
78ce48
for f in `find $adirs -maxdepth 1 -a \
78ce48
		 \( -name libgfortran.a -o -name libgomp.a \
78ce48
		    -o -name libgcc.a -o -name libgcc_eh.a -o -name libgcov.a \
78ce48
		    -o -name libquadmath.a -o -name libitm.a \
78ce48
		    -o -name libatomic.a -o -name libasan.a \
78ce48
		    -o -name libtsan.a -o -name libubsan.a \
78ce48
		    -o -name liblsan.a -o -name libcilkrts.a \
78ce48
		    -o -name libmpx.a -o -name libmpxwrappers.a \
78ce48
		    -o -name libcc1.a -o -name libstdc++_nonshared.a \
78ce48
		    -o -name libgfortran_nonshared.a -o -name libsupc++.a \
78ce48
		    -o -name libstdc++.a -o -name libcaf_single.a \
78ce48
		    -o -name libstdc++fs.a \) -a -type f`; do
78ce48
  cp -a $f $RPM_BUILD_ROOT%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/lib/debug%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/
78ce48
done
78ce48
%endif
78ce48
78ce48
# Strip debug info from Fortran/ObjC/Java static libraries
78ce48
strip -g `find . \( -name libgfortran.a  -o -name libgomp.a \
78ce48
		    -o -name libgcc.a -o -name libgcov.a \
78ce48
		    -o -name libquadmath.a -o -name libitm.a \
78ce48
		    -o -name libatomic.a -o -name libasan.a \
78ce48
		    -o -name libtsan.a -o -name libubsan.a \
78ce48
		    -o -name liblsan.a -o -name libcilkrts.a \
78ce48
		    -o -name libmpx.a -o -name libmpxwrappers.a \
78ce48
		    -o -name libcc1.a \) -a -type f`
78ce48
popd
78ce48
%if %{build_fortran}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgfortran.so.3.*
78ce48
%endif
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libgomp.so.1.*
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcc1.so.0.*
78ce48
%if %{build_libquadmath}
78ce48
%if 0%{!?scl:1}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libquadmath.so.0.*
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libitm.so.1.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libitm.so.1* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
mv %{buildroot}%{_infodir}/libitm.info* %{buildroot}%{_root_infodir}/
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libatomic.so.1* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libasan.so.3.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libasan.so.3* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libtsan}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libtsan.so.0.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libtsan.so.0* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libubsan.so.0.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libubsan.so.0* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_liblsan}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/liblsan.so.0* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mkdir -p %{buildroot}%{_root_infodir}
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libcilkrts.so.5.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libcilkrts.so.5* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libmpx.so.2.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libmpx.so.2* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
%endif
78ce48
chmod 755 %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.so.2.*
78ce48
%if 0%{?scl:1}
78ce48
mkdir -p %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
mv %{buildroot}%{_prefix}/%{_lib}/libmpxwrappers.so.2* %{buildroot}%{_root_prefix}/%{_lib}/
78ce48
%endif
78ce48
%endif
78ce48
78ce48
mv $FULLPATH/include-fixed/syslimits.h $FULLPATH/include/syslimits.h
78ce48
mv $FULLPATH/include-fixed/limits.h $FULLPATH/include/limits.h
78ce48
for h in `find $FULLPATH/include -name \*.h`; do
78ce48
  if grep -q 'It has been auto-edited by fixincludes from' $h; then
78ce48
    rh=`grep -A2 'It has been auto-edited by fixincludes from' $h | tail -1 | sed 's|^.*"\(.*\)".*$|\1|'`
78ce48
    diff -up $rh $h || :
78ce48
    rm -f $h
78ce48
  fi
78ce48
done
78ce48
78ce48
cd ..
78ce48
78ce48
%if 0%{!?scl:1}
78ce48
for i in %{buildroot}%{_prefix}/bin/{*gcc,*++,gcov,gfortran,gcc-ar,gcc-nm,gcc-ranlib}; do
78ce48
  mv -f $i ${i}5
78ce48
done
78ce48
%endif
78ce48
78ce48
# Remove binaries we will not be including, so that they don't end up in
78ce48
# gcc6-debuginfo
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/{libffi*,libiberty.a,libmudflap*,libstdc++*,libgfortran*}
78ce48
%if 0%{?scl:1}
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/{libquadmath*,libitm*,libatomic*,libasan*,libtsan*,libubsan*,liblsan*}
78ce48
%else
78ce48
%if 0%{rhel} >= 7
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/{libitm*,libatomic*}
78ce48
%endif
78ce48
%endif
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/libgomp*
78ce48
rm -f $FULLEPATH/install-tools/{mkheaders,fixincl}
78ce48
rm -f %{buildroot}%{_prefix}/lib/{32,64}/libiberty.a
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/libssp*
78ce48
rm -f %{buildroot}%{_prefix}/%{_lib}/libvtv* || :
78ce48
rm -f %{buildroot}/lib/cpp
78ce48
rm -f %{buildroot}/%{_lib}/libgcc_s*
78ce48
rm -f %{buildroot}%{_prefix}/bin/{f95,gccbug,gnatgcc*}
78ce48
rm -f %{buildroot}%{_prefix}/bin/%{gcc_target_platform}-gfortran
78ce48
%if 0%{!?scl:1}
78ce48
rm -f %{buildroot}%{_prefix}/bin/{*c++*,cc,cpp}
78ce48
%endif
78ce48
rm -f %{buildroot}%{_prefix}/bin/%{_target_platform}-gfortran || :
78ce48
78ce48
%ifarch %{multilib_64_archs}
78ce48
# Remove libraries for the other arch on multilib arches
78ce48
rm -f %{buildroot}%{_prefix}/lib/lib*.so*
78ce48
rm -f %{buildroot}%{_prefix}/lib/lib*.a
78ce48
rm -f %{buildroot}/lib/libgcc_s*.so*
78ce48
%else
78ce48
%ifarch sparcv9 ppc
78ce48
rm -f %{buildroot}%{_prefix}/lib64/lib*.so*
78ce48
rm -f %{buildroot}%{_prefix}/lib64/lib*.a
78ce48
rm -f %{buildroot}/lib64/libgcc_s*.so*
78ce48
%endif
78ce48
%endif
78ce48
78ce48
%ifnarch sparc64 ppc64
78ce48
%ifarch %{multilib_64_archs}
78ce48
cat <<\EOF > %{buildroot}%{_prefix}/bin/%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}-gcc-%{version}
78ce48
#!/bin/sh
78ce48
%ifarch s390x
78ce48
exec %{gcc_target_platform}-gcc-%{version} -m31 "$@"
78ce48
%else
78ce48
exec %{gcc_target_platform}-gcc-%{version} -m32 "$@"
78ce48
%endif
78ce48
EOF
78ce48
chmod 755 %{buildroot}%{_prefix}/bin/%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}-gcc-%{version}
78ce48
%endif
78ce48
%endif
78ce48
78ce48
# Help plugins find out nvra.
78ce48
echo gcc-%{version}-%{release}.%{arch} > $FULLPATH/rpmver
78ce48
78ce48
%check
78ce48
cd obj-%{gcc_target_platform}
78ce48
78ce48
%{?scl:PATH=%{_bindir}${PATH:+:${PATH}}}
78ce48
78ce48
# Test against the system libstdc++.so.6 + libstdc++_nonshared.a combo
78ce48
mv %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6{,.not_here}
78ce48
mv %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so{,.not_here}
78ce48
ln -sf %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 \
78ce48
  %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so.6
78ce48
echo '/* GNU ld script
78ce48
   Use the shared library, but some functions are only in
78ce48
   the static library, so try that secondarily.  */
78ce48
%{oformat}
78ce48
INPUT ( %{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libstdc++.so.6 -lstdc++_nonshared )' \
78ce48
  > %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++.so
78ce48
cp -a %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_nonshared%{nonsharedver}.a \
78ce48
  %{gcc_target_platform}/libstdc++-v3/src/.libs/libstdc++_nonshared.a
78ce48
78ce48
# run the tests.
78ce48
make %{?_smp_mflags} -k check RUNTESTFLAGS="--target_board=unix/'{,-fstack-protector}'" || :
78ce48
( LC_ALL=C ../contrib/test_summary -t || : ) 2>&1 | sed -n '/^cat.*EOF/,/^EOF/{/^cat.*EOF/d;/^EOF/d;/^LAST_UPDATED:/d;p;}' > testresults
78ce48
rm -rf gcc/testsuite.prev
78ce48
mv gcc/testsuite{,.prev}
78ce48
rm -f gcc/site.exp
78ce48
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" || :
78ce48
mv gcc/testsuite/gcc/gcc.sum{,.sent}
78ce48
mv gcc/testsuite/g++/g++.sum{,.sent}
78ce48
( 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
78ce48
rm -rf gcc/testsuite.compat
78ce48
mv gcc/testsuite{,.compat}
78ce48
mv gcc/testsuite{.prev,}
78ce48
echo ====================TESTING=========================
78ce48
cat testresults
78ce48
echo ===`gcc --version | head -1` compatibility tests====
78ce48
cat testresults2
78ce48
echo ====================TESTING END=====================
78ce48
mkdir testlogs-%{_target_platform}-%{version}-%{release}
78ce48
for i in `find . -name \*.log | grep -F testsuite/ | grep -v 'config.log\|acats.*/tests/'`; do
78ce48
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/ || :
78ce48
done
78ce48
for i in `find gcc/testsuite.compat -name \*.log | grep -v 'config.log\|acats.*/tests/'`; do
78ce48
  ln $i testlogs-%{_target_platform}-%{version}-%{release}/`basename $i`.compat || :
78ce48
done
78ce48
tar cf - testlogs-%{_target_platform}-%{version}-%{release} | bzip2 -9c \
78ce48
  | uuencode testlogs-%{_target_platform}.tar.bz2 || :
78ce48
rm -rf testlogs-%{_target_platform}-%{version}-%{release}
78ce48
78ce48
%clean
78ce48
rm -rf %{buildroot}
78ce48
78ce48
%if 0%{?scl:1}
78ce48
%post gfortran
78ce48
if [ -f %{_infodir}/gfortran.info.gz ]; then
78ce48
  /sbin/install-info \
78ce48
    --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
78ce48
fi
78ce48
78ce48
%preun gfortran
78ce48
if [ $1 = 0 -a -f %{_infodir}/gfortran.info.gz ]; then
78ce48
  /sbin/install-info --delete \
78ce48
    --info-dir=%{_infodir} %{_infodir}/gfortran.info.gz || :
78ce48
fi
78ce48
%endif
78ce48
78ce48
%post gdb-plugin -p /sbin/ldconfig
78ce48
78ce48
%postun gdb-plugin -p /sbin/ldconfig
78ce48
78ce48
%post -n %{?scl_prefix}libgccjit -p /sbin/ldconfig
78ce48
78ce48
%postun -n %{?scl_prefix}libgccjit -p /sbin/ldconfig
78ce48
78ce48
%post -n %{?scl_prefix}libgccjit-docs
78ce48
if [ -f %{_infodir}/libgccjit.info.gz ]; then
78ce48
  /sbin/install-info \
78ce48
    --info-dir=%{_infodir} %{_infodir}/libgccjit.info.gz || :
78ce48
fi
78ce48
78ce48
%preun -n %{?scl_prefix}libgccjit-docs
78ce48
if [ $1 = 0 -a -f %{_infodir}/libgccjit.info.gz ]; then
78ce48
  /sbin/install-info --delete \
78ce48
    --info-dir=%{_infodir} %{_infodir}/libgccjit.info.gz || :
78ce48
fi
78ce48
78ce48
%post -n %{?scl_prefix}libquadmath
78ce48
/sbin/ldconfig
78ce48
if [ -f %{_infodir}/libquadmath.info.gz ]; then
78ce48
  /sbin/install-info \
78ce48
    --info-dir=%{_infodir} %{_infodir}/libquadmath.info.gz || :
78ce48
fi
78ce48
78ce48
%preun -n %{?scl_prefix}libquadmath
78ce48
if [ $1 = 0 -a -f %{_infodir}/libquadmath.info.gz ]; then
78ce48
  /sbin/install-info --delete \
78ce48
    --info-dir=%{_infodir} %{_infodir}/libquadmath.info.gz || :
78ce48
fi
78ce48
78ce48
%postun -n %{?scl_prefix}libquadmath -p /sbin/ldconfig
78ce48
78ce48
%post -n libitm
78ce48
/sbin/ldconfig
78ce48
if [ -f %{?scl:%{_root_infodir}}%{!?scl:%{_infodir}}/libitm.info.gz ]; then
78ce48
  /sbin/install-info \
78ce48
    --info-dir=%{?scl:%{_root_infodir}}%{!?scl:%{_infodir}} %{?scl:%{_root_infodir}}%{!?scl:%{_infodir}}/libitm.info.gz || :
78ce48
fi
78ce48
78ce48
%preun -n libitm
78ce48
if [ $1 = 0 -a -f %{?scl:%{_root_infodir}}%{!?scl:%{_infodir}}/libitm.info.gz ]; then
78ce48
  /sbin/install-info --delete \
78ce48
    --info-dir=%{?scl:%{_root_infodir}}%{!?scl:%{_infodir}} %{?scl:%{_root_infodir}}%{!?scl:%{_infodir}}/libitm.info.gz || :
78ce48
fi
78ce48
78ce48
%postun -n libitm -p /sbin/ldconfig
78ce48
78ce48
%post -n libatomic -p /sbin/ldconfig
78ce48
78ce48
%postun -n libatomic -p /sbin/ldconfig
78ce48
78ce48
%post -n libasan3 -p /sbin/ldconfig
78ce48
78ce48
%postun -n libasan3 -p /sbin/ldconfig
78ce48
78ce48
%post -n libtsan -p /sbin/ldconfig
78ce48
78ce48
%postun -n libtsan -p /sbin/ldconfig
78ce48
78ce48
%post -n libubsan -p /sbin/ldconfig
78ce48
78ce48
%postun -n libubsan -p /sbin/ldconfig
78ce48
78ce48
%post -n liblsan -p /sbin/ldconfig
78ce48
78ce48
%postun -n liblsan -p /sbin/ldconfig
78ce48
78ce48
%post -n libcilkrts -p /sbin/ldconfig
78ce48
78ce48
%postun -n libcilkrts -p /sbin/ldconfig
78ce48
78ce48
%post -n libmpx -p /sbin/ldconfig
78ce48
78ce48
%postun -n libmpx -p /sbin/ldconfig
78ce48
78ce48
%files
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/bin/gcc%{!?scl:5}
78ce48
%{_prefix}/bin/gcov%{!?scl:5}
78ce48
%{_prefix}/bin/gcov-tool%{!?scl:5}
78ce48
%{_prefix}/bin/gcc-ar%{!?scl:5}
78ce48
%{_prefix}/bin/gcc-nm%{!?scl:5}
78ce48
%{_prefix}/bin/gcc-ranlib%{!?scl:5}
78ce48
%ifarch ppc
78ce48
%{_prefix}/bin/%{_target_platform}-gcc%{!?scl:5}
78ce48
%endif
78ce48
%ifarch sparc64 sparcv9
78ce48
%{_prefix}/bin/sparc-%{_vendor}-%{_target_os}%{?_gnu}-gcc%{!?scl:5}
78ce48
%endif
78ce48
%ifarch ppc64
78ce48
%{_prefix}/bin/ppc-%{_vendor}-%{_target_os}%{?_gnu}-gcc%{!?scl:5}
78ce48
%endif
78ce48
%{_prefix}/bin/%{gcc_target_platform}-gcc%{!?scl:5}
78ce48
%{_prefix}/bin/%{gcc_target_platform}-gcc-%{version}
78ce48
%ifnarch sparc64 ppc64
78ce48
%ifarch %{multilib_64_archs}
78ce48
%{_prefix}/bin/%{multilib_32_arch}-%{_vendor}-%{_target_os}%{?_gnu}-gcc-%{version}
78ce48
%endif
78ce48
%endif
78ce48
%if 0%{?scl:1}
78ce48
%{_prefix}/bin/cc
78ce48
%{_prefix}/bin/cpp
78ce48
%{_mandir}/man1/gcc.1*
78ce48
%{_mandir}/man1/cpp.1*
78ce48
%{_mandir}/man1/gcov.1*
78ce48
%{_infodir}/gcc*
78ce48
%{_infodir}/cpp*
78ce48
%endif
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/libexec/gcc
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/rpmver
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stddef.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdarg.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdfix.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/varargs.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/float.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/limits.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdbool.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/iso646.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/syslimits.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/omp.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/openacc.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdint-gcc.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdalign.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdnoreturn.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/stdatomic.h
78ce48
%ifarch %{ix86} x86_64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/emmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/pmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/tmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ammintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/smmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/nmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/wmmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/immintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avxintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/x86intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fma4intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xopintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/lwpintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/popcntintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmiintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/tbmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ia32intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx2intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/bmi2intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/f16cintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fmaintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/lzcntintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/rtmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xtestintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/adxintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/prfchwintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/rdseedintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/fxsrintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsaveoptintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512cdintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512erintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512fintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512pfintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/shaintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm_malloc.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mm3dnow.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cpuid.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cross-stdarg.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512bwintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512dqintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmaintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512ifmavlintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmiintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vbmivlintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlbwintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vldqintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/avx512vlintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/clflushoptintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/clwbintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/pcommitintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mwaitxintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavecintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/xsavesintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/clzerointrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/pkuintrin.h
78ce48
%endif
78ce48
%ifarch ia64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ia64intrin.h
78ce48
%endif
78ce48
%ifarch ppc ppc64 ppc64le ppc64p7
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ppc-asm.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/altivec.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/spe.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/paired.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/ppu_intrinsics.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/si2vmx.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/spu2vmx.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/vec_types.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmxlintrin.h
78ce48
%endif
78ce48
%ifarch %{arm}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/unwind-arm-common.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/mmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h
78ce48
%endif
78ce48
%ifarch aarch64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_neon.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/arm_acle.h
78ce48
%endif
78ce48
%ifarch sparc sparcv9 sparc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/visintrin.h
78ce48
%endif
78ce48
%ifarch s390 s390x
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/s390intrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/htmxlintrin.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/vecintrin.h
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/cilk
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcilkrts.spec
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpx.spec
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/sanitizer
78ce48
%endif
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto1
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/lto-wrapper
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/liblto_plugin.so*
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/collect2
78ce48
%if 0%{?scl:1}
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ar
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/as
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ld
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ld.bfd
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ld.gold
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/nm
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/ranlib
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/strip
78ce48
%endif
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/crt*.o
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgcov.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_eh.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgcc_s.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.spec
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgomp.so
78ce48
%if %{build_libitm}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.spec
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsanitizer.spec
78ce48
%endif
78ce48
%ifarch sparcv9 sparc64 ppc ppc64
78ce48
%if %{build_libquadmath}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so
78ce48
%endif
78ce48
%endif
78ce48
%if %{build_isl}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libisl.so.*
78ce48
%endif
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/crt*.o
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcov.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_eh.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgcc_s.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgomp.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgccjit.so
78ce48
%if %{build_libquadmath}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libquadmath.so
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libubsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libcilkrts.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libmpx.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libmpx.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libmpxwrappers.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libmpxwrappers.so
78ce48
%endif
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/crt*.o
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcov.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_eh.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgcc_s.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgomp.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgccjit.so
78ce48
%if %{build_libquadmath}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libquadmath.so
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libubsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libcilkrts.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmpx.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmpx.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmpxwrappers.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libmpxwrappers.so
78ce48
%endif
78ce48
%endif
78ce48
%ifarch sparcv9 sparc64 ppc ppc64
78ce48
%if %{build_libquadmath}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so
78ce48
%endif
78ce48
%if %{build_libitm}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.so
78ce48
%endif
78ce48
%if %{build_libatomic}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so
78ce48
%endif
78ce48
%if %{build_libasan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o
78ce48
%endif
78ce48
%if %{build_libtsan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.so
78ce48
%endif
78ce48
%if %{build_libubsan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so
78ce48
%endif
78ce48
%if %{build_liblsan}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.so
78ce48
%endif
78ce48
%if %{build_libcilkrts}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcilkrts.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcilkrts.so
78ce48
%endif
78ce48
%if %{build_libmpx}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpx.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpx.so
78ce48
%endif
78ce48
%endif
78ce48
%doc gcc/README* rpm.doc/changelogs/gcc/ChangeLog* gcc/COPYING* COPYING.RUNTIME
78ce48
78ce48
%files c++
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/bin/%{gcc_target_platform}-g++%{!?scl:5}
78ce48
%{_prefix}/bin/g++%{!?scl:5}
78ce48
%if 0%{?scl:1}
78ce48
%{_prefix}/bin/%{gcc_target_platform}-c++
78ce48
%{_prefix}/bin/c++
78ce48
%{_mandir}/man1/g++.1*
78ce48
%endif
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/libexec/gcc
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/cc1plus
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libstdc++.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libstdc++_nonshared.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libsupc++.a
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libstdc++_nonshared.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libsupc++.a
78ce48
%endif
78ce48
%ifarch sparcv9 ppc %{multilib_64_archs}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a
78ce48
%endif
78ce48
%ifarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++_nonshared.a
78ce48
%endif
78ce48
%doc rpm.doc/changelogs/gcc/cp/ChangeLog*
78ce48
78ce48
%files -n %{?scl_prefix}libstdc++%{!?scl:5}-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/include/c++
78ce48
%dir %{_prefix}/include/c++/%{gcc_version}
78ce48
%{_prefix}/include/c++/%{gcc_version}/[^gjos]*
78ce48
%{_prefix}/include/c++/%{gcc_version}/os*
78ce48
%{_prefix}/include/c++/%{gcc_version}/s[^u]*
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libstdc++_nonshared.a
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libstdc++_nonshared.a
78ce48
%endif
78ce48
%ifnarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++fs.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++_nonshared.a
78ce48
%endif
78ce48
%ifnarch sparcv9 ppc %{multilib_64_archs}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libstdc++.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libsupc++.a
78ce48
%endif
78ce48
%doc rpm.doc/changelogs/libstdc++-v3/ChangeLog* libstdc++-v3/README*
78ce48
78ce48
%if %{build_libstdcxx_docs}
78ce48
%files -n %{?scl_prefix}libstdc++%{!?scl:5}-docs
78ce48
%defattr(-,root,root)
78ce48
%{_mandir}/man3/*
78ce48
%doc rpm.doc/libstdc++-v3/html
78ce48
%endif
78ce48
78ce48
%if %{build_fortran}
78ce48
%files gfortran
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/bin/gfortran%{!?scl:5}
78ce48
%if 0%{?scl:1}
78ce48
%{_mandir}/man1/gfortran.1*
78ce48
%{_infodir}/gfortran*
78ce48
%endif
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/libexec/gcc
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib.f90
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/omp_lib_kinds.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/openacc.f90
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/openacc.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/openacc_kinds.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/openacc_lib.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/ieee_arithmetic.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/ieee_exceptions.mod
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/finclude/ieee_features.mod
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/f951
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgfortran.spec
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcaf_single.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgfortran.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgfortran.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgfortran_nonshared.a
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libcaf_single.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgfortran.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgfortran.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/libgfortran_nonshared.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/64/finclude
78ce48
%endif
78ce48
%ifarch %{multilib_64_archs}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libcaf_single.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgfortran.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgfortran.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/libgfortran_nonshared.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/32/finclude
78ce48
%endif
78ce48
%doc rpm.doc/gfortran/*
78ce48
%endif
78ce48
78ce48
%if %{build_libquadmath}
78ce48
%if 0%{!?scl:1}
78ce48
%files -n %{?scl_prefix}libquadmath
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/%{_lib}/libquadmath.so.0*
78ce48
%{_infodir}/libquadmath.info*
78ce48
%doc rpm.doc/libquadmath/COPYING*
78ce48
%endif
78ce48
78ce48
%files -n %{?scl_prefix}libquadmath-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath.h
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/quadmath_weak.h
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libquadmath.a
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libquadmath.a
78ce48
%endif
78ce48
%ifnarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libquadmath.so
78ce48
%endif
78ce48
%doc rpm.doc/libquadmath/ChangeLog*
78ce48
%endif
78ce48
78ce48
%if %{build_libitm}
78ce48
%if 0%{?rhel} < 7
78ce48
%files -n libitm
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libitm.so.1*
78ce48
%{?scl:%{_root_infodir}}%{!?scl:%{_infodir}}/libitm.info*
78ce48
%endif
78ce48
78ce48
%files -n %{?scl_prefix}libitm-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libitm.a
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libitm.a
78ce48
%endif
78ce48
%ifnarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libitm.a
78ce48
%endif
78ce48
%doc rpm.doc/libitm/ChangeLog*
78ce48
%endif
78ce48
78ce48
%if %{build_libatomic}
78ce48
%if 0%{?rhel} < 7
78ce48
%files -n libatomic
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libatomic.so.1*
78ce48
%endif
78ce48
78ce48
%files -n %{?scl_prefix}libatomic-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libatomic.a
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libatomic.a
78ce48
%endif
78ce48
%ifnarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libatomic.a
78ce48
%endif
78ce48
%doc rpm.doc/changelogs/libatomic/ChangeLog*
78ce48
%endif
78ce48
78ce48
%if %{build_libasan}
78ce48
%files -n libasan3
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libasan.so.3*
78ce48
78ce48
%files -n %{?scl_prefix}libasan-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%ifarch sparcv9 ppc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib32/libasan_preinit.o
78ce48
%endif
78ce48
%ifarch sparc64 ppc64
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/lib64/libasan_preinit.o
78ce48
%endif
78ce48
%ifnarch sparcv9 sparc64 ppc ppc64
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libasan_preinit.o
78ce48
%endif
78ce48
%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
78ce48
%endif
78ce48
78ce48
%if %{build_libtsan}
78ce48
%files -n libtsan
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libtsan.so.0*
78ce48
78ce48
%files -n %{?scl_prefix}libtsan-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libtsan.a
78ce48
%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
78ce48
%endif
78ce48
78ce48
%if %{build_libubsan}
78ce48
%files -n libubsan
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libubsan.so.0*
78ce48
78ce48
%files -n %{?scl_prefix}libubsan-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libubsan.a
78ce48
%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
78ce48
%endif
78ce48
78ce48
%if %{build_liblsan}
78ce48
%files -n liblsan
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/liblsan.so.0*
78ce48
78ce48
%files -n %{?scl_prefix}liblsan-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/liblsan.a
78ce48
%doc rpm.doc/changelogs/libsanitizer/ChangeLog* libsanitizer/LICENSE.TXT
78ce48
%endif
78ce48
78ce48
%if %{build_libcilkrts}
78ce48
%files -n libcilkrts
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libcilkrts.so.5*
78ce48
78ce48
%files -n %{?scl_prefix}libcilkrts-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcilkrts.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libcilkrts.a
78ce48
%doc rpm.doc/changelogs/libcilkrts/ChangeLog* libcilkrts/README
78ce48
%endif
78ce48
78ce48
%if %{build_libmpx}
78ce48
%files -n libmpx
78ce48
%defattr(-,root,root,-)
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libmpx.so.2*
78ce48
%{?scl:%{_root_prefix}}%{!?scl:%{_prefix}}/%{_lib}/libmpxwrappers.so.2*
78ce48
78ce48
%files -n %{?scl_prefix}libmpx-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpx.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpx.a
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpxwrappers.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libmpxwrappers.a
78ce48
%doc rpm.doc/changelogs/libmpx/ChangeLog*
78ce48
%endif
78ce48
78ce48
%files -n %{?scl_prefix}libgccjit
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/%{_lib}/libgccjit.so*
78ce48
%doc rpm.doc/changelogs/gcc/jit/ChangeLog*
78ce48
78ce48
%files -n %{?scl_prefix}libgccjit-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/libgccjit.so
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/include/libgccjit*.h
78ce48
78ce48
%files -n %{?scl_prefix}libgccjit-docs
78ce48
%defattr(-,root,root,-)
78ce48
%{_infodir}/libgccjit.info*
78ce48
%doc rpm.doc/libgccjit-devel/*
78ce48
%doc gcc/jit/docs/examples
78ce48
78ce48
%files plugin-devel
78ce48
%defattr(-,root,root,-)
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/gtype.state
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/include
78ce48
%dir %{_prefix}/libexec/gcc
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%{_prefix}/libexec/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
78ce48
78ce48
%files gdb-plugin
78ce48
%defattr(-,root,root,-)
78ce48
%{_prefix}/%{_lib}/libcc1.so*
78ce48
%dir %{_prefix}/lib/gcc
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}
78ce48
%dir %{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin
78ce48
%{_prefix}/lib/gcc/%{gcc_target_platform}/%{gcc_version}/plugin/libcc1plugin.so*
78ce48
%doc rpm.doc/changelogs/libcc1/ChangeLog*
78ce48
78ce48
%changelog
78ce48
* Thu Oct 20 2016 Marek Polacek <polacek@redhat.com> 6.2.1-3.1
78ce48
- rename libasan2 to libasan3 (#1386146)
78ce48
- update old references to GCC 5
78ce48
78ce48
* Fri Oct  7 2016 Marek Polacek <polacek@redhat.com> 6.2.1-3
78ce48
- add arm_neon.h and arm_acle.h intrinsic headers on aarch64 (#1382733)
78ce48
78ce48
* Fri Sep 16 2016 Jakub Jelinek <jakub@redhat.com> 6.2.1-2
78ce48
- update from Fedora 6.2.1-2
78ce48
78ce48
* Thu Sep  1 2016 Jakub Jelinek <jakub@redhat.com> 6.2.1-1
78ce48
- update from Fedora 6.2.1-1
78ce48
78ce48
* Thu Aug 18 2016 Jakub Jelinek <jakub@redhat.com> 6.1.1-6
78ce48
- update from Fedora 6.1.1-6
78ce48
- reenable tsan on aarch64
78ce48
78ce48
* Wed Aug 10 2016 Jakub Jelinek <jakub@redhat.com> 6.1.1-5
78ce48
- update from Fedora 6.1.1-5
78ce48
- make sure to use DTS strip and objdump during brp scripts (#1365531,
78ce48
  #1365602)
78ce48
- use DTS binutils even on RHEL7
78ce48
78ce48
* Mon Aug  1 2016 Marek Polacek <polacek@redhat.com> 6.1.1-4.1
78ce48
- disable tsan on aarch64 (#1361770)
78ce48
78ce48
* Thu Jul 21 2016 Jakub Jelinek <jakub@redhat.com> 6.1.1-4
78ce48
- new package