share/mk/bsd.cpu.mk disables lang/gcc48 build with CPUTYPE
Harry Schmalzbauer
freebsd at omnilan.de
Sat Dec 10 17:20:32 UTC 2016
Hello,
I'm unsure if I'd better file a bug report, but I'm also unsure if it's
ports or base…
When one defines CPUTYPE in make.conf(5), share/mk/bsd.cpu.mk translates
'core-avx-i' into 'ivybridge' e.g.
This breaks building e.g. ports/lang/gcc48:
configure:3374:
/usr/local/ports-wrktree/lang/gcc48/work/.build/./gcc/xgcc
-B/usr/local/ports-wrktree/lang/gcc48/work/.build/./gcc/
-B/usr/local/x86_64-portbld-f
reebsd11.0/bin/ -B/usr/local/x86_64-portbld-freebsd11.0/lib/ -isystem
/usr/local/x86_64-portbld-freebsd11.0/include -isystem
/usr/local/x86_64-portbld-freebsd11.
0/sys-include -o conftest -g -O2 -pipe -march=ivybridge -DLIBICONV_PLUG
-fno-strict-aliasing conftest.c >&5
conftest.c:1:0: error: bad value (ivybridge) for -march= switch
Translating reverse would require a second point of maintenance.
So it was better to have the translation beeing contitional.
But I'm not really familar with the share/mk make conventions.
So I can just provide one quick workarround (in case anyone searched for
a momentary solution to the build problem, see the attached patch).
This workarround changes the following:
· In /usr/share/mk/bsd.cpu.mk do _CPUFLAGS assignings _before_ alias
settings.
· Instead of usual variable expansion, use := to immediately set the
value, before aliasing "does the wrong thing"…
Note that the patch attached isn't verified for anything but amd64 and
core-avx-i vs. ivybridge (in /etc/make.conf CPUTYPE) and not suitable
for general usage, just if you want to get binaries of lang/gcc48 using
today's 11-stable with CPUTYPE.
Best,
-harry
-------------- next part --------------
A non-text attachment was scrubbed...
Name: usr_share_mk_bsd.cpu.mk.patch
Type: text/x-patch
Size: 3838 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-stable/attachments/20161210/a5fa5a20/attachment.bin>
More information about the freebsd-stable
mailing list