aboutsummaryrefslogtreecommitdiffstats
path: root/lang/gcc5-devel/Makefile
diff options
context:
space:
mode:
authorjmmv <jmmv@FreeBSD.org>2015-11-02 10:57:34 +0800
committerjmmv <jmmv@FreeBSD.org>2015-11-02 10:57:34 +0800
commit4be20f32a693e983c0e983c4d73acf9f02f3cc3b (patch)
tree837e191bc46beb60151f909a847b3eedcef17f3b /lang/gcc5-devel/Makefile
parent57d47524659ac88646a7a5c39e37c051d89a04bb (diff)
downloadfreebsd-ports-gnome-4be20f32a693e983c0e983c4d73acf9f02f3cc3b.tar.gz
freebsd-ports-gnome-4be20f32a693e983c0e983c4d73acf9f02f3cc3b.tar.zst
freebsd-ports-gnome-4be20f32a693e983c0e983c4d73acf9f02f3cc3b.zip
Add a MULTILIB option to gcc[56]-devel for powerpc64
This fixes the build of gcc[56]-devel 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-devel/Makefile')
-rw-r--r--lang/gcc5-devel/Makefile10
1 files changed, 10 insertions, 0 deletions
diff --git a/lang/gcc5-devel/Makefile b/lang/gcc5-devel/Makefile
index 20cd9658004c..011572cde30d 100644
--- a/lang/gcc5-devel/Makefile
+++ b/lang/gcc5-devel/Makefile
@@ -3,6 +3,7 @@
PORTNAME= gcc
PORTVERSION= 5.2.1.s20151027
+PORTREVISION= 1
CATEGORIES= lang java
MASTER_SITES= GCC/snapshots/${DISTVERSION}
PKGNAMESUFFIX= ${SUFFIX}-devel
@@ -51,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"