arm_none_eabi_gcc: fix multilib support

Use the gcc sources from the official gcc arm-embedded branch instead of
the Haiku branch. These include patches adding support for complex
multilib setups for ARM, so the toolchain can now target armv6, and armv7
m/ar/em.
Enable said option so we get a multilib toolchain.
This also means we get gcc 4.8.4 instead of 4.8.2.

Bump revision of newlib since it was also rebuilt with multilib
support.
This commit is contained in:
Adrien Destugues
2014-12-06 09:43:33 +01:00
parent ada1decfb3
commit 31bea66ae0
5 changed files with 62 additions and 13 deletions

View File

@@ -4,11 +4,10 @@ Compiler for ARM processors.
"
HOMEPAGE="http://gcc.gnu.org"
srcGitRev="c20a732df8f8b6d0f32c872817f3a0498a5c4761"
SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6d3b677cd8ef777bf6fb3186a15b5122e46345595a996370325c758b3d8a4ab6"
SRC_URI="svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_8-branch"
SRC_FILENAME="$portVersionedName.tar.gz"
REVISION="2"
PATCHES="arm_none_eabi_gcc-$portVersion.patchset"
REVISION="1"
LICENSE="
GNU GPL v2
GNU LGPL v2
@@ -47,6 +46,9 @@ REQUIRES="
BUILD_REQUIRES="
cmd:${targetU}_as$secondaryArchSuffix
${targetU}_newlib$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
devel:libmpfr$secondaryArchSuffix
devel:libmpc$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
@@ -65,8 +67,6 @@ BUILD_PREREQUIRES="
cmd:xargs
"
SOURCE_DIR="buildtools-$srcGitRev/gcc"
sourceDir=$(pwd)
relativeInstallDir="develop/tools/${targetArch}"
installDir="$prefix/$relativeInstallDir"
@@ -97,6 +97,7 @@ BUILD()
--docdir=$docDir --disable-nls --disable-libssp --with-gnu-ld \
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
--enable-multilib --disable-shared \
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r \
--with-newlib --with-sysroot=$installDir \
--with-native-system-header-dir=/include \
--with-pkgversion=$(echo $portVersion | cut -c 7-) --target=$targetArch

View File

@@ -0,0 +1,22 @@
From e0f435a01b68a41b06602dcf4b302d7ad7f3974f Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 5 Dec 2014 18:05:55 +0100
Subject: Hardcoded -lm.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 56b7baa..c9eedf6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3969,7 +3969,7 @@ $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
genprog = $(genprogerr) check checksum condmd
# These programs need libs over and above what they get from the above list.
-build/genautomata$(build_exeext) : BUILD_LIBS += -lm
+#build/genautomata$(build_exeext) : BUILD_LIBS += -lm
# These programs are not linked with the MD reader.
build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
--
1.8.3.4

View File

@@ -4,10 +4,9 @@ Compiler for ARM processors.
"
HOMEPAGE="http://gcc.gnu.org"
srcGitRev="c20a732df8f8b6d0f32c872817f3a0498a5c4761"
SRC_URI="https://github.com/haiku/buildtools/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="6d3b677cd8ef777bf6fb3186a15b5122e46345595a996370325c758b3d8a4ab6"
SRC_URI="svn://gcc.gnu.org/svn/gcc/branches/ARM/embedded-4_8-branch"
SRC_FILENAME="$portVersionedName.tar.gz"
PATCHES="arm_none_eabi_gcc_nolibc-$portVersion.patchset"
REVISION="1"
LICENSE="
GNU GPL v2
@@ -43,9 +42,15 @@ REQUIRES="
haiku$secondaryArchSuffix >= $haikuVersion
cmd:${targetU}_as$secondaryArchSuffix
lib:libstdc++$secondaryArchSuffix
lib:libgmp$secondaryArchSuffix
lib:libmpfr$secondaryArchSuffix
lib:libmpc$secondaryArchSuffix
"
BUILD_REQUIRES="
cmd:${targetU}_as$secondaryArchSuffix
devel:libgmp$secondaryArchSuffix
devel:libmpfr$secondaryArchSuffix
devel:libmpc$secondaryArchSuffix
"
BUILD_PREREQUIRES="
haiku${secondaryArchSuffix}_devel >= $haikuVersion
@@ -64,8 +69,6 @@ BUILD_PREREQUIRES="
cmd:xargs
"
SOURCE_DIR="buildtools-$srcGitRev/gcc"
sourceDir=$(pwd)
relativeInstallDir="develop/tools/${targetArch}"
installDir="$prefix/$relativeInstallDir"
@@ -96,6 +99,7 @@ BUILD()
--docdir=$docDir --disable-nls --disable-libssp --with-gnu-ld \
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
--enable-multilib --disable-shared \
--with-multilib-list=armv6-m,armv7-m,armv7e-m,armv7-r \
--without-headers --with-newlib \
--with-sysroot=$installDir \
--with-native-system-header-dir=/include \

View File

@@ -0,0 +1,22 @@
From e0f435a01b68a41b06602dcf4b302d7ad7f3974f Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@gmail.com>
Date: Fri, 5 Dec 2014 18:05:55 +0100
Subject: Hardcoded -lm.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 56b7baa..c9eedf6 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -3969,7 +3969,7 @@ $(genprogerr:%=build/gen%$(build_exeext)): $(BUILD_ERRORS)
genprog = $(genprogerr) check checksum condmd
# These programs need libs over and above what they get from the above list.
-build/genautomata$(build_exeext) : BUILD_LIBS += -lm
+#build/genautomata$(build_exeext) : BUILD_LIBS += -lm
# These programs are not linked with the MD reader.
build/gengtype$(build_exeext) : build/gengtype-lex.o build/gengtype-parse.o \
--
1.8.3.4

View File

@@ -35,7 +35,7 @@ COPYRIGHT="
2009 ARM Ltd
2008 Ed Schouten <ed@FreeBSD.org>
"
REVISION="1"
REVISION="2"
ARCHITECTURES=""
if [ $effectiveTargetArchitecture != x86_gcc2 ]; then
@@ -77,7 +77,7 @@ BUILD()
cd $objectsDir
runConfigure $sourceDir/configure --target=arm-none-eabi \
--prefix=$installDir
--prefix=$installDir --disable-newlib-supplied-syscalls
make
}