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
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
dejagnu
elfutils-devel
expect
+ filesystem >= 002
flex
glibc-devel
gmp-devel
# 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).
# configuration.
configure_options =
+ make_bootstrap = profiledbootstrap
+
if "%{DISTRO_ARCH}" == "x86_64"
configure_options = --disable-multilib
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 += \
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
../%{thisapp}/configure \
--build=%{DISTRO_BUILDTARGET} \
--prefix=/usr \
- --libexecdir=/usr/lib \
+ --libdir=%{libdir} \
+ --libexecdir=%{libdir} \
--mandir=/usr/share/man \
--enable-esp \
--enable-shared \
%{configure_options}
# GCC does not support a parallel build.
- make profiledbootstrap BOOT_CFLAGS="${CFLAGS}"
+ make %{make_bootstrap} BOOT_CFLAGS="${CFLAGS}"
end
#test
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
# 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
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
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
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
end
files
- /lib/libgcc*.so.*
+ %{libdir}/libgcc*.so.*
end
end
end
files
- /usr/lib/libstdc++*.so.*
+ %{libdir}/libstdc++*.so.*
end
end
end
requires
- libstdc++=%{thisver}
+ libstdc++ = %{thisver}
end
files
- /usr/include/c++
- /usr/lib/libstdc++*.so
+ %{includedir}/c++
+ %{libdir}/libstdc++*.so
end
end
end
files
- /usr/lib/libgomp*.so.*
+ %{libdir}/libgomp*.so.*
end
end
end
files
- /usr/lib/libmudflap*.so.*
+ %{libdir}/libmudflap*.so.*
end
end
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
end
files
- /usr/lib/libquadmath*.so.*
+ %{libdir}/libquadmath*.so.*
end
end
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
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