]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - gcc/gcc.nm
gcc: Rebuild with new ppl-1.0 and rebuilt cloog-ppl.
[ipfire-3.x.git] / gcc / gcc.nm
index b32e0289a0bb32931ad3c99256076c1f0f3104d4..a7a7a43a40213aed1679b24c1e5a1eee0bafa9d7 100644 (file)
@@ -7,8 +7,8 @@
 build_cloog_ppl = 1
 
 name       = gcc
-version    = 4.6.2
-release    = 14
+version    = 4.7.2
+release    = 3
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = Development/Compilers
@@ -27,21 +27,6 @@ required_binutils_version = 2.21.51.0.8-1
 source_dl  = http://ftp.gnu.org/gnu/gcc/%{thisapp}/
 sources    = %{thisapp}.tar.gz
 
-patches = \
-       gcc46-hack.patch0 \
-       gcc46-c++-builtin-redecl.patch0 \
-       gcc46-pr33763.patch0 \
-       gcc46-libgomp-omp_h-multilib.patch0 \
-       gcc46-libtool-no-rpath.patch0 \
-       gcc46-cloog-dl.patch0 \
-       gcc46-pr38757.patch0 \
-       gcc46-no-add-needed.patch0 \
-       gcc46-unwind-debughook-sdt.patch0 \
-       gcc46-ppl-0.10.patch \
-       gcc46-Woverlength-string.patch0 \
-       gcc46-Woverlength-string-asm.patch0 \
-       gcc-4.6.0-piepatches-20110407.patch
-
 build
        requires
                autogen
@@ -49,20 +34,22 @@ build
                dejagnu
                elfutils-devel
                expect
+               filesystem >= 002
                flex
-               glibc-devel
+               glibc-devel >= 2.16
                gmp-devel
                libffi-devel
                libmpc-devel
                mpfr-devel
+               perl
                texinfo
                zlib-devel
        end
 
        # If cloog support is enabled, we require the devel packages for build.
        if "%{build_cloog_ppl}" == "1"
-               requires += cloog-ppl-devel
-               requires += ppl-devel
+               requires += cloog-ppl-devel >= 0.15.11-2
+               requires += ppl-devel >= 1.0
        end
 
        # Build libquadmath (only on x86).
@@ -108,11 +95,13 @@ build
        end
 
        if "%{build_cloog_ppl}" == "1"
-               configure_options += --with-cloog --with-ppl
+               configure_options += --with-cloog --with-ppl \
+                       --disable-ppl-version-check
        end
 
        # CFLAGS for hardening.
-       HARD_CFLAGS = -DEFAULT_PIE_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW
+       HARD_CFLAGS = -DEFAULT_PIE -DEFAULT_SSP -DEFAULT_PIE_SSP -DEFAULT_ESP_SPP \
+               -DENABLE_ESP_SSP -DEFAULT_RELRO -DEFAULT_BIND_NOW
 
        prepare_cmds
                mkdir -v %{DIR_SRC}/gcc-build
@@ -142,18 +131,23 @@ build
                        -e "s/-fno-exceptions/& -fno-asynchronous-unwind-tables/"
 
                # we want to be able to control the pie patch logic via something other
-               # than ALL_CFLAGS...
+               # than ALL_CFLAGS and ALL_CXXFLAGS...
                sed -i gcc/Makefile.in \
                        -e '/^ALL_CFLAGS/iHARD_CFLAGS = ' \
-                       -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |'
+                       -e 's|^ALL_CFLAGS = |ALL_CFLAGS = $(HARD_CFLAGS) |' \
+                       -e '/^ALL_CXXFLAGS/iHARD_CFLAGS = ' \
+                       -e 's|^ALL_CXXFLAGS = |ALL_CXXFLAGS = $(HARD_CFLAGS) |'
 
                # Enable the GCC hardening by default.
                sed -i gcc/Makefile.in \
                        -e "s|^HARD_CFLAGS = |HARD_CFLAGS = %{HARD_CFLAGS} |"
 
                # Compile the compiler with -fPIC as well.
+               # However, genautomata crashes with a "Bus Error" when compiled
+               # with PIC.
                sed -i gcc/Makefile.in \
