diff options
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r-- | main/gcc/APKBUILD | 93 |
1 files changed, 36 insertions, 57 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 63f3660f28..877bf3571e 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -5,8 +5,7 @@ _pkgbase=6.1.0 _cross="" [ "$BOOTSTRAP" = "noheaders" ] && pkgname="gcc-pass1" [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" -[ "$CHOST" != "$CTARGET" ] && [ -n "$CHOST" -a -n "$CTARGET" ] \ - && _cross="-$CTARGET" +[ "$CHOST" != "$CTARGET" ] && _cross="-$CTARGET_ARCH" pkgname="$pkgname$_cross" pkgrel=0 @@ -34,7 +33,7 @@ LIBGOMP=true LIBGCC=true LIBATOMIC=true LIBITM=true -if [ "$CHOST" != "$CTARGET" ] && [ -n "$CHOST" -a -n "$CTARGET" ]; then +if [ "$CHOST" != "$CTARGET" ]; then if [ "$BOOTSTRAP" ]; then LANG_CXX=false LANG_ADA=false @@ -62,7 +61,7 @@ if [ "$CHOST" != "$CTARGET" ] && [ -n "$CHOST" -a -n "$CTARGET" ]; then export LDFLAGS_FOR_TARGET=" " STRIP_FOR_TARGET="$CTARGET-strip" -elif [ "$CBUILD" != "$CHOST" ] && [ -n "$CBUILD" -a -n "$CHOST" ]; then +elif [ "$CBUILD" != "$CHOST" ]; then # fixup flags. seems gcc treats CPPFLAGS as global without # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS. export CFLAGS="$CPPFLAGS $CFLAGS" @@ -109,49 +108,48 @@ x86 | x86_64) LIBQUADMATH=$LANG_FORTRAN ;; esac # libatomic is a dependency for openvswitch -$LIBATOMIC && subpackages="$subpackages libatomic" -$LIBGCC && subpackages="$subpackages libgcc" -$LIBQUADMATH && subpackages="$subpackages libquadmath" +$LIBATOMIC && subpackages="$subpackages libatomic::$CTARGET_ARCH" +$LIBGCC && subpackages="$subpackages libgcc::$CTARGET_ARCH" +$LIBQUADMATH && subpackages="$subpackages libquadmath::$CTARGET_ARCH" if $LIBGOMP; then depends="$depends libgomp=$_gccrel" - subpackages="$subpackages libgomp" + subpackages="$subpackages libgomp::$CTARGET_ARCH" fi _languages=c if $LANG_CXX; then - subpackages="$subpackages libstdc++:libcxx g++$_cross:gpp" + subpackages="$subpackages libstdc++:libcxx:$CTARGET_ARCH g++$_cross:gpp" _languages="$_languages,c++" fi if $LANG_OBJC; then - subpackages="$subpackages libobjc gcc-objc$_cross:objc" + subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_cross:objc" _languages="$_languages,objc" fi if $LANG_JAVA; then - subpackages="$subpackages libgcj gcc-java$_cross:java" + subpackages="$subpackages libgcj::$CTARGET_ARCH gcc-java$_cross:java" _languages="$_languages,java" fi if $LANG_GO; then - subpackages="$subpackages libgo gcc-go$_cross:go" + subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_cross:go" _languages="$_languages,go" fi if $LANG_FORTRAN; then - subpackages="$subpackages libgfortran gfortran$_cross:gfortran" + subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_cross:gfortran" _languages="$_languages,fortran" fi if $LANG_ADA; then - subpackages="$subpackages libgnat gcc-gnat$_cross:gnat" + subpackages="$subpackages libgnat::$CTARGET_ARCH gcc-gnat$_cross:gnat" _languages="$_languages,ada" makedepends="$makedepends gcc-gnat" fi -source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-${_pkgbase:-$pkgver}.tar.bz2 +source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgbase:-$pkgver}.tar.bz2 ftp://sourceware.org/pub/java/ecj-4.9.jar gcc-6-20160721.patch 001_all_default-ssp-strong.patch 002_all_default-relro.patch 003_all_default-fortify-source.patch - 004_all_default-hash-gnu.patch 005_all_default-as-needed.patch 011_all_default-warn-format-security.patch 012_all_default-warn-trampolines.patch @@ -193,11 +191,6 @@ _gcclibexec=/usr/libexec/gcc/${CTARGET}/$pkgver prepare() { cd "$_gccdir" - # verify we have set CHOST - if [ -z "$CHOST" ]; then - error "CHOST not set" - return 1 - fi _err= for i in $source; do @@ -311,6 +304,7 @@ build() { $_cross_configure \ $_bootstrap_configure \ --with-system-zlib \ + --with-linker-hash-style=gnu \ || return 1 make || return 1 @@ -331,7 +325,7 @@ package() { | xargs rm -f \ || return 1 - # strip debug info from some statib libs + # strip debug info from some static libs ${STRIP_FOR_TARGET} -g `find "$pkgdir" \( -name libgfortran.a -o -name libobjc.a -o -name libgomp.a \ -o -name libmudflap.a -o -name libmudflapth.a \ -o -name libgcc.a -o -name libgcov.a -o -name libquadmath.a \ @@ -379,25 +373,21 @@ package() { } libatomic() { - pkgdesc="GCC Atomic library" - depends= + pkgdesc="GCC Atomic library" + depends= replaces="gcc" - CARCH="$CTARGET_ARCH" - mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ - cp -a "$pkgdir"/usr/$CTARGET/lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ - return 1 + mkdir -p "$subpkgdir"/usr/lib + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ + return 1 } libcxx() { pkgdesc="GNU C++ standard runtime library" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ - cp -a "$pkgdir"/usr/$CTARGET/lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ return 1 } @@ -406,15 +396,15 @@ gpp() { depends="libstdc++=$_gccrel gcc=$_gccrel libc-dev" mkdir -p "$subpkgdir/$_gcclibexec" \ "$subpkgdir"/usr/bin \ - "$subpkgdir"/usr/include \ - "$subpkgdir"/usr/lib \ + "$subpkgdir"/usr/${_cross:+$CTARGET/}include \ + "$subpkgdir"/usr/${_cross:+$CTARGET/}lib \ mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/" paxmark -pmrs "$subpkgdir/$_gcclibexec/cc1plus" || return 1 - mv "$pkgdir"/usr/lib/*++* "$subpkgdir"/usr/lib/ - mv "$pkgdir"/usr/include/c++ "$subpkgdir"/usr/include/ - mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_cross:+$CTARGET/}lib/ || return 1 + mv "$pkgdir"/usr/${_cross:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_cross:+$CTARGET/}include/ || return 1 + mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ || return 1 } libobjc() { @@ -422,7 +412,7 @@ libobjc() { replaces="objc" depends= mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libobjc.so.* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/ } objc() { @@ -442,11 +432,9 @@ objc() { libgcc() { pkgdesc="GNU C compiler runtime libraries" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ - cp -a "$pkgdir"/usr/$CTARGET/lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ return 1 } @@ -454,10 +442,9 @@ libgomp() { pkgdesc="GCC shared-memory parallel programming API library" depends= replaces="gcc" - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/lib/libgomp.so.* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ } java() { @@ -487,7 +474,6 @@ libgcj() { # libgcj_bc.so moved from gcc-java to libgcj replaces="gcc-java" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/bin cd "$pkgdir"/usr/bin @@ -518,7 +504,6 @@ libgcj() { libgo() { pkgdesc="Go runtime library for GCC" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgo.so.* "$subpkgdir"/usr/lib/ @@ -543,7 +528,6 @@ go() { libgfortran() { pkgdesc="Fortran runtime library for GCC" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgfortran.so.* "$subpkgdir"/usr/lib/ @@ -553,7 +537,6 @@ libquadmath() { replaces="gcc" pkgdesc="128-bit math library for GCC" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libquadmath.so.* "$subpkgdir"/usr/lib/ @@ -585,7 +568,6 @@ gfortran() { libgnat() { pkgdesc="GNU Ada runtime shared libraries" depends= - CARCH="$CTARGET_ARCH" mkdir -p "$subpkgdir"/usr/lib mv "$pkgdir"/usr/lib/libgna*.so "$subpkgdir"/usr/lib/ @@ -612,8 +594,7 @@ md5sums="8fb6cb98b8459f5863328380fbf06bd1 gcc-6.1.0.tar.bz2 3634a8f58065805809273b105071c1f3 001_all_default-ssp-strong.patch 28ca9eac639e88869ac975d593ff7a89 002_all_default-relro.patch b7235f279097e28295b6bbaa0804302f 003_all_default-fortify-source.patch -d4e31fe787e2fc1cb8afdd3815e9d28a 004_all_default-hash-gnu.patch -ed9ebe1548ea27147b5742a24d480fcd 005_all_default-as-needed.patch +50cb4d5fa4f66b2192c0bfa22b2a3433 005_all_default-as-needed.patch 614776347743e17651c778f1c6a9fa2e 011_all_default-warn-format-security.patch 55afcb3f072a6ffaff8ce03f310ae57f 012_all_default-warn-trampolines.patch c324e6e3204a39334aa559329592bde3 020_all_msgfmt-libstdc++-link.patch @@ -641,15 +622,14 @@ e17bbb0fe802974e20645b4182b4c410 fix-gcj-iconv-musl.patch 4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch d00d7e4b0c00cb7448576af9cd7fcea8 ada-fixes.patch 20e2731c02ce50739ebdead2795f9c41 ada-shared.patch -221773e09429ae2aba03780fb1089290 ada-musl.patch" +bd2f71f7559e0aa38745ee62e5799601 ada-musl.patch" sha256sums="09c4c85cabebb971b1de732a0219609f93fc0af5f86f6e437fd8d7f832f1a351 gcc-6.1.0.tar.bz2 9506e75b862f782213df61af67338eb7a23c35ff425d328affc65585477d34cd ecj-4.9.jar 3e2c8350a354b54d8f2ffb3db17d103adf7e45dd4bbe94620b25b3c63d839b28 gcc-6-20160721.patch deb22792f37e107d0afff5f4ea6b2a9fc9de4f48e1c7133bf658b6e0d057b1d6 001_all_default-ssp-strong.patch 2c7fcbc3879cce0775e37306441110dc63e7f457e2e5ad890f6b0800eb520ef6 002_all_default-relro.patch 611d3d101351c134d3c03f6d8265a90268cef71c682bf72e02a6cd2d99315ef8 003_all_default-fortify-source.patch -549ad945d43370994ae8b8b0921b703efff71857e7669eff804f976bba3f5ae7 004_all_default-hash-gnu.patch -302c868dd7559ba01a38fea32c313d492403d02c8a3cebd51bb7be5988aee7f9 005_all_default-as-needed.patch +4a52dc4c64e322ff25c321fc63f7a8ea4917d5d0a4de9b603e289f3b76a6533a 005_all_default-as-needed.patch 5ba3639e8834f2e8b59c51c567d1084dfff7ed27c84565dee8ed769b63c90936 011_all_default-warn-format-security.patch da1fae26d6a387aa216af1816f241d141d8d4f158b1e5c3c827643ab8b491f3e 012_all_default-warn-trampolines.patch c080f458c95dd0cbcc1322edc35890da892c3aaa7944c4eceb6319ca412cff02 020_all_msgfmt-libstdc++-link.patch @@ -677,15 +657,14 @@ bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build- a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch d2a67a7ae0304cd10532883df19923b98dbc9b7a24957b619d4a6e04f19c5507 ada-fixes.patch d6c7fc1820a4fa285297c299c255fe2f19ce1695486f20edd098252a97545e6a ada-shared.patch -23d99e94060972bb25de4687da88ecb4fce9a7f0afa4b71a05161246917cd75d ada-musl.patch" +f7f5aa37d27644292a90ab31afdf4be93b116507bfc39f4d9f6af047311b7d87 ada-musl.patch" sha512sums="eeed3e2018b8c012aabce419e8d718fde701e5c3c179b4486c61ba46e5736eecc8fccdd18b01fcd973a42c6ad3116dbbe2ee247fe3757d622d373f93ebaf8d2e gcc-6.1.0.tar.bz2 28f8c6fdbcb19e950b1d0bafb3bcc7a8cba87bc673aa6027cece116599cdee80f0cf5e95a1440544890239f5c754e8a93ab46d9daedd937faef445d7ea33b226 ecj-4.9.jar 435ac5e2ec041c70c2508242dbdc3a56da9633bf0549fa9cd8c4e3aa4dfc9a02539bd4d81fba4f5c72eeda4f4c25c5b4998ae2f84ce5f64b4edf574833160b68 gcc-6-20160721.patch a1335adc2fbee98e36c4437ff2587771b98ed4180726779020f65039498235626a411cdb0100dbd20cd19d12f0d94f9a21af179ff624676c28cead9d60598b5d 001_all_default-ssp-strong.patch e36e95b81489163abd6fe9d58f7867bdca43e61143afacbfb17f4698c0b16ec5fd0061d8fab7b2ae615540bebd721c2e2227f80401b4e7fc253da9da62e6b513 002_all_default-relro.patch f86466c62b8291fac46f9c250c7ad8fa5ab7b1cce2504442fd07ddc4543665b317ae28951f244e39aba29aeaf3fff252ec4f6a147aa16adb2b7aed747dd89188 003_all_default-fortify-source.patch -1d186d4fba52d8f650df02466e49a8bf9cdcd8423f37a3ba5282b6e965b52cb5b6adb9dfd2f7010b6c4aa3fcbf048b8a87a9d383e4645d813d532ba9c88c8aa0 004_all_default-hash-gnu.patch -a10e1909eb80ca15178ceac2caf7388e18839d0c61106d7f0d29c2be097c17a83854972028c2678e7355bd6cb71a465f6b703c19783549aa906990973af303fc 005_all_default-as-needed.patch +51282fea54c7e616367bbeb2479ba13fec6f24eb47bd04e2071907b3b36273b2ff24676f46ef8d22f241c8ab4857307861eee076eab66797c3a50a8ecaa1809a 005_all_default-as-needed.patch 3398386dd1e079d6545dd9799adc799c6b80e3984fac6899d0e1a7ee21b66d0c7e53cddf17a65d590c883db750f9f79aaedd857355a8b9f7fb9476c906237919 011_all_default-warn-format-security.patch 9adb0d2b9b67dd957df6c609b8714c7c078efb52cd88770905c37c67827be8fc83d1125037b9c29d77db21ce78756aa2bb0bacdb0b98d869ac126da76a298e21 012_all_default-warn-trampolines.patch d35a3ac7e13a4446921a90e1ff3eec1079840c845f9d523c868e24ae21f94cf69ba041de5341ebef96432a6f57598e223381d4286e8fb8baaa25906707f29fbd 020_all_msgfmt-libstdc++-link.patch @@ -713,4 +692,4 @@ abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1 35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch 9016b257abd8fa981de44a49512e35db814d1cbb47c1a87cd31c12d4ae20b13e9e149fe41691a7ec3c95bbcfde8a79194a8d2eaf547ceade3a246fad67c47dd8 ada-fixes.patch 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19 ada-shared.patch -a13c6acd864933bd7b12501686da57b09cbff9471c7f630f5bc9a92902a4006a9024a08ee41574707e4c232a754a21633ea89e0bb45dc0d5967e50b299ef6a5e ada-musl.patch" +631d4bdef6d8bde34df7978bb53ec28c3c909cf1f87139e5f148138d0f09adc58b41ecf0148bbf50fb4bc916c411e9bf8a2b6c046c75c0e77d754d8c35bcd4d7 ada-musl.patch" |