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
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
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).
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
-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 \
--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 \
--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
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
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
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
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
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
end
requires
- gcc=%{thisver}
- libstdc++=%{thisver}
- libstdc++-devel=%{thisver}
+ gcc = %{thisver}
+ libstdc++ = %{thisver}
+ libstdc++-devel = %{thisver}
end
files
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
end
files
- /%{lib}/libgcc*.so.*
+ %{libdir}/libgcc*.so.*
end
end
end
requires
- libstdc++=%{thisver}
+ libstdc++ = %{thisver}
end
files
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
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
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
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