aboutsummaryrefslogtreecommitdiffstats
path: root/main/gcc/APKBUILD
diff options
context:
space:
mode:
authorTimo Teräs <timo.teras@iki.fi>2013-07-12 21:36:19 +0000
committerTimo Teräs <timo.teras@iki.fi>2013-07-12 21:37:40 +0000
commit47c71fbe7583fa29f604f5010bc6218d3f5856e3 (patch)
tree194cf51075fcbf5ddff60465c8f5cc6ecd697a21 /main/gcc/APKBUILD
parent752ebe08e01fecb6b67db131fdd230717aaf4505 (diff)
downloadaports-47c71fbe7583fa29f604f5010bc6218d3f5856e3.tar.bz2
aports-47c71fbe7583fa29f604f5010bc6218d3f5856e3.tar.xz
main/gcc: fix crossbuild and musl support
Diffstat (limited to 'main/gcc/APKBUILD')
-rw-r--r--main/gcc/APKBUILD38
1 files changed, 26 insertions, 12 deletions
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 51ff93a537..0e64642594 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
@@ -20,15 +20,18 @@ subpackages="$pkgname-doc libgcc libgomp libstdc++:libcxx g++:gpp"
replaces="libstdc++"
if [ "$CBUILD" != "$CHOST" ]; then
- export CFLAGS_FOR_HOST="$CFLAGS"
- export CXXFLAGS_FOR_HOST="$CXXFLAGS"
- export CPPFLAGS_FOR_HOST="$CPPFLAGS"
- export LDFLAGS_FOR_HOST="$LDFLAGS"
- unset CFLAGS CXXFLAGS CPPFLAGS LDFLAGS
-
- export CFLAGS="--sysroot=${CBUILDROOT}"
- export CXXFLAGS="--sysroot=${CBUILDROOT}"
- export LDFLAGS="--sysroot=${CBUILDROOT}"
+ # fixup flags. seems gcc treats CPPFLAGS as global without
+ # _FOR_xxx variants. wrap it in CFLAGS and CXXFLAGS.
+ export CFLAGS="$CPPFLAGS $CFLAGS"
+ export CXXFLAGS="$CPPFLAGS $CXXFLAGS"
+ unset CPPFLAGS
+
+ # reset flags and cc for build
+ export CC_FOR_BUILD="gcc"
+ export CXX_FOR_BUILD="g++"
+ export CFLAGS_FOR_BUILD=" "
+ export CXXFLAGS_FOR_BUILD=" "
+ export LDFLAGS_FOR_BUILD=" "
LANG_OBJC=off
LANG_JAVA=off
@@ -78,6 +81,9 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-$pkgver/gcc-$pkgver.tar.bz2
gcc-4.8-dynamic-linker.patch
boehem-gc-uclibc.patch
gcc-pure64.patch
+
+ gcc-4.8-build-args.patch
+ fix-cxxflags-passing.patch
"
# gcc-go.patch
@@ -178,6 +184,8 @@ build() {
if [ "${CHOST#*musl}" != "$CHOST" ]; then
# musl does not support mudflap
_arch_configure="$_arch_configure --disable-mudflap --disable-libmudflap"
+ # gcc does not detect musl's ssp support, force it
+ export gcc_cv_libc_provides_ssp=yes
else
_arch_configure="$_arch_configure --without-system-libunwind"
fi
@@ -468,7 +476,9 @@ ab83248e10b2bf4b3d9240de0fefb52b pt_gnu_eh_frame.patch
32e8e4c0e23ed8f5de95a591cb30f1da gcc-4.6-pr32219.patch
79d00ee1284fac5192456f7f7d3908aa gcc-4.8-dynamic-linker.patch
2c6cb49bb9bfd8b6e690222e66ccc901 boehem-gc-uclibc.patch
-2e2b787bb988d9007c9f7ce42178dfe6 gcc-pure64.patch"
+2e2b787bb988d9007c9f7ce42178dfe6 gcc-pure64.patch
+0a2041bbf83648e6c4f6d3484f7249ca gcc-4.8-build-args.patch
+4aea37d334ab00bb6bba37cd8c481367 fix-cxxflags-passing.patch"
sha256sums="545b44be3ad9f2c4e90e6880f5c9d4f0a8f0e5f67e1ffb0d45da9fa01bb05813 gcc-4.8.1.tar.bz2
4aa0ab0f114b0ff8af5d0c19c18930e3fcd5e5b0956f56ca24e58e5a243964b1 gcc-4.8.1-piepatches-v0.5.6.tar.bz2
f6c7cb99beead66dd4d06f7004c5731a9360330cbe878ce79792c618e008eed2 gcc-4.4.3-specs-0.2.0.tar.bz2
@@ -489,7 +499,9 @@ da6bbb5dc654d5e1df8ecae5c9ebb56265426c405931f14f5878248b8c79f78d 51_all_libiber
89207a8b62137a857ee2c43499d6b5247d37b530d1338844dbb330a6846b2ad2 gcc-4.6-pr32219.patch
f3863b997acf8fdf5ad1d3626b41a8a0670b896505e9b7afb517916c7599fb1c gcc-4.8-dynamic-linker.patch
02751ccf223dcfc898c0ce2214cd0859d275e90b742f1a66e38db5c50f94b38c boehem-gc-uclibc.patch
-f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.patch"
+f5473c6aea96d5137defd68898ba31042944a3f3ed26c05b964a40bd876c6f47 gcc-pure64.patch
+bd7a6f514fcc457f29e5fda157203f3bcd013aeba5d53b3459196eef3ce752ab gcc-4.8-build-args.patch
+a395ba4cf047c48cac56985726fddf0948f4425c9f1a0c9ddba1812b2b3d8300 fix-cxxflags-passing.patch"
sha512sums="1becc874aad77a469069b6d9da4158aae9e013e24afa9364fe4feff9a5094d0673ee7694b3840e892c860f73a56b3ece6174338a8214438c42b9f86dd6c35ea7 gcc-4.8.1.tar.bz2
274e16ef5136348415898d4e5a3bc71763078de8ae7c18645e8b07f54d705609b08c0efadbdb55117fdfb5f6490529b446d09def448174c2747372829d029a9d gcc-4.8.1-piepatches-v0.5.6.tar.bz2
779ecb0a064d2138b54569c8ae501975b8a6b72e5a3acbf8597619a8db77ee42ef9b0e62608d5192a15e4393e7dfc009bb50b994782236faa744b2c46b5fe517 gcc-4.4.3-specs-0.2.0.tar.bz2
@@ -510,4 +522,6 @@ e3edf75df1f27af8771bd263e1bd607f6207c4eb5b2a5e11032577deba43ea201825e3b5008a7201
9fc5e32f2573ae67b6cf22119d636d10a47c42718635bceff7d457a93a3f664ae1ed10e154f70964ba2d26b0de04f879a8c05de6411112760d40433373dd0a80 gcc-4.6-pr32219.patch
db84b6582950378116723116be4f277881f7bdd05add216c58c2b86c0fb3a70abeb7798507a74a64b9b949d5b311167bd4df84a048d2d2d32f5836ea1d34c42e gcc-4.8-dynamic-linker.patch
e1d6a450dfb40b134ad7f759c4c10174d2490b0093fe47cb33479245f26a3a8c54ebcf6255943c0ccfcb5095600d1c05e530baeed35609c8ffe75caac8e57c49 boehem-gc-uclibc.patch
-4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch"
+4a5aeff0399782c752e6e3f2f48d984b2056dfb5d229b23a24eee1562d241339989b2203f139821cfc03c9b25c9bd7da6ccbbdc7a09d242e4de7f0d606c6f63c gcc-pure64.patch
+abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1ca7d49fd0b5e351532aa15a3b13362abbf1ca4266f54a687 gcc-4.8-build-args.patch
+35d6d59f0b7b968f282f56767c9e0823a7bdc5aa0d450aca50fbd802649a7ca608b47671244a3faa208a9b0d6832cabb5a22724157dc817b2c0ad63d09f93282 fix-cxxflags-passing.patch"