Hello,
I'm following this guide to update FreeBSD 14.0-STABLE and I keep getting this:
Threads I read and didn't help solve this issue (I'm not trying to use GCC and I'd like to stay with LLVM/clang if possible):
https://forums.freebsd.org/threads/trying-to-build-a-linux-c-program-on-freebsd-14-with-gcc9.92731/
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251170
I'm following this guide to update FreeBSD 14.0-STABLE and I keep getting this:
Code:
===> usr.sbin/config (obj,all,install)
[Creating objdir /usr/obj/usr/src/amd64.amd64/tmp/obj-tools/usr.sbin/config...]
yacc -d /usr/src/usr.sbin/config/config.y
yacc: 3 rules never reduced
cp y.tab.c config.c
lex -olang.c /usr/src/usr.sbin/config/lang.l
file2c 'char kernconfstr[] = {' ',0};' < /usr/src/usr.sbin/config/kernconf.tmpl > kernconf.c
echo config.full: /usr/lib/libc.a /usr/obj/usr/src/amd64.amd64/tmp/legacy/usr/lib/libegacy.a >> .depend
echo config.full: /usr/lib/libc++.a >> .depend
/usr/local/bin/ccache clang -O2 -pipe -O -O2 -pipe -march=skylake -fno-common -I. -I/usr/src/usr.sbin/config -g -gz=zlib -MD -MF.depend.config.o -MTconfig.o -std=gnu99 -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k >
/usr/local/bin/ccache clang++ -O2 -pipe -O -O2 -pipe -march=skylake -fno-common -I. -I/usr/src/usr.sbin/config -g -gz=zlib -MD -MF.depend.main.o -MTmain.o -Wno-format-zero-length -Wsystem-headers -Wall -Wno-format-y2k -W -Wno-unused->
error: invalid argument '-std=gnu99' not allowed with 'C++'
*** Error code 1
Stop.
make[3]: stopped in /usr/src/usr.sbin/config
*** Error code 1
Stop.
make[2]: stopped in /usr/src
8.11 real 4.98 user 2.96 sys
*** Error code 1
Stop.
make[1]: stopped in /usr/src
*** Error code 1
Stop.
make: stopped in /usr/src
Code:
$ uname -a
FreeBSD redbox 14.0-STABLE FreeBSD 14.0-STABLE GENERIC amd64
Code:
# cat /etc/make.conf
CPUTYPE=skylake
CFLAGS+= -O -O2 -pipe -march=${CPUTYPE}
CXXFLAGS+=${CFLAGS}
MACHINE_CPU+= avx2 avx sse42 sse41 ssse3 sse3 sse2 sse amd64 f16c mmx
MAKE_JOBS_NUMBER= 16
OPTIONS_UNSET+= QT5 QT6 CUPS VESA SCFB TWM XCONSOLE XCLOCK GNOME KDE EXAMPLES \
DEBUG ASPELL
CC=clang
CXX=clang++
CPP=clang-cpp
# To compile just the kernel with special optimizations, you should use
# this instead of CFLAGS (which is not applicable to kernel builds anyway).
# There is very little to gain by using higher optimization levels, and doing
# so can cause problems.
#
COPTFLAGS= -O -2 -pipe <<<<< do I need this? the statement above is a bit confusing!
NO_SENDMAIL=true
Code:
# cat /etc/src.conf
WITH_CCACHE_BUILD=yes
WITHOUT_SENDMAIL=yes
WITHOUT_TALK=yes
WITHOUT_TELNET=yes
WITHOUT_TFTP=yes
WITHOUT_IPFILTER=yes
WITHOUT_FLOPPY=yes
WITHOUT_GAMES=yes
Threads I read and didn't help solve this issue (I'm not trying to use GCC and I'd like to stay with LLVM/clang if possible):
https://forums.freebsd.org/threads/trying-to-build-a-linux-c-program-on-freebsd-14-with-gcc9.92731/
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=251170