ports/155408: [PATCH] add support for USE_GCC_BUILD to bsd.port.mk

Martin Matuska mm at FreeBSD.org
Wed Mar 9 14:20:18 UTC 2011


>Number:         155408
>Category:       ports
>Synopsis:       [PATCH] add support for USE_GCC_BUILD to bsd.port.mk
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          change-request
>Submitter-Id:   current-users
>Arrival-Date:   Wed Mar 09 14:20:17 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator:     Martin Matuska
>Release:        FreeBSD 8.2-STABLE amd64
>Organization:
VX Solutions s. r. o.
>Environment:
System: FreeBSD neo.vx.sk 8.2-STABLE FreeBSD 8.2-STABLE #0 r219122M: Wed Mar 2 00:08:08 CET 2011 root at neo.vx.sk:/usr/obj/usr/src/sys/NEO amd64
>Description:
Add an option to just build a port with a gcc from ports but not depend on it.
E.g. ports written in C compiled with gcc45 or gcc46 usually do not need linking against libgcc.
>How-To-Repeat:
>Fix:
Index: ports/Mk/bsd.gcc.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.gcc.mk,v
retrieving revision 1.50
diff -u -r1.50 bsd.gcc.mk
--- ports/Mk/bsd.gcc.mk	1 Feb 2011 01:41:19 -0000	1.50
+++ ports/Mk/bsd.gcc.mk	9 Mar 2011 14:08:08 -0000
@@ -106,6 +106,9 @@
 MAKE_ENV+=		F77="${F77}" FC="${FC}" FFLAGS="${FFLAGS}"
 .endif
 
+.if defined(USE_GCC_BUILD) && !defined(USE_GCC)
+USE_GCC=	${USE_GCC_BUILD}
+.endif
 
 .if defined(USE_GCC)
 
@@ -200,7 +203,9 @@
 .if defined(_GCC_BUILD_DEPENDS)
 BUILD_DEPENDS+=	${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS}
 . if ${_USE_GCC} != 3.4
+.  if !defined(USE_GCC_BUILD)
 RUN_DEPENDS+=	${_GCC_PORT_DEPENDS}:${PORTSDIR}/lang/${_GCC_BUILD_DEPENDS}
+.  endif
 .  if ${_USE_GCC} != 4.2
 # Later GCC ports already depend on binutils; make sure whatever we
 # build leverages this as well.
Index: ports/Mk/bsd.port.mk
===================================================================
RCS file: /home/pcvs/ports/Mk/bsd.port.mk,v
retrieving revision 1.674
diff -u -r1.674 bsd.port.mk
--- ports/Mk/bsd.port.mk	7 Mar 2011 07:32:05 -0000	1.674
+++ ports/Mk/bsd.port.mk	9 Mar 2011 14:08:11 -0000
@@ -311,6 +311,8 @@
 #				  the regular expression.
 # USE_GCC		- If set, this port requires this version of gcc, either in
 #				  the system or installed from a port.
+# USE_GCC_BUILD		- If set, this port builds using this version of gcc,
+#				  but adds no runtime dependency.
 # USE_CSTD		- Override the default C language standard (gnu89, gnu99)
 # USE_BINUTILS	- Use binutils suite from port instead of the version in base.
 # USE_GMAKE		- If set, this port uses gmake.
@@ -1744,7 +1746,7 @@
 CONFIGURE_ENV+=	MAKE=${GMAKE}
 .endif
 
-.if defined(USE_GCC) || defined(USE_FORTRAN)
+.if defined(USE_GCC) || defined(USE_GCC_BUILD) || defined(USE_FORTRAN)
 .include "${PORTSDIR}/Mk/bsd.gcc.mk"
 .endif
 
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list