Problem with mingw port, obeys $(CPUTYPE) but shouldn't

Kris Kennaway kris at obsecurity.org
Thu Jun 30 21:49:46 GMT 2005


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.
> 
> I have
>   CPUTYPE=pentium-m
> in my /etc/make.conf
> 
> and I get
> 
> /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/local/i386-mingw32msvc/bin/ -I/usr/local/i386-mingw32msvc/include -DCROSS_COMPILE -DIN_GCC     -O2 -fno-strict-aliasing -pipe -march=pentium-m -I./include    -DCYGWIN_CROSS_DIR=\"/usr/local/i386-mingw32msvc\" -I. -I. -I./config -I./../include \
>   -aux-info SYSCALLS.c.X -S -o tmp-SYSCALLS.s SYSCALLS.c
> cc1: bad value (pentium-m) for -march= switch
> gmake[1]: *** [SYSCALLS.c.X] Error 1
> gmake[1]: Leaving directory `/mnt/part2/usr/ports/devel/mingw-gcc/work/gcc-2.95.3-20010828/gcc'
> gmake: *** [all-gcc] Error 2
> 
> 
> I think ports like this which use older gcc versions need to kill the
> additional CFLAGS from the CPUTYPE definition.
> 
> Commenting out CPUTYPE from /etc/make.conf makes the build work.
> 
> 
> 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
-------------- 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/freebsd-ports/attachments/20050630/e2395cd8/attachment.bin


More information about the freebsd-ports mailing list