Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 30 Jun 2005 17:49:43 -0400
From:      Kris Kennaway <kris@obsecurity.org>
To:        Martin Cracauer <cracauer@cons.org>
Cc:        ports@freebsd.org
Subject:   Re: Problem with mingw port, obeys $(CPUTYPE) but shouldn't
Message-ID:  <20050630214943.GA45010@xor.obsecurity.org>
In-Reply-To: <20050630174246.A73270@cons.org>
References:  <20050630174246.A73270@cons.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--J2SCkAp4GZ/dPZZf
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Thu, Jun 30, 2005 at 05:42:46PM -0400, Martin Cracauer wrote:
> The mingw port seems to inherit CPU-specific settings from
> /etc/make.conf which it shouldn't.  It uses an older version of gcc
> which is bound not to understand the fancy tuning from the CPU type.
>=20
> I have
>   CPUTYPE=3Dpentium-m
> in my /etc/make.conf
>=20
> and I get
>=20
> /mnt/part2/usr/ports/devel/mingw-gcc/work/gcc-2.95.3-20010828/gcc/xgcc -B=
/mnt/part2/usr/ports/devel/mingw-gcc/work/gcc-2.95.3-20010828/gcc/ -B/usr/l=
ocal/i386-mingw32msvc/bin/ -I/usr/local/i386-mingw32msvc/include -DCROSS_CO=
MPILE -DIN_GCC     -O2 -fno-strict-aliasing -pipe -march=3Dpentium-m -I./in=
clude    -DCYGWIN_CROSS_DIR=3D\"/usr/local/i386-mingw32msvc\" -I. -I. -I./c=
onfig -I./../include \
>   -aux-info SYSCALLS.c.X -S -o tmp-SYSCALLS.s SYSCALLS.c
> cc1: bad value (pentium-m) for -march=3D switch
> gmake[1]: *** [SYSCALLS.c.X] Error 1
> gmake[1]: Leaving directory `/mnt/part2/usr/ports/devel/mingw-gcc/work/gc=
c-2.95.3-20010828/gcc'
> gmake: *** [all-gcc] Error 2
>=20
>=20
> I think ports like this which use older gcc versions need to kill the
> additional CFLAGS from the CPUTYPE definition.
>=20
> Commenting out CPUTYPE from /etc/make.conf makes the build work.
>=20
>=20
> There is an option NO_CPU_CFLAGS in bsd.cpu.mk which is exactly what
> we want.  But since bsd.cpu.mk is invoked before the port's Makefile
> is parsed we cannot flip this switch on.  Afterwards it is too late
> since $(CFLAGS) has already been "infected" and you can't tell
> CPU-specific settings from other settings in that one variable.

There's a bsd.port.mk option (WITHOUT_CPU_CFLAGS or something) that
sanitizes the CFLAGS to prevent old compiler ports from breaking in
this way.

Kris

--J2SCkAp4GZ/dPZZf
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.1 (FreeBSD)

iD8DBQFCxGj3Wry0BWjoQKURAqpiAJ9yyMTKG4OYUYAX5Z3OoINxPYzwMACfSB9S
Jamob6N4gxl2FHJuyA800Vg=
=rY8d
-----END PGP SIGNATURE-----

--J2SCkAp4GZ/dPZZf--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050630214943.GA45010>