diff options
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r-- | main/gcc/APKBUILD | 59 |
1 files changed, 26 insertions, 33 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD index 32b7fd2c9b..70610f0f47 100644 --- a/main/gcc/APKBUILD +++ b/main/gcc/APKBUILD @@ -2,24 +2,23 @@ pkgname=gcc pkgver=6.3.0 _pkgbase=6.3.0 -_cross="" -[ "$BOOTSTRAP" = "noheaders" ] && pkgname="gcc-pass1" [ "$BOOTSTRAP" = "nolibc" ] && pkgname="gcc-pass2" -[ "$CHOST" != "$CTARGET" ] && _cross="-$CTARGET_ARCH" +[ "$CBUILD" != "$CHOST" ] && _cross="-$CARCH" || _cross="" +[ "$CHOST" != "$CTARGET" ] && _target="-$CTARGET_ARCH" || _target="" -pkgname="$pkgname$_cross" +pkgname="$pkgname$_target" pkgrel=1 pkgdesc="The GNU Compiler Collection" url="http://gcc.gnu.org" arch="all" license="GPL LGPL" _gccrel=$pkgver-r$pkgrel -depends="binutils$_cross isl" -makedepends_build="paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev" +options="toolchain" +depends="binutils$_target isl" +makedepends_build="gcc$_cross g++$_cross paxmark bison flex texinfo gawk zip gmp-dev mpfr-dev mpc1-dev zlib-dev" makedepends_host="linux-headers gmp-dev mpfr-dev mpc1-dev isl-dev zlib-dev !gettext-dev" -makedepends="$makedepends_build $makedepends_host" subpackages=" " -[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_cross" +[ "$CHOST" = "$CTARGET" ] && subpackages="gcc-doc$_target" replaces="libstdc++ binutils" : ${LANG_CXX:=true} @@ -127,30 +126,31 @@ fi _languages=c if $LANG_CXX; then - subpackages="$subpackages libstdc++:libcxx:$CTARGET_ARCH g++$_cross:gpp" + subpackages="$subpackages libstdc++:libcxx:$CTARGET_ARCH g++$_target:gpp" _languages="$_languages,c++" fi if $LANG_OBJC; then - subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_cross:objc" + subpackages="$subpackages libobjc::$CTARGET_ARCH gcc-objc$_target:objc" _languages="$_languages,objc" fi if $LANG_JAVA; then - subpackages="$subpackages libgcj::$CTARGET_ARCH gcc-java$_cross:java" + subpackages="$subpackages libgcj::$CTARGET_ARCH gcc-java$_target:java" _languages="$_languages,java" fi if $LANG_GO; then - subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_cross:go" + subpackages="$subpackages libgo::$CTARGET_ARCH gcc-go$_target:go" _languages="$_languages,go" fi if $LANG_FORTRAN; then - subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_cross:gfortran" + subpackages="$subpackages libgfortran::$CTARGET_ARCH gfortran$_target:gfortran" _languages="$_languages,fortran" fi if $LANG_ADA; then - subpackages="$subpackages libgnat::$CTARGET_ARCH gcc-gnat$_cross:gnat" + subpackages="$subpackages libgnat::$CTARGET_ARCH gcc-gnat$_target:gnat" _languages="$_languages,ada" - makedepends="$makedepends gcc-gnat" + makedepends_build="$makedepends_build gcc-gnat$_cross" fi +makedepends="$makedepends_build $makedepends_host" 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 @@ -266,15 +266,8 @@ build() { [ "$CHOST" != "$CTARGET" ] && _cross_configure="--disable-bootstrap --with-sysroot=$CBUILDROOT" case "$BOOTSTRAP" in - noheaders) - _bootstrap_configure="--with-newlib --without-headers --disable-shared --enable-threads=no" - ;; - nolibc) - _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" - ;; - *) - _bootstrap_configure="--enable-shared --enable-threads --enable-tls" - ;; + nolibc) _bootstrap_configure="--with-newlib --disable-shared --enable-threads=no" ;; + *) _bootstrap_configure="--enable-shared --enable-threads --enable-tls" ;; esac $LIBGOMP || _bootstrap_configure="$_bootstrap_configure --disable-libgomp" @@ -405,7 +398,7 @@ libatomic() { replaces="gcc" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ + mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libatomic.so.* "$subpkgdir"/usr/lib/ || \ return 1 } @@ -414,7 +407,7 @@ libcxx() { depends= mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ + mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libstdc++.so.* "$subpkgdir"/usr/lib/ || \ return 1 } @@ -423,14 +416,14 @@ gpp() { depends="libstdc++=$_gccrel gcc=$_gccrel libc-dev" mkdir -p "$subpkgdir/$_gcclibexec" \ "$subpkgdir"/usr/bin \ - "$subpkgdir"/usr/${_cross:+$CTARGET/}include \ - "$subpkgdir"/usr/${_cross:+$CTARGET/}lib \ + "$subpkgdir"/usr/${_target:+$CTARGET/}include \ + "$subpkgdir"/usr/${_target:+$CTARGET/}lib \ mv "$pkgdir/$_gcclibexec/cc1plus" "$subpkgdir/$_gcclibexec/" paxmark -pmrs "$subpkgdir/$_gcclibexec/cc1plus" || return 1 - 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/${_target:+$CTARGET/}lib/*++* "$subpkgdir"/usr/${_target:+$CTARGET/}lib/ || return 1 + mv "$pkgdir"/usr/${_target:+$CTARGET/}include/c++ "$subpkgdir"/usr/${_target:+$CTARGET/}include/ || return 1 mv "$pkgdir"/usr/bin/*++ "$subpkgdir"/usr/bin/ || return 1 } @@ -439,7 +432,7 @@ libobjc() { replaces="objc" depends= mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libobjc.so.* "$subpkgdir"/usr/lib/ } objc() { @@ -461,7 +454,7 @@ libgcc() { depends= mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ + mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgcc_s.so.* "$subpkgdir"/usr/lib/ || \ return 1 } @@ -471,7 +464,7 @@ libgomp() { replaces="gcc" mkdir -p "$subpkgdir"/usr/lib - mv "$pkgdir"/usr/${_cross:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ + mv "$pkgdir"/usr/${_target:+$CTARGET/}lib/libgomp.so.* "$subpkgdir"/usr/lib/ } java() { |