Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 11 Jul 2016 12:18:51 -0500
From:      Dmitri Goutnik <dg@syrec.org>
To:        freebsd-ports@freebsd.org
Subject:   CPUTYPE translation confuses gcc48 on 11.0-BETA1
Message-ID:  <CA%2BoHHn2rvgPwByTeBntxPKWXK%2B57OoqmZX-nwvue5pm_mf2kvA@mail.gmail.com>

next in thread | raw e-mail | index | archive | help
CPUTYPE translation performed by /usr/share/mk/bsd.cpu.mk seems to confuse
gcc48 and as a consequence, all ports that use gcc48 (including lang/gcc
itself) fail on configure stage.

uname -a:

FreeBSD xombo.syrec.org 11.0-BETA1 FreeBSD 11.0-BETA1 #0 r302526: Sun Jul
10 16:12:30 ECT 2016     root@xombo.syrec.org:/usr/obj/usr/src/sys/XOMBO
 amd64

/etc/make.conf:

...
CPUTYPE?=       core-avx2
...

One example of failing port is audio/soundtouch:

...
checking whether the C++ compiler works... no
configure: error: in `/usr/ports/audio/soundtouch/work/soundtouch':
configure: error: C++ compiler cannot create executables
See `config.log' for more details

config.log shows that "core-avx2" was converted to "haswell" (by bsd.cpu.mk
):

configure:3277: g++48 -O2 -pipe -march=haswell -fstack-protector
-Wl,-rpath=/usr/local/lib/gcc48 -fno-strict-aliasing
 -Wl,-rpath=/usr/local/lib/gcc48   -fstack-protector
-Wl,-rpath=/usr/local/lib/gcc48 -L/usr/local/lib/gcc48 conftest.cpp  >&5
conftest.cpp:1:0: error: bad value (haswell) for -march= switch

... which is an unknown arch to gcc48:
https://gcc.gnu.org/onlinedocs/gcc-4.8.5/gcc/i386-and-x86-64-Options.html

Adding NO_CPU_CFLAGS=yes to /etc/make.conf fixes the above, but it looks
like a bug to me. Am I missing something here?

Regards,
Dmitri



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CA%2BoHHn2rvgPwByTeBntxPKWXK%2B57OoqmZX-nwvue5pm_mf2kvA>