LDFLAGS mystery
Stephen Montgomery-Smith
stephen at missouri.edu
Sun Jan 22 03:09:51 UTC 2012
On 01/21/2012 03:02 PM, Stephen Montgomery-Smith wrote:
> If I build a port that uses "USE_FORTRAN", then the variable ${LDFLAGS}
> has an extra space in it. For example
>
> %cd /usr/ports/math/lapack
> %make -V LDFLAGS
> -Wl,-rpath=/usr/local/lib/gcc46
>
> %make -V MAKE_ENV
> .... LDFLAGS=" -Wl,-rpath=/usr/local/lib/gcc46" ...
>
> I am trying to create a port in which this creates problems.
>
> Where does the extra space at the beginning come from, and how do I get
> rid of it?
I solved the mystery. Inside /usr/share/mk/sys.mk is the line:
LDFLAGS ?=
I think that it is a bug in "make" that
XXX=
XXX+=xxx
results in XXX having the value " xxx".
More information about the freebsd-ports
mailing list