-                       -e "s|^ESP_NOPIE_CFLAGS = .*|ESP_NOPIE_CFLAGS =|"
+                       -e "s|^ESP_NOPIE_CFLAGS = .*|ESP_NOPIE_CFLAGS =|" \
+                       -e 's|^build/genautomata$(build_exeext) .*|& -fno-PIC|'
 
                # Default to -gdwarf-4 -fno-debug-types-section rather than -gdwarf-2
                sed -i gcc/common.opt \
@@ -195,6 +189,8 @@ build
                        --enable-languages=c,c++,lto \
                        --enable-bootstrap \
                        --enable-checking=release \
+                       --disable-build-with-cxx \
+                       --disable-build-poststage1-with-cxx \
                        --disable-werror \
                        --disable-libssp \
                        --disable-static \
@@ -203,10 +199,19 @@ build
                        --disable-libunwind-exceptions \
                        --enable-gnu-unique-object \
                        --enable-linker-build-id \
+                       --with-linker-hash-style=gnu \
                        %{configure_options}
 
                # GCC does not support a parallel build.
                make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}"
+
+               # Generate man pages.
+               perl -pi -e 's/head3/head2/' ../contrib/texi2pod.pl
+               for i in %{DIR_APP}/gcc/doc/*.texi; do
+                       cp -a $i $i.orig; sed 's/ftable/table/' $i.orig > $i
+               done
+               make -C gcc generated-manpages
+               for i in %{DIR_APP}/gcc/doc/*.texi; do mv -f $i.orig $i; done
        end
 
        #test
@@ -222,14 +227,12 @@ build
                FULLPATH="%{BUILDROOT}%{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}"
                [ -d "${FULLPATH}" ] || exit 1
 
-               mkdir -pv %{BUILDROOT}/lib
-               ln -sfv ../usr/bin/cpp %{BUILDROOT}/lib/cpp
+               mkdir -pv %{BUILDROOT}%{prefix}/lib
+               ln -sfv ../bin/cpp %{BUILDROOT}%{prefix}/lib/cpp
                ln -sfv gcc %{BUILDROOT}/usr/bin/cc
 
-               # Move libgcc_s to /lib
+               # Fix libgcc_s symlinks.
                rm -f ${FULLPATH}/libgcc_s.so %{BUILDROOT}%{libdir}/libgcc_s.so
-               mkdir -pv %{BUILDROOT}/%{lib}
-               mv -vf %{BUILDROOT}%{libdir}/libgcc_s.so.1 %{BUILDROOT}/%{lib}/
                case "%{DISTRO_ARCH}" in
                        arm*)
                                cat <<EOF >${FULLPATH}/libgcc_s.so
@@ -237,13 +240,14 @@ build
                   Use the shared library, but some functions are only in
                   the static library, so try that secondarily.  */
                OUTPUT_FORMAT(elf32-littlearm)
-               GROUP ( /%{lib}/libgcc_s.so.1 libgcc.a )
+               GROUP ( %{libdir}/libgcc_s.so.1 libgcc.a )
                EOF
                                ;;
                        *)
-                               ln -svf ../../../../../%{lib}/libgcc_s.so.1 ${FULLPATH}/libgcc_s.so
+                               ln -svf ../../../../..%{libdir}/libgcc_s.so.1 ${FULLPATH}/libgcc_s.so
                                ;;
                esac
+               chmod 755 %{BUILDROOT}%{libdir}/libgcc_s.so.1
 
                # Remove some GNU debugger stuff.
                rm -vf %{BUILDROOT}%{libdir}/lib*.py
@@ -264,7 +268,7 @@ build
                chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
 
                # libstdc++
-               ln -svf ../../../libstdc++.so.6.0.16 ${FULLPATH}/libstdc++.so
+               ln -svf ../../../libstdc++.so.6.0.17 ${FULLPATH}/libstdc++.so
 
                # libmudflap
                ln -svf ../../../libmudflap.so.0.0.0 ${FULLPATH}/libmudflap.so
@@ -276,6 +280,11 @@ build
                        ln -svf ../../../libquadmath.so.0.0.0 ${FULLPATH}/libquadmath.so
                        chmod 755 %{BUILDROOT}%{libdir}/libquadmath.so.0.*
                fi
+
+               # libitm
+               mv -vf %{BUILDROOT}%{libdir}/libitm.spec ${FULLPATH}/
+               ln -svf ../../../libitm.so.1.0.0 ${FULLPATH}/libitm.so
+               chmod 755 %{BUILDROOT}%{libdir}/libitm.so.1.*
        end
 
        keep_libraries
