Date: Fri, 19 Jan 1996 10:23:19 +0100 From: schweikh@ito.uni-stuttgart.de To: FreeBSD-gnats-submit@freebsd.org Subject: ports/955: CFLAGS are not honored by the ports system Message-ID: <9601190923.AA14746@itosun.ito.uni-stuttgart.de> Resent-Message-ID: <199601190930.BAA02047@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 955
>Category: ports
>Synopsis: make CFLAGS=whatever for a port will not be honored
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: freebsd-bugs
>State: open
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Fri Jan 19 01:30:03 PST 1996
>Last-Modified:
>Originator: Jens Schweikhardt
>Organization:
uni-stuttgart
>Release: FreeBSD 2.1-STABLE i386
>Environment:
>Description:
When compiling the ports for tcl, tk and expect, I do a
make CFLAGS="-m486 -O2 -fno-strength-reduce"
but when the actual do-build target is made, only PREFIX and
X11BASE are passed as make variables. I am missing CFLAGS.
Same behaviour of course, when the CFLAGS line in /etc/make.conf
is uncommented.
>How-To-Repeat:
compile the tcl port by issuing
make CFLAGS="-m486 -O2 -fno-strength-reduce"
It will compile with CFLAGS="-O -g" or whatever the
defaults of tcl's makefile are.
>Fix:
This fix is a quick shot that solves my problem. It simply
adds CFLAGS to the list of variables already passed to the
actual make that does the build. I can spot a possible
problem, however: If CFLAGS is NOT specified on the
commandline or in /etc/make.conf, this may approach may
pass an empty CFLAGS to the build which is different from
using the defaults. A better fix would only pass CFLAGS
when it is not empty.
Unified diff for /usr/share/mk/bsd.port.mk:
--- bsd.port.mk Wed Jan 17 19:32:21 1996
+++ bsd.port.mk-orig Wed Jan 17 18:45:44 1996
@@ -612,9 +612,9 @@
.if !target(do-build)
do-build:
.if defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${GMAKE} CFLAGS="${CFLAGS}" PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
+ @(cd ${WRKSRC}; ${GMAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
.else defined(USE_GMAKE)
- @(cd ${WRKSRC}; ${MAKE} CFLAGS="${CFLAGS}" PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
+ @(cd ${WRKSRC}; ${MAKE} PREFIX=${PREFIX} X11BASE=${X11BASE} ${MAKE_FLAGS} ${MAKEFILE} ${ALL_TARGET})
.endif
.endif
>Audit-Trail:
>Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?9601190923.AA14746>
