From 64b8b93c34292fa4777cff495248a04f48e2cea3 Mon Sep 17 00:00:00 2001 From: Adrien Destugues Date: Sun, 24 Aug 2014 12:14:31 +0200 Subject: [PATCH] Add a libc for the arm-none-eabi compiler. * The gcc_nolibc compiler is built first, it doesn't come with a C library * This compiler is then used to build the newlibc * Finally, gcc is built again (the final version of the package) using the newly built newlibc. Also fix some paths so everything gets installed in system/develop/tools/arm-none-eabi. This is the simplest way to go so this particular gcc finds the includes there, without any risk of mixing them up with actual includes for Haiku. --- .../arm_none_eabi_binutils-2.24_2014_03_19.recipe | 2 +- .../arm_none_eabi_gcc-4.8.2_2014_03_20.recipe | 2 +- .../arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe | 2 ++ .../arm_none_eabi_newlib/arm_none_eabi_newlib-2.1.0.recipe | 4 ++-- 4 files changed, 6 insertions(+), 4 deletions(-) rename sys-devel/{arm_none_eabi_gcc => arm_none_eabi_gcc_nolibc}/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe (97%) diff --git a/sys-devel/arm_none_eabi_binutils/arm_none_eabi_binutils-2.24_2014_03_19.recipe b/sys-devel/arm_none_eabi_binutils/arm_none_eabi_binutils-2.24_2014_03_19.recipe index 90da667f3..648500ca5 100644 --- a/sys-devel/arm_none_eabi_binutils/arm_none_eabi_binutils-2.24_2014_03_19.recipe +++ b/sys-devel/arm_none_eabi_binutils/arm_none_eabi_binutils-2.24_2014_03_19.recipe @@ -90,7 +90,7 @@ BUILD() CFLAGS=-O2 CXXFLAGS=-O2 runConfigure "$sourceDir/configure" \ --exec-prefix=$installDir \ --includedir=$includeDir/binutils \ - --docdir=$docDir --with-sysroot=/system/develop/$targetArch/ \ + --docdir=$docDir --with-sysroot=$installDir \ --disable-nls --target=${targetArch} make $jobArgs diff --git a/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc-4.8.2_2014_03_20.recipe b/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc-4.8.2_2014_03_20.recipe index 8dea95378..34695a5f5 100644 --- a/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc-4.8.2_2014_03_20.recipe +++ b/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc-4.8.2_2014_03_20.recipe @@ -97,7 +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-newlib --with-sysroot=/system/develop/$targetArch/ \ + --with-newlib --with-sysroot=$installDir \ --with-native-system-header-dir=/include \ --with-pkgversion=$(echo $portVersion | cut -c 7-) --target=$targetArch diff --git a/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe b/sys-devel/arm_none_eabi_gcc_nolibc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe similarity index 97% rename from sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe rename to sys-devel/arm_none_eabi_gcc_nolibc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe index f2524820b..a297b698a 100644 --- a/sys-devel/arm_none_eabi_gcc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe +++ b/sys-devel/arm_none_eabi_gcc_nolibc/arm_none_eabi_gcc_nolibc-4.8.2_2014_03_20.recipe @@ -97,6 +97,8 @@ BUILD() --enable-languages=c,c++ --enable-lto --enable-frame-pointer \ --enable-multilib --disable-shared \ --without-headers --with-newlib \ + --with-sysroot=$installDir \ + --with-native-system-header-dir=/include \ --with-pkgversion=$(echo $portVersion | cut -c 7-) --target=$targetArch make $jobArgs all-gcc all-target-libgcc diff --git a/sys-libs/arm_none_eabi_newlib/arm_none_eabi_newlib-2.1.0.recipe b/sys-libs/arm_none_eabi_newlib/arm_none_eabi_newlib-2.1.0.recipe index 90d5b87a0..5d11ea2a2 100644 --- a/sys-libs/arm_none_eabi_newlib/arm_none_eabi_newlib-2.1.0.recipe +++ b/sys-libs/arm_none_eabi_newlib/arm_none_eabi_newlib-2.1.0.recipe @@ -63,11 +63,11 @@ BUILD_PREREQUIRES=" cmd:make cmd:makeinfo cmd:${targetU}_ld$secondaryArchSuffix - ${tagetU}_gcc_nolibc$secondaryArchSuffix + ${targetU}_gcc_nolibc$secondaryArchSuffix " sourceDir=$(pwd) -installDir="$prefix/$relativeInstallDir/develop" +installDir="$prefix/$relativeInstallDir/develop/tools/" objectsDir=$(pwd)/../${portVersionedName}-obj BUILD()