]> git.ipfire.org Git - people/amarx/ipfire-3.x.git/blobdiff - gcc/gcc.nm
Merge remote-tracking branch 'stevee/unicode-ucd'
[people/amarx/ipfire-3.x.git] / gcc / gcc.nm
index 575cd893d9dc420f62a77f55520467de93696baf..34cdcac7df2092245de0e36397c4a000785e4792 100644 (file)
@@ -7,8 +7,8 @@
 build_cloog_ppl = 1
 
 name       = gcc
-version    = 4.6.2
-release    = 4
+version    = 4.6.3
+release    = 6
 
 maintainer = Michael Tremer <michael.tremer@ipfire.org>
 groups     = Development/Compilers
@@ -40,7 +40,7 @@ patches = \
        gcc46-ppl-0.10.patch \
        gcc46-Woverlength-string.patch0 \
        gcc46-Woverlength-string-asm.patch0 \
-       gcc-4.6.0-piepatches-20110407.patch
+       gcc-4.6.3-piepatches-20120408.patch
 
 build
        requires
@@ -49,6 +49,7 @@ build
                dejagnu
                elfutils-devel
                expect
+               filesystem >= 002
                flex
                glibc-devel
                gmp-devel
@@ -61,7 +62,8 @@ build
 
        # If cloog support is enabled, we require the devel packages for build.
        if "%{build_cloog_ppl}" == "1"
-               requires += cloog-ppl-devel ppl-devel
+               requires += cloog-ppl-devel
+               requires += ppl-devel
        end
 
        # Build libquadmath (only on x86).
@@ -71,6 +73,8 @@ build
        # configuration.
        configure_options =
 
+       make_bootstrap = profiledbootstrap
+
        if "%{DISTRO_ARCH}" == "x86_64"
                configure_options = --disable-multilib
 
@@ -84,12 +88,15 @@ build
        end
 
        if "%{DISTRO_ARCH}" == "armv5tel"
-               configure_options += --disable-sjlj-exceptions
+               make_bootstrap = bootstrap
 
+               configure_options += --disable-sjlj-exceptions
                configure_options += --with-float=soft
        end
 
-       if "${DISTRO_ARCH}" == "armv7hl"
+       if "%{DISTRO_ARCH}" == "armv7hl"
+               make_bootstrap = bootstrap
+
                configure_options += --disable-sjlj-exceptions
 
                configure_options += \
@@ -106,7 +113,8 @@ build
        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
@@ -178,7 +186,8 @@ build
                ../%{thisapp}/configure \
                        --build=%{DISTRO_BUILDTARGET} \
                        --prefix=/usr \
-                       --libexecdir=/usr/lib \
+                       --libdir=%{libdir} \
+                       --libexecdir=%{libdir} \
                        --mandir=/usr/share/man \
                        --enable-esp \
                        --enable-shared \
@@ -199,7 +208,7 @@ build
                        %{configure_options}
 
                # GCC does not support a parallel build.
-               make profiledbootstrap BOOT_CFLAGS="${CFLAGS}"
+               make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}"
        end
 
        #test
@@ -212,24 +221,47 @@ build
                make install DESTDIR=%{BUILDROOT}
 
                # Check if the installation path exists.
-               FULLPATH="%{BUILDROOT}/usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}"
+               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
-               mv -vf %{BUILDROOT}/usr/lib/libgcc_s.so.1 %{BUILDROOT}/lib/
-               ln -svf ../../lib/libgcc_s.so.1 %{BUILDROOT}/usr/lib/libgcc_s.so
+               # Fix libgcc_s symlinks.
+               rm -f ${FULLPATH}/libgcc_s.so %{BUILDROOT}%{libdir}/libgcc_s.so
+               case "%{DISTRO_ARCH}" in
+                       arm*)
+                               cat <<EOF >${FULLPATH}/libgcc_s.so
+               /* GNU ld script
+                  Use the shared library, but some functions are only in
+                  the static library, so try that secondarily.  */
+               OUTPUT_FORMAT(elf32-littlearm)
+               GROUP ( %{libdir}/libgcc_s.so.1 libgcc.a )
+               EOF
+                               ;;
+                       *)
+                               ln -svf ../../../../../%{libdir}/libgcc_s.so.1 ${FULLPATH}/libgcc_s.so
+                               ;;
+               esac
 
                # Remove some GNU debugger stuff.
-               rm -vf %{BUILDROOT}/usr/lib/lib*.py
+               rm -vf %{BUILDROOT}%{libdir}/lib*.py
+
+               # Install missing header file(s) on ARM.
+               case "%{DISTRO_ARCH}" in
+                       arm*)
+                               cp -vf %{DIR_APP}/gcc/config/vxworks-dummy.h \
+                                       ${FULLPATH}/plugin/include/config/
+                               cp -vf %{DIR_APP}/gcc/config/arm/arm-cores.def \
+                                       ${FULLPATH}/plugin/include/config/arm/
+                               ;;
+               esac
 
                # libgomp
-               mv -vf %{BUILDROOT}/usr/lib/libgomp.spec ${FULLPATH}/
+               mv -vf %{BUILDROOT}%{libdir}/libgomp.spec ${FULLPATH}/
                ln -svf ../../../libgomp.so.1.0.0 ${FULLPATH}/libgomp.so
