From: Lennert Buytenhek Subject: gcc41: make build on ARM This patch makes the gcc41 package build on ARM by: - Disabling objc build when we're on ARM. - Add a patch to fix the noexecstack annotations on libffi/src/arm/sysv.S so that it will actually build. It also document binutils version requirements for the ARM port. Signed-off-by: Lennert Buytenhek Index: SPECS/gcc41.spec =================================================================== --- SPECS.orig/gcc41.spec +++ SPECS/gcc41.spec @@ -9,6 +9,7 @@ %else %define build_ada 0 %endif +%ifnarch %{arm} %define build_java 1 # If you don't have already a usable gcc-java and libgcj for your arch, # do on some arch which has it rpmbuild -bc --with java_tar gcc41.spec @@ -17,6 +18,10 @@ %define bootstrap_java %{?_with_java_bootstrap:%{build_java}}%{!?_with_java_bootstrap:0} %define build_java_tar %{?_with_java_tar:%{build_java}}%{!?_with_java_tar:0} %define build_objc 1 +%else +%define build_java 0 +%define build_objc 0 +%endif %ifarch s390x %define multilib_32_arch s390 %endif @@ -32,7 +37,7 @@ Summary: Various compilers (C, C++, Objective-C, Java, ...) Name: gcc Version: %{gcc_version} -Release: %{gcc_release} +Release: %{gcc_release}.fa1 # libgcc, libgfortran, libmudflap and crtstuff have an exception which allows # linking it into any kind of programs or shared libraries without # restrictions. @@ -50,6 +55,7 @@ BuildRoot: %{_tmppath}/%{name}-%{version # Need binutils which support .weakref >= 2.16.91.0.3-1 # Need binutils which support --hash-style=gnu >= 2.17.50.0.2-7 # Need binutils which support mffgpr and mftgpr >= 2.17.50.0.2-8 +# Need binutils which support 2-argument .movsp >= 2.17.50.0.5 # Need binutils which support --build-id >= 2.17.50.0.17-3 BuildRequires: binutils >= 2.17.50.0.17-3 BuildRequires: zlib-devel, gettext, dejagnu, bison, flex, texinfo, sharutils @@ -91,6 +97,7 @@ Requires: cpp = %{version}-%{release} # Need binutils that support .weakref # Need binutils that supports --hash-style=gnu # Need binutils that support mffgpr/mftgpr +# Need binutils that support 2-argument .movsp # Need binutils that support --build-id Requires: binutils >= 2.17.50.0.17-3 # Make sure gdb will understand DW_FORM_strp @@ -200,6 +207,7 @@ Patch73: gcc41-pr34094.patch Patch74: gcc41-pr34130.patch Patch75: gcc41-pr34146.patch Patch76: gcc41-rh364001.patch +Patch77: gcc41-arm-progbits.patch # On ARM EABI systems, we do want -gnueabi to be part of the # target triple. @@ -557,6 +565,7 @@ which are required to run programs compi %patch74 -p0 -b .pr34130~ %patch75 -p0 -b .pr34146~ %patch76 -p0 -b .rh364001~ +%patch77 -p0 -b .progbits~ %if %{bootstrap_java} tar xjf %{SOURCE10}