I set CPUTYPE=corei7 in /etc/make.conf, and the value is converted to -march=nehalem by Makefiles installed on FreeBSD 11.0-RELEASE. CentOS 6 uses gcc 4.4 and CentOS 7 uses gcc 4.8, but this option is only supported on gcc >= 4.9, which can cause build failure for audio/linux-skype_oss_wrapper. This problem also happens in native FreeBSD gcc (gcc 4.8) and a bug (bug 214173) is already filed for the native port. ===> Building for linux-skype_oss_wrapper-0.1.1 /compat/linux/usr/bin/gcc -O2 -pipe -march=corei7 -fstack-protector -fno-strict-aliasing -m32 -fPIC -c libpulse.c -o libpulse.o libpulse.c:1: error: bad value (corei7) for -march= switch libpulse.c:1: error: bad value (corei7) for -mtune= switch *** Error code 1
Reassign; this is a toolchain issue.
Is this still relevant?
(In reply to w.schwarzenfeld from comment #2) Yes, it is easy to reproduce the problem. # make __MAKE_CONF=/dev/null CPUTYPE=corei7 BATCH=1 ===> License BSD3CLAUSE accepted by the user ===> linux-skype_oss_wrapper-0.1.1 depends on file: /usr/local/sbin/pkg - found ===> Fetching all distfiles required by linux-skype_oss_wrapper-0.1.1 for building ===> Extracting for linux-skype_oss_wrapper-0.1.1 => SHA256 Checksum OK for s3erios-skype_oss_wrapper-v0.1.1_GH0.tar.gz. ===> Patching for linux-skype_oss_wrapper-0.1.1 ===> linux-skype_oss_wrapper-0.1.1 depends on package: linux-c6-devtools>0 - found ===> Configuring for linux-skype_oss_wrapper-0.1.1 ===> Building for linux-skype_oss_wrapper-0.1.1 --- skype_oss --- --- libpulse.o --- --- skype_oss --- echo "#!/bin/sh" > skype_oss && echo "LD_LIBRARY_PATH=/compat/linux/lib/skype_oss_wrapper:\$LD_LIBRARY_PATH skype" >> skype_oss && chmod +x skype_oss --- libpulse.o --- /compat/linux/usr/bin/gcc -O2 -pipe -march=corei7 -fstack-protector -fno-strict-aliasing -m32 -fPIC -c libpulse.c -o libpulse.o libpulse.c:1: error: bad value (corei7) for -march= switch libpulse.c:1: error: bad value (corei7) for -mtune= switch *** [libpulse.o] Error code 1 make[1]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1 1 error make[1]: stopped in /usr/ports/audio/linux-skype_oss_wrapper/work/skype_oss_wrapper-0.1.1 ===> Compilation failed unexpectedly. Try to set MAKE_JOBS_UNSAFE=yes and rebuild before reporting the failure to the maintainer. *** Error code 1 Stop. make: stopped in /usr/ports/audio/linux-skype_oss_wrapper
There's not much we can do about this. We could completely disable CPUTYPE in this port, but that seems wrong. I suggest you add something like this to your /etc/make.conf instead. .if ${.CURDIR:M/usr/ports/audio/linux-skype_oss_wrapper*} CPUTYPE=somethingthatdoeswork .endif Or maybe use .if ${CC:M/compat/linux/*}
*** Bug 214513 has been marked as a duplicate of this bug. ***
Yes, I already have similar things in /etc/make.conf: CPUTYPE= corei7 .if ${.CURDIR:M*/*/linux-*} CPUTYPE= .endif .if ${.CURDIR:M*/lang/gcc48*} CPUTYPE= CFLAGS+= -march=corei7 .endif I opened this bug because it looks like a workaround. If we are not going to fix it, I think this bug can be closed.
I'll leave it open for now. Support to build Linux packages could be added somewhere under Mk/ and then correcting of CPUTYPE could be part of that as well.
Port removed in ports r500506.