ports/132432: [patch] devel/apr: add CC and CFLAGS to CONFIGURE_ENV

Anonymous swell.k at gmail.com
Sun Mar 8 20:20:03 UTC 2009


>Number:         132432
>Category:       ports
>Synopsis:       [patch] devel/apr: add CC and CFLAGS to CONFIGURE_ENV
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Mar 08 20:20:02 UTC 2009
>Closed-Date:
>Last-Modified:
>Originator:     Anonymous
>Release:        FreeBSD 8.0-CURRENT amd64
>Organization:
>Environment:
>Description:
The port *silently* overrides CC and CFLAGS unless set from environment or cmdline.
>How-To-Repeat:
Add CC=gcc44 and CFLAGS=-O0 to make.conf and build the port.

%%%
$ printf 'CC=gcc44\nCFLAGS=-O0\n' >/etc/make.conf
$ cd devel/apr; make
..
/bin/sh /usr/ports/devel/apr/work/apr-1.3.3/libtool --silent --mode=compile gcc -g -O2   -DHAVE_CONFIG_H    -I./include -I/usr/ports/devel/apr/work/apr-1.3.3/include/arch/unix -I./include/arch/unix -I/usr/ports/devel/apr/work/apr-1.3.3/include/arch/unix -I/usr/ports/devel/apr/work/apr-1.3.3/include  -o passwd/apr_getpass.lo -c passwd/apr_getpass.c && touch passwd/apr_getpass.lo
^C
$ make -V CC -V CFLAGS
gcc44
-O0
%%%

Same with default CC=cc and CFLAGS='-O2 -pipe -fno-strict-aliasing'.

These are known to work:
$ env CC=gcc44 CFLAGS=-O0 make
$ make CC=gcc44 CFLAGS=-O0

>Fix:


Patch attached with submission follows:

Index: devel/apr/Makefile
===================================================================
RCS file: /home/csup/ports/devel/apr/Makefile,v
retrieving revision 1.77
diff -u -p -r1.77 Makefile
--- devel/apr/Makefile	18 Jan 2009 19:43:53 -0000	1.77
+++ devel/apr/Makefile	8 Mar 2009 19:46:54 -0000
@@ -43,6 +43,7 @@ APU_WRKDIR=	${WRKDIR}/apr-util-${APU_VER
 PLIST_SUB=	SHLIB_MAJOR="${SHLIB_MAJOR}"
 SHLIB_MAJOR=	3
 
+CONFIGURE_ENV=	CC="${CC}" CXX="${CXX}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}"
 APR_CONF_ARGS=	
 APU_CONF_ARGS=	--with-apr=${APR_WRKDIR} \
 			--with-expat=${LOCALBASE} \


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list