-               chmod 755 %{BUILDROOT}/usr/lib/libgomp.so.1.*
+               chmod 755 %{BUILDROOT}%{libdir}/libgomp.so.1.*
 
                # libstdc++
                ln -svf ../../../libstdc++.so.6.0.16 ${FULLPATH}/libstdc++.so
@@ -237,18 +269,18 @@ build
                # libmudflap
                ln -svf ../../../libmudflap.so.0.0.0 ${FULLPATH}/libmudflap.so
                ln -svf ../../../libmudflapth.so.0.0.0 ${FULLPATH}/libmudflapth.so
-               chmod 755 %{BUILDROOT}/usr/lib/libmudflap{,th}.so.0.*
+               chmod 755 %{BUILDROOT}%{libdir}/libmudflap{,th}.so.0.*
 
                # libquadmath
                if [ "%{build_libquadmath}" = "1" ]; then
-                       ln -svf ../../../libquadmath.so.0.* ${FULLPATH}/libquadmath.so
-                       chmod 755 %{BUILDROOT}/usr/lib/libquadmath.so.0.*
+                       ln -svf ../../../libquadmath.so.0.0.0 ${FULLPATH}/libquadmath.so
+                       chmod 755 %{BUILDROOT}%{libdir}/libquadmath.so.0.*
                fi
        end
 
        keep_libraries
-               /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc.a
-               /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc_eh.a
+               %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc.a
+               %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/libgcc_eh.a
        end
 end
 
@@ -257,16 +289,21 @@ packages
                groups += Build
 
                requires
-                       binutils>=%{required_binutils_version}
+                       binutils >= %{required_binutils_version}
+                       filesystem >= 002
                        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}
+
                if "%{build_cloog_ppl}" == "1"
-                       requires += cloog-ppl>=0.15
+                       requires += cloog-ppl >= 0.15
                end
        end
 
@@ -279,14 +316,14 @@ packages
                end
 
                requires
-                       gcc=%{thisver}
-                       libstdc++=%{thisver}
-                       libstdc++-devel=%{thisver}
+                       gcc = %{thisver}
+                       libstdc++ = %{thisver}
+                       libstdc++-devel = %{thisver}
                end
 
                files
                        /usr/bin/*++
-                       /usr/lib/gcc/*/*/cc1plus
+                       %{libdir}/gcc/*/*/cc1plus
                        /usr/share/man/man*/*++*
                end
        end
@@ -318,11 +355,13 @@ packages
                group = Development/Languages
 
                files
-                       /lib/cpp
-                       /usr/bin/cpp
-                       /usr/share/man/man1/cpp.1*
-                       /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/cc1
+                       %{prefix}/lib/cpp
+                       %{bindir}/cpp
+                       %{mandir}/man1/cpp.1*
+                       %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/cc1
                end
+
+               provides = /lib/cpp
        end
 
        package libgcc
@@ -333,7 +372,7 @@ packages
                end
 
                files
-                       /lib/libgcc*.so.*
+                       %{libdir}/libgcc*.so.*
                end
        end
 
@@ -345,7 +384,7 @@ packages
                end
 
                files
-                       /usr/lib/libstdc++*.so.*
+                       %{libdir}/libstdc++*.so.*
                end
        end
 
@@ -358,12 +397,12 @@ packages
                end
 
                requires
-                       libstdc++=%{thisver}
+                       libstdc++ = %{thisver}
                end
 
                files
-                       /usr/include/c++
-                       /usr/lib/libstdc++*.so
+                       %{includedir}/c++
+                       %{libdir}/libstdc++*.so
                end
        end
 
@@ -375,7 +414,7 @@ packages
                end
 
                files
-                       /usr/lib/libgomp*.so.*
+                       %{libdir}/libgomp*.so.*
                end
        end
 
@@ -387,7 +426,7 @@ packages
                end
 
                files
-                       /usr/lib/libmudflap*.so.*
+                       %{libdir}/libmudflap*.so.*
                end
        end
 
@@ -402,13 +441,13 @@ packages
                end
 
                requires
-                       libmudflap=%{thisver}
+                       libmudflap = %{thisver}
                end
 
                files
-                       /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/mf-runtime.h
-                       /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/libmudflap.so
-                       /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/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
                end
        end
 
@@ -421,7 +460,7 @@ packages
                        end
 
                        files
-                               /usr/lib/libquadmath*.so.*
+                               %{libdir}/libquadmath*.so.*
                        end
                end
 
@@ -433,14 +472,14 @@ packages
                        end
 
                        requires
-                               gcc=%{thisver}
-                               libquadmath=%{thisver}
+                               gcc = %{thisver}
+                               libquadmath = %{thisver}
                        end
 
                        files
-                               /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath.h
-                               /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/include/quadmath_weak.h
-                               /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/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
                        end
                end
        end
@@ -454,14 +493,14 @@ 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
-                       /usr/lib/gcc/%{DISTRO_BUILDTARGET}/%{version}/plugin
+                       %{libdir}/gcc/%{DISTRO_BUILDTARGET}/%{version}/plugin
                end
        end