On Thu, Jun 07, 2018 at 10:07:27AM +0200, Kamil Rytarowski wrote: > On 07.06.2018 00:03, Joerg Sonnenberger wrote: > > On Wed, Jun 06, 2018 at 02:18:39PM +0000, Kamil Rytarowski wrote: > >> Module Name: src > >> Committed By: kamil > >> Date: Wed Jun 6 14:18:39 UTC 2018 > >> > >> Modified Files: > >> src/external/cddl/osnet/lib/libdtrace: Makefile > >> > >> Log Message: > >> Make cddl/osnet/lib/libdtrace buildable with MKLLVM=yes > > > > This is not the correct way to fix this. First of all, the flags are > > conditional even for GCC, but more importantly, HAVE_GCC does not mean > > that the compiler is GCC. See i.e. ah_regdomain.c handling in sys/conf. > > > > Joerg > > > > Do you mean to change the switch to: ${ACTIVE_CC} == "clang"? > > I've followed the approach in share/mk/bsd.sys.mk: > > .if (defined(HAVE_GCC) \ > && (${MACHINE_ARCH} == "coldfire" || \ > ${MACHINE_CPU} == "sh3" || \ > ${MACHINE_CPU} == "m68k")) > # XXX GCC 4.5 for sh3 and m68k (which we compile with -Os) is extra > noisy for > # cases it should be better with > CFLAGS+= -Wno-uninitialized > CFLAGS+= -Wno-maybe-uninitialized > .endif > > And this works.
It only works because those architectures are (currently) GCC only. Joerg