@@ -289,20 +298,22 @@ packages
                groups += Build
 
                requires
-                       binutils>=%{required_binutils_version}
+                       binutils >= %{required_binutils_version}
+                       filesystem >= 002
+                       glibc >= 2.16
                        glibc-devel
                        gmp-devel
-                       cpp=%{thisver}
-                       libgcc=%{thisver}
-                       libgomp=%{thisver}
+                       cpp = %{thisver}
+                       libgcc = %{thisver}
+                       libgomp = %{thisver}
                end
 
                # We do not ship libgcc-devel anymore.
-               provides += libgcc-devel=%{thisver}
-               obsoletes += libgcc-devel<%{thisver}
+               provides += libgcc-devel = %{thisver}
+               obsoletes += libgcc-devel < %{thisver}
 
                if "%{build_cloog_ppl}" == "1"
-                       requires += cloog-ppl>=0.15
+                       requires += cloog-ppl >= 0.15
                end
        end
 
@@ -315,9 +326,9 @@ packages
                end
 
                requires
-                       gcc=%{thisver}
-                       libstdc++=%{thisver}
-                       libstdc++-devel=%{thisver}
+                       gcc = %{thisver}
+                       libstdc++ = %{thisver}
+                       libstdc++-devel = %{thisver}
                end
 
                files
@@ -354,11 +365,14 @@ packages
                group = Development/Languages
 
                files
-                       /%{lib}/cpp
-                       /usr/bin/cpp
-                       /usr/share/man/man1/cpp.1*
+                       %{prefix}/lib/cpp
+                       %{bindir}/cpp
+                       %{mandir}/man1/cpp.1*
                        %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/cc1
                end
+
+               provides = /lib/cpp
+               requires = gcc-c++ = %{thisver}
        end
 
        package libgcc
@@ -369,7 +383,7 @@ packages
                end
 
                files
-                       /%{lib}/libgcc*.so.*
+                       %{libdir}/libgcc*.so.*
                end
        end
 
@@ -394,7 +408,7 @@ packages
                end
 
                requires
-                       libstdc++=%{thisver}
+                       libstdc++ = %{thisver}
                end
 
                files
@@ -438,10 +452,12 @@ packages
                end
 
                requires
-                       libmudflap=%{thisver}
+                       libmudflap = %{thisver}
                end
 
                files
+                       %{libdir}/libmudflap.so
+                       %{libdir}/libmudflapth.so
                        %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/mf-runtime.h
                        %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libmudflap.so
                        %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libmudflapth.so
@@ -469,11 +485,12 @@ packages
                        end
 
                        requires
-                               gcc=%{thisver}
-                               libquadmath=%{thisver}
+                               gcc = %{thisver}
+                               libquadmath = %{thisver}
                        end
 
                        files
+                               %{libdir}/libquadmath.so
                                %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath.h
                                %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath_weak.h
                                %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libquadmath.so
@@ -481,6 +498,38 @@ packages
                end
        end
 
+       package libitm
+               summary = The GNU Transactional Memory library.
+               description
+                       This package contains the GNU Transactional Memory library
+                       which is a GCC transactional memory support runtime library.
+               end
+
+               files
+                       %{libdir}/libitm.so.1*
+               end
+       end
+
+       package libitm-devel
+               summary = The GNU Transactional Memory support.
+               description
+                       This package contains headers and support files for the
+                       GNU Transactional Memory library.
+               end
+
+               requires
+                       gcc = %{thisver}
+                       libitm = %{thisver}
+               end
+
+               files
+                       %{libdir}/libitm.so
+                       %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm.h
+                       %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/itm_weak.h
+                       %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libitm.so
+               end
+       end
+
        package gcc-plugin-devel
                summary = Support for compiling GCC plugins.
                description
@@ -490,10 +539,10 @@ packages
                end
 
                requires
-                       gcc=%{thisver}
-                       gmp-devel>=4.1.2-8
-                       mpfr-devel>=2.2.1
-                       libmpc-devel>=0.8.1
+                       gcc = %{thisver}
+                       gmp-devel >= 4.1.2-8
+                       mpfr-devel >= 2.2.1
+                       libmpc-devel >= 0.8.1
                end
 
                files