aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gcc5/Makefile
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2015-11-09 04:09:59 +0800
committerjmmv <jmmv@FreeBSD.org>2015-11-09 04:09:59 +0800
commit209f7c5354459954440d5b07f02aab172650841d (patch)
tree4f057637df17829ca8031c2f30a223ba06c28582 /lang/gcc5/Makefile
parentd8b309c535d1ee8b89cc03c536ec8a0b1fe326e9 (diff)
downloadfreebsd-ports-graphics-209f7c5354459954440d5b07f02aab172650841d.tar.gz
freebsd-ports-graphics-209f7c5354459954440d5b07f02aab172650841d.tar.zst
freebsd-ports-graphics-209f7c5354459954440d5b07f02aab172650841d.zip
Add a MULTILIB option to gcc{,48,49,5} for powerpc64
This change is the same as r400632, which updated gcc[56]-devel, but now for gcc{,48,49,5}. Waited a week to ensure the change caused nothing to go horribly wrong but this change is very low risk because it only affects powerpc64. This fixes the build of gcc{,48,49,5} under powerpc64 when the system is built without the lib32 libraries. More in detail: If the system is built with lib32 support (WITH_LIB32, which is the default), building gcc from ports results in a compiler that can target both 64-bit and 32-bit binaries on powerpc64. However, when lib32 support is disabled (WITHOUT_LIB32), gcc should only be built with 64-bit support or otherwise the build fails. To fix this, explicitly disable 32-bit support when /usr/lib32 is not present and add a MULTILIB option (which is only defined for powerpc64 when 32-bit support is possible and defaults to yes to preserve the current behavior) to allow the user to explicitly control this feature. Approved by: gerald (maintainer), bdrewery (mentor), andreast Differential Revision: https://reviews.freebsd.org/D3952
Diffstat (limited to 'lang/gcc5/Makefile')
-rw-r--r--lang/gcc5/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/lang/gcc5/Makefile b/lang/gcc5/Makefile
index a06dd7606f7..06567f2c9fe 100644
--- a/lang/gcc5/Makefile
+++ b/lang/gcc5/Makefile
@@ -3,7 +3,7 @@
PORTNAME= gcc
PORTVERSION= 5.2.0
-PORTREVISION= 1
+PORTREVISION= 2
CATEGORIES= lang java
MASTER_SITES= GCC/releases/gcc-${DISTVERSION}
PKGNAMESUFFIX= ${SUFFIX}
@@ -52,6 +52,15 @@ OPTIONS_DEFAULT_amd64= JAVA
OPTIONS_EXCLUDE_DragonFly= JAVA
BOOTSTRAP_DESC= Build using a full bootstrap
+.if exists(/usr/lib32/libc.so)
+OPTIONS_DEFINE_powerpc64= MULTILIB
+OPTIONS_DEFAULT_powerpc64= MULTILIB
+MULTILIB_DESC= Build support for 32-bit and 64-bit targets
+MULTILIB_CONFIGURE_ENABLE= multilib
+.else
+CONFIGURE_ARGS+= --disable-multilib
+.endif
+
.include <bsd.port.pre.mk>
.if ${ARCH} == "amd64"