%define quadmath_arch %ix86 x86_64 ia64
%define tsan_arch x86_64
-%define asan_arch x86_64 %ix86 ppc ppc64
+%define asan_arch x86_64 %ix86 ppc ppc64 %arm
%define itm_arch x86_64 %ix86 %arm ppc ppc64
%define atomic_arch x86_64 %ix86 %arm ppc ppc64 s390 s390x
%define build_libjava 0
%define build_cp 1
-%define build_fortran !0%{?building_libjava:1}%{?building_libffi:1}
-%define build_objc !0%{?building_libjava:1}%{?building_libffi:1}
-%define build_objcp !0%{?building_libjava:1}%{?building_libffi:1}
+%define build_fortran 0%{?building_libjava:1}%{?building_libffi:1}
+%define build_objc 0%{?building_libjava:1}%{?building_libffi:1}
+%define build_objcp 0%{?building_libjava:1}%{?building_libffi:1}
%define build_with_mudflap 0
%if %{build_objcp}
URL: http://gcc.gnu.org/
Version: 4.8.1
Release: 1
-%define gcc_version %(echo %version | sed 's/_.*//')
-%define gcc_dir_version %(echo %gcc_version | cut -d '.' -f 1-2)
-%define snapshot_date %(echo %version | sed 's/[34]\.[0-9]\.[0-6]//' | sed 's/_/-/')
+%define gcc_dir_version 4.8
%define binsuffix -4.8
%if !0%{?building_libjava:1}%{?building_libffi:1}%{?building_testsuite:1}
%endif
BuildRoot: %{_tmppath}/%{name}-%{version}-build
-Source: gcc-%{gcc_version}%{snapshot_date}.tar.bz2
+Source: gcc-%{version}.tar.bz2
Source1: change_spec
Source3: gcc48-rpmlintrc
Source4: ecj.jar
Source6: baselibs.conf
-Group: Development/Languages/C and C++
+Group: Development/Toolchain
Summary: The GNU C Compiler and Support Files
License: GPL-3.0+
%package -n gcc48-32bit
Summary: The GNU C Compiler 32bit support
-Group: Development/Languages/C and C++
Requires: gcc48 = %{version}-%{release}
Requires: libgcc_s%{libgcc_s}-32bit >= %{version}-%{release}
Requires: libgomp%{libgomp_sover}-32bit >= %{version}-%{release}
%package -n gcc48-64bit
Summary: The GNU C Compiler 64bit support
-Group: Development/Languages/C and C++
Requires: gcc48 = %{version}-%{release}
Requires: libgcc_s%{libgcc_s}-64bit >= %{version}-%{release}
Requires: libgomp%{libgomp_sover}-64bit >= %{version}-%{release}
%package locale
Summary: Locale Data for the GNU Compiler Collection
License: GPL-3.0+
-Group: Development/Languages/C and C++
Requires: gcc48 = %{version}-%{release}
%description locale
%package c++
Summary: The GNU C++ Compiler
License: GPL-3.0+
-Group: Development/Languages/C and C++
Requires: gcc48 = %{version}-%{release}
Requires: libstdc++48-devel = %{version}-%{release}
%package -n libstdc++48-devel
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
Requires: libstdc++%{libstdcxx_sover} >= %{version}-%{release}
Requires: glibc-devel
%ifarch ia64
%package -n libstdc++48-devel-32bit
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
Requires: libstdc++%{libstdcxx_sover}-32bit >= %{version}-%{release}
Requires: glibc-devel-32bit
%ifarch ia64
%package -n libstdc++48-devel-64bit
Summary: Include Files and Libraries mandatory for Development
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
Requires: libstdc++%{libstdcxx_sover}-64bit >= %{version}-%{release}
Requires: glibc-devel-64bit
%ifarch ia64
%package -n libstdc++48-doc
Summary: Documentation for the GNU C++ standard library
License: GPL-3.0+
-Group: Documentation/HTML
BuildArch: noarch
%description -n libstdc++48-doc
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
Summary: C compiler runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgcc_s%{libgcc_s} = %{version}-%{release}
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
Summary: C compiler runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgcc_s%{libgcc_s}-32bit = %{version}-%{release}
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-32bit
%package -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
Summary: C compiler runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgcc_s%{libgcc_s}-64bit = %{version}-%{release}
%description -n libgcc_s%{libgcc_s}%{libgcc_s_suffix}-64bit
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgomp%{libgomp_sover} = %{version}-%{release}
%description -n libgomp%{libgomp_sover}%{libgomp_suffix}
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgomp%{libgomp_sover}-32bit = %{version}-%{release}
%description -n libgomp%{libgomp_sover}%{libgomp_suffix}-32bit
%package -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit
Summary: The GNU compiler collection OpenMP runtime library
License: GPL-3.0-with-GCC-exception
-Group: System/Base
+Group: System/Libraries
Provides: libgomp%{libgomp_sover}-64bit = %{version}-%{release}
%description -n libgomp%{libgomp_sover}%{libgomp_suffix}-64bit
%package info
Summary: Documentation for the GNU compiler collection
License: GFDL-1.2
-Group: Documentation/Other
BuildArch: noarch
%description info
%package objc
Summary: GNU Objective C Compiler
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48 = %{version}-%{release}
Requires: libobjc%{libobjc_sover} >= %{version}-%{release}
%package objc-32bit
Summary: GNU Objective C Compiler
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48 = %{version}-%{release}
Requires: libobjc%{libobjc_sover}-32bit >= %{version}-%{release}
%package objc-64bit
Summary: GNU Objective C Compiler
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48 = %{version}-%{release}
Requires: libobjc%{libobjc_sover}-64bit >= %{version}-%{release}
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0-with-GCC-exception
-Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover} = %{version}-%{release}
%description -n libobjc%{libobjc_sover}%{libobjc_suffix}
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0-with-GCC-exception
-Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover}-32bit = %{version}-%{release}
%description -n libobjc%{libobjc_sover}%{libobjc_suffix}-32bit
%package -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit
Summary: Library for the GNU Objective C Compiler
License: GPL-3.0-with-GCC-exception
-Group: Development/Libraries/Other
Provides: libobjc%{libobjc_sover}-64bit = %{version}-%{release}
%description -n libobjc%{libobjc_sover}%{libobjc_suffix}-64bit
%package obj-c++
Summary: GNU Objective C++ Compiler
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48-objc = %{version}-%{release}
Requires: gcc48-c++ = %{version}-%{release}
%package -n cpp48
Summary: The GCC Preprocessor
License: GPL-3.0+
-Group: Development/Languages/C and C++
%description -n cpp48
This Package contains just the preprocessor that is used by the X11
%package ada
Summary: GNU Ada95 Compiler Based on GCC (GNAT)
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48 = %{version}-%{release}
Requires: libada48 = %{version}-%{release}
%package ada-32bit
Summary: GNU Ada95 Compiler Based on GCC (GNAT)
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48-32bit = %{version}-%{release}
Requires: libada48-32bit = %{version}-%{release}
%package ada-64bit
Summary: GNU Ada95 Compiler Based on GCC (GNAT)
License: GPL-3.0+
-Group: Development/Languages/Other
Requires: gcc48-64bit = %{version}-%{release}
Requires: libada48-64bit = %{version}-%{release}
%package -n libada48
Summary: GNU Ada Runtime Libraries
License: GPL-3.0-with-GCC-exception
-Group: System/Libraries
%description -n libada48
This package contains the shared libraries required to run programs
compiled with the GNU Ada compiler (GNAT) if they are compiled to use
%package -n libada48-32bit
Summary: GNU Ada Runtime Libraries
License: GPL-3.0-with-GCC-exception
-Group: System/Libraries
%description -n libada48-32bit
This package contains the shared libraries required to run programs
compiled with the GNU Ada compiler (GNAT) if they are compiled to use
%package -n libada48-64bit
Summary: GNU Ada Runtime Libraries
License: GPL-3.0-with-GCC-exception
-Group: System/Libraries
%description -n libada48-64bit
This package contains the shared libraries required to run programs
compiled with the GNU Ada compiler (GNAT) if they are compiled to use
%package fortran
Summary: The GNU Fortran Compiler and Support Files
License: GPL-3.0+
-Group: Development/Languages/Fortran
Requires: gcc48 = %{version}-%{release}
Requires: libgfortran%{libgfortran_sover} >= %{version}-%{release}
%ifarch %quadmath_arch
%package fortran-32bit
Summary: The GNU Fortran Compiler and Support Files
License: GPL-3.0+
-Group: Development/Languages/Fortran
Requires: gcc48 = %{version}-%{release}
Requires: libgfortran%{libgfortran_sover}-32bit >= %{version}-%{release}
%ifarch %quadmath_arch
%package fortran-64bit
Summary: The GNU Fortran Compiler and Support Files
License: GPL-3.0+
-Group: Development/Languages/Fortran
Requires: gcc48 = %{version}-%{release}
Requires: libgfortran%{libgfortran_sover}-64bit >= %{version}-%{release}
%ifarch %quadmath_arch
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover} >= %{version}-%{release}
%endif
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-32bit
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover}-32bit >= %{version}-%{release}
%endif
%package -n libgfortran%{libgfortran_sover}%{libgfortran_suffix}-64bit
Summary: The GNU Fortran Compiler Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/Fortran
%ifarch %quadmath_arch
Requires: libquadmath%{libquadmath_sover}-64bit >= %{version}-%{release}
%endif
%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}
Summary: The GNU Fortran Compiler Quadmath Runtime Library
License: LGPL-2.1
-Group: Development/Languages/Fortran
Provides: libquadmath%{libquadmath_sover} = %{version}-%{release}
%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}
%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit
Summary: The GNU Fortran Compiler Quadmath Runtime Library
License: LGPL-2.1
-Group: Development/Languages/Fortran
Provides: libquadmath%{libquadmath_sover}-32bit = %{version}-%{release}
%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-32bit
%package -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit
Summary: The GNU Fortran Compiler Quadmath Runtime Library
License: LGPL-2.1
-Group: Development/Languages/Fortran
Provides: libquadmath%{libquadmath_sover}-64bit = %{version}-%{release}
%description -n libquadmath%{libquadmath_sover}%{libquadmath_suffix}-64bit
%package -n libmudflap48
Summary: The Mudflap Extension Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libmudflap48
This is the Mudflap Extension Runtime Library.
%package -n libmudflap48-32bit
Summary: The Mudflap Extension Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libmudflap48-32bit
This is the Mudflap Extension Runtime Library.
%package -n libmudflap48-64bit
Summary: The Mudflap Extension Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libmudflap48-64bit
This is the Mudflap Extension Runtime Library.
%package -n libitm%{libitm_sover}%{libitm_suffix}
Summary: The GNU Compiler Transactional Memory Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libitm%{libitm_sover}%{libitm_suffix}
The runtime library needed to run programs compiled with the
%package -n libitm%{libitm_sover}%{libitm_suffix}-32bit
Summary: The GNU Compiler Transactional Memory Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libitm%{libitm_sover}%{libitm_suffix}-32bit
The runtime library needed to run programs compiled with the
%package -n libitm%{libitm_sover}%{libitm_suffix}-64bit
Summary: The GNU Compiler Transactional Memory Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libitm%{libitm_sover}%{libitm_suffix}-64bit
The runtime library needed to run programs compiled with the
%package -n libasan%{libasan_sover}%{libasan_suffix}
Summary: The GNU Compiler Address Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libasan%{libasan_sover}%{libasan_suffix}
The runtime library needed to run programs compiled with the
%package -n libasan%{libasan_sover}%{libasan_suffix}-32bit
Summary: The GNU Compiler Address Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libasan%{libasan_sover}%{libasan_suffix}-32bit
The runtime library needed to run programs compiled with the
%package -n libasan%{libasan_sover}%{libasan_suffix}-64bit
Summary: The GNU Compiler Address Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libasan%{libasan_sover}%{libasan_suffix}-64bit
The runtime library needed to run programs compiled with the
%package -n libtsan%{libtsan_sover}%{libtsan_suffix}
Summary: The GNU Compiler Thread Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libtsan%{libtsan_sover}%{libtsan_suffix}
The runtime library needed to run programs compiled with the
%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit
Summary: The GNU Compiler Thread Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libtsan%{libtsan_sover}%{libtsan_suffix}-32bit
The runtime library needed to run programs compiled with the
%package -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit
Summary: The GNU Compiler Thread Sanitizer Runtime Library
License: MIT
-Group: Development/Languages/C and C++
%description -n libtsan%{libtsan_sover}%{libtsan_suffix}-64bit
The runtime library needed to run programs compiled with the
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libatomic%{libatomic_sover}%{libatomic_suffix}
The runtime library for atomic operations of the GNU Compiler Collection (GCC).
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libatomic%{libatomic_sover}%{libatomic_suffix}-32bit
The runtime library for atomic operations of the GNU Compiler Collection (GCC).
%package -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit
Summary: The GNU Compiler Atomic Operations Runtime Library
License: GPL-3.0-with-GCC-exception
-Group: Development/Languages/C and C++
%description -n libatomic%{libatomic_sover}%{libatomic_suffix}-64bit
The runtime library for atomic operations of the GNU Compiler Collection (GCC).
%package -n gcc48-java
Summary: The GNU Java Compiler
License: GPL-3.0+
-Group: Development/Languages/Java
Requires: gcc48 = %{version}
Requires: libgcj48-devel = %{version}-%{release}
%package -n libgcj_bc%{libgcj_bc_sover}%{libgcj_bc_suffix}
Summary: Fake library for BC-ABI compatibility.
License: GPL-2.0-with-classpath-exception
-Group: Development/Libraries/Java
# libgcj_bc is special in that it just contains a symlink to
# a proper libgcj version. So require that library and add
# provides for the shlib version as created at link time
%package -n libgcj48-jar
Summary: Java runtime library (jar files).
License: GPL-2.0-with-classpath-exception
-Group: Development/Libraries/Java
%description -n libgcj48-jar
These are the jar files that go along with the gcj front end to gcc.
%package -n libgcj48-devel
Summary: Include Files and Libraries mandatory for Development.
License: GPL-2.0-with-classpath-exception
-Group: Development/Libraries/Java
Requires: libstdc++48-devel = %{version}
Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
Requires: libgcj_bc%{libgcj_bc_sover} >= %{version}-%{release}
%package -n gcc48-gij
Summary: Java Bytecode Interpreter for gcc
License: GPL-2.0-with-classpath-exception
-Group: Development/Libraries/Java
Requires: libgcj%{libgcj_sover} >= %{version}-%{release}
%description -n gcc48-gij
%package -n libffi%{libffi_sover}%{libffi_suffix}
Summary: Foreign Function Interface library
License: BSD-3-Clause
-Group: Development/Languages/C and C++
%description -n libffi%{libffi_sover}%{libffi_suffix}
A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
%package -n libffi%{libffi_sover}%{libffi_suffix}-32bit
Summary: Foreign Function Interface library
License: BSD-3-Clause
-Group: Development/Languages/C and C++
%description -n libffi%{libffi_sover}%{libffi_suffix}-32bit
A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
%package -n libffi%{libffi_sover}%{libffi_suffix}-64bit
Summary: Foreign Function Interface library
License: BSD-3-Clause
-Group: Development/Languages/C and C++
%description -n libffi%{libffi_sover}%{libffi_suffix}-64bit
A foreign function interface is the popular name for the interface that allows code written in one language to call code written in another language.
%package -n libffi48-devel
Summary: Foreign Function Interface library development files
License: BSD 3-Clause
-Group: Development/Languages/C and C++
Requires: libffi%{libffi_sover} >= %{version}-%{release}
%description -n libffi48-devel
%package -n libffi48-devel-32bit
Summary: Foreign Function Interface library development files
License: BSD 3-Clause
-Group: Development/Languages/C and C++
Requires: libffi%{libffi_sover}-32bit >= %{version}-%{release}
%description -n libffi48-devel-32bit
%package -n libffi48-devel-64bit
Summary: Foreign Function Interface library development files
License: BSD 3-Clause
-Group: Development/Languages/C and C++
Requires: libffi%{libffi_sover}-64bit >= %{version}-%{release}
%description -n libffi48-devel-64bit
%package -n gcc48-testresults
Summary: Testsuite results
License: SUSE-Public-Domain
-Group: Development/Languages/C and C++
%description -n gcc48-testresults
Results from running the gcc and target library testsuites.
%prep
-%setup -q -n gcc-%{gcc_version}%{snapshot_date}
+%setup -q -n gcc-%{version}
# We are configuring ppc as ppc64 but with switched multilibs. Adjust
--disable-plugin \
--with-bugurl="http://bugs.tizen.org/" \
--with-pkgversion="Tizen" \
+%if !%{build_fortran}
+ --disable-libquadmath \
+%endif
%if !%{build_libjava}
--disable-libgcj \
%else
--enable-linker-build-id \
%if 0%{?gcc_target_arch:1}
%if 0%{?gcc_icecream:1}
- --with-build-sysroot=/ \
- --with-sysroot=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi} \
- --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/usr/include/c++/%{gcc_dir_version} \
+ --with-sysroot=/ \
+ --with-gxx-include-dir=%{_prefix}/%{gcc_target_arch}%{?canonical_target_abi:%canonical_target_abi}/include/c++/%{gcc_dir_version} \
--enable-linux-futex \
%endif
%if 0%{?canonical_target:1}
%endif
%if "%{TARGET_ARCH}" == "armv7l"
--with-arch=armv7-a \
- --with-tune=cortex-a9 \
- --with-float=soft \
- --with-fpu=vfpv3-d16 \
+ --with-tune=cortex-a8 \
+ --with-float=softfp \
+ --with-fpu=vfpv3 \
+ --with-mode=thumb \
--disable-sjlj-exceptions \
%endif
%if "%{TARGET_ARCH}" == "armv7hl"