svn commit: r400632 - in head/lang: gcc5-devel gcc6-devel
Julio Merino
jmmv at FreeBSD.org
Mon Nov 2 02:57:36 UTC 2015
Author: jmmv (src committer)
Date: Mon Nov 2 02:57:34 2015
New Revision: 400632
URL: https://svnweb.freebsd.org/changeset/ports/400632
Log:
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
Modified:
head/lang/gcc5-devel/Makefile
head/lang/gcc6-devel/Makefile
Modified: head/lang/gcc5-devel/Makefile
==============================================================================
--- head/lang/gcc5-devel/Makefile Mon Nov 2 01:34:06 2015 (r400631)
+++ head/lang/gcc5-devel/Makefile Mon Nov 2 02:57:34 2015 (r400632)
@@ -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"
Modified: head/lang/gcc6-devel/Makefile
==============================================================================
--- head/lang/gcc6-devel/Makefile Mon Nov 2 01:34:06 2015 (r400631)
+++ head/lang/gcc6-devel/Makefile Mon Nov 2 02:57:34 2015 (r400632)
@@ -3,6 +3,7 @@
PORTNAME= gcc
PORTVERSION= 6.0.0.s20151025
+PORTREVISION= 1
CATEGORIES= lang java
MASTER_SITES= GCC/snapshots/${DISTVERSION}
PKGNAMESUFFIX= ${SUFFIX}
@@ -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"
More information about the svn-ports-all
mailing list