cvs commit: ports/devel/avr-libc Makefile

Kris Kennaway kris at obsecurity.org
Mon May 19 05:12:45 PDT 2003


On Mon, May 19, 2003 at 02:53:40PM +0300, Ruslan Ermilov wrote:

>  # Work around the braind*** introduced by <bsd.cpu.mk> in freebsd-current.
>  MAKE_ENV=	NO_CPU_CFLAGS=true
> +# Prevent bsd.port.mk from setting CFLAGS/CXXFLAGS to unfriendly values.
> +CFLAGS=		-O -pipe
> +CXXFLAGS=	-O -pipe

Hmm.  I see the problem - essentially it boils down to using the host
compiler CFLAGS when running the cross-compiler, and has nothing to do
with bsd.cpu.mk.

Let's suppose for the sake of argument that we lived in joerg's ideal
world where bsd.cpu.mk did not exist.  A user wishing to specify
CPU-specific gcc optimizations for their native binaries would set
CFLAGS="-O -pipe -march=whatever" in /etc/make.conf.  This would then
be picked up by bsd.port.mk and passed into the port build environment
as you demonstrated.  The cross-compiler would then fail in exactly
the same place when it encounters the invalid -march.

The bug here appears to be that the cross-gcc binary is using the host
gcc CFLAGS entry in the first place, instead of a default, safe CFLAGS
(like "-O -pipe").

Kris
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-all/attachments/20030519/327b880d/attachment.bin


More information about the cvs-all mailing list