[Bug 280482] Buildworld fails with error: invalid argument '-std=gnu99' not allowed with 'C++'
Date: Mon, 29 Jul 2024 22:01:47 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=280482 Brooks Davis <brooks@FreeBSD.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|New |Closed CC| |brooks@FreeBSD.org Resolution|--- |Not A Bug --- Comment #1 from Brooks Davis <brooks@FreeBSD.org> --- This line is almost certainly your issue: CXXFLAGS+=${CFLAGS} This adds the entire contents of CFLAGS at the time the CXXFLAGS variable is expanded to the end of the current value of CXXFLAGS. That means it's adding -std=gnu99 to CXXFLAGS. If you want to have one place to set these (mostly pointless) flags, then you need to do something like: MY_CUSTOM_CFLAGS= -march=${CPUTYPE} CFLAGS+=${MY_CUSTOM_CFLAGS} CXXFLAGS+=${MY_CUSTOM_CFLAGS} -- You are receiving this mail because: You are the assignee for the bug.