gcc6: update recipe to 6.1.0.

This commit is contained in:
Jerome Duval
2016-05-05 12:15:47 +00:00
parent 4356f9f02a
commit bdbf7ce311
2 changed files with 3085 additions and 22 deletions

View File

@@ -3,20 +3,22 @@ DESCRIPTION="The standard compiler for non-legacy Haiku (i.e. for all \
architectures other than x86_gcc2)."
HOMEPAGE="http://gcc.gnu.org"
srcGitRev="77f839f0466f8b02459719db98bdee6f83ba604b"
SOURCE_URI="https://github.com/korli/gcc/archive/$srcGitRev.tar.gz"
CHECKSUM_SHA256="1717c4390f0acc3bb65a9da2339f42171850cb7b90c9346b0715f1d78564cd39"
SOURCE_URI="https://ftp.gnu.org/gnu/gcc/gcc-6.1.0/gcc-6.1.0.tar.bz2"
CHECKSUM_SHA256="09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351"
REVISION="1"
LICENSE="
GNU GPL v3
GNU LGPL v3
"
COPYRIGHT="1988-2015 Free Software Foundation, Inc."
COPYRIGHT="1988-2016 Free Software Foundation, Inc."
PATCHES="gcc6-6.0.0_2015_11_08.patchset"
PATCHES="gcc-6.1.0_2015_11_08.patchset"
ARCHITECTURES="!x86_gcc2 !x86 x86_64 arm"
SECONDARY_ARCHITECTURES="!x86"
ARCHITECTURES="!x86_gcc2 ?x86 ?x86_64 ?arm"
SECONDARY_ARCHITECTURES="?x86"
libatomicSoVersion="1"
libatomicLibVersion="1.2.0"
libstdcxxSoVersion="6"
libstdcxxLibVersion="6.0.22"
@@ -31,7 +33,7 @@ PROVIDES="
cmd:cpp$secondaryArchSuffix = $portVersion compat >= 6
cmd:g++$secondaryArchSuffix = $portVersion compat >= 6
cmd:gcc$secondaryArchSuffix = $portVersion compat >= 6
cmd:gcc_6.0.0$secondaryArchSuffix = $portVersion compat >= 6
cmd:gcc_6.1.0$secondaryArchSuffix = $portVersion compat >= 6
cmd:gcov$secondaryArchSuffix = $portVersion compat >= 6
"
REQUIRES="
@@ -64,7 +66,7 @@ BUILD_PREREQUIRES="
cmd:xargs
"
SOURCE_DIR="gcc-$srcGitRev"
SOURCE_DIR="gcc-6.1.0"
sourceDir=$(pwd)
relativeInstallDir="develop/tools$secondaryArchSubDir"
@@ -74,7 +76,7 @@ gccVersion=$(echo $portVersion | cut -d_ -f1)
BUILD()
{
rm -rf $objectsDir
#rm -rf $objectsDir
# Touch some files generated by bison, so that bison won't run to update
# them. Fixes issues with newer bison versions.
@@ -108,7 +110,9 @@ BUILD()
--enable-version-specific-runtime-libs \
--enable-languages=c,c++ --enable-lto --enable-frame-pointer \
--with-pkgversion=$(echo $portVersion | cut -d_ -f2-) \
--enable-__cxa-atexit --with-system-zlib \
--enable-__cxa-atexit --with-system-zlib --enable-checking=release \
--with-bug-url=http://dev.haiku-os.org/ \
--with-default-libstdcxx-abi=gcc4-compatible \
$additionalConfigureFlags
make $jobArgs
@@ -130,15 +134,8 @@ BUILD()
mv saved/* .
rmdir saved
echo "### libsupc++"
# Build a shared libsupc++ from libsupc++.a (hacking the gcc build system
# to build a shared libsupc++ yields pretty much the same result, so we
# use this simpler approach).
cd $objectsDir/$effectiveTargetMachineTriple/libstdc++-v3/libsupc++
gcc -nodefaultlibs -shared -o .libs/libsupc++.so -Xlinker --whole-archive \
.libs/libsupc++.a
# build kernel version of libsupc++.a (without threads or TLS)
cd $objectsDir/$effectiveTargetMachineTriple/libstdc++-v3/libsupc++
mkdir -p saved
mv .libs/libsupc++* saved/
cp "../include/$effectiveTargetMachineTriple/bits/gthr-default.h" \
@@ -190,6 +187,14 @@ INSTALL()
cd $installDir
gccLibDir=lib/gcc/$effectiveTargetMachineTriple/$gccVersion
# libatomic
strip --strip-debug $gccLibDir/libatomic.so.$libatomicLibVersion
cp -d $gccLibDir/libstdc++.so \
$gccLibDir/libatomic.so.$libatomicSoVersion \
$gccLibDir/libatomic.so.$libatomicLibVersion \
$libDir/
cp $gccLibDir/libatomic*.a $developLibDir/
# libstdc++
strip --strip-debug $gccLibDir/libstdc++.so.$libstdcxxLibVersion
cp -d $gccLibDir/libstdc++.so \
@@ -201,10 +206,8 @@ INSTALL()
# libsupc++
libstdcxxDir=$objectsDir/$effectiveTargetMachineTriple/libstdc++-v3
cp $libstdcxxDir/libsupc++/.libs/libsupc++-kernel.a \
$libstdcxxDir/libsupc++/.libs/libsupc++.so \
$gccLibDir/
strip --strip-debug $gccLibDir/libsupc++.so
cp $gccLibDir/libsupc++.so $libDir/
ln -s libstdc++.so $libDir/libsupc++.so
cp $gccLibDir/libsupc++*.a $developLibDir/
# libgcc
@@ -274,6 +277,8 @@ INSTALL()
### Sub Packages ##########################################
packageEntries "syslibs" \
$relativeLibDir/libatomic.so.$libatomicSoVersion \
$relativeLibDir/libatomic.so.$libatomicLibVersion \
$relativeLibDir/libgcc_s.so \
$relativeLibDir/libgcc_s.so.$libgccSoVersion \
$relativeLibDir/libstdc++.so \
@@ -282,6 +287,7 @@ INSTALL()
$relativeLibDir/libsupc++.so
packageEntries "syslibs_devel" \
$relativeDevelopLibDir/libatomic.a \
$relativeDevelopLibDir/libgcc.a \
$relativeDevelopLibDir/libgcc-kernel.a \
$relativeDevelopLibDir/libgcc_eh.a \
@@ -304,6 +310,7 @@ loader, so it is required for executing most c/c++ programs."
PROVIDES_syslibs="
gcc6_syslibs$secondaryArchSuffix = $portVersion compat >= 6
lib:libatomic$secondaryArchSuffix = $libatomicLibVersion compat >= $libatomicSoVersion
lib:libgcc_s$secondaryArchSuffix = $portVersion compat >= 6
lib:libstdc++$secondaryArchSuffix = $portVersion compat >= 6
lib:libsupc++$secondaryArchSuffix = $portVersion compat >= 6

File diff suppressed because it is too large Load Diff