tech-toolchain archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

LLVM build warnings

[I'm not subscribed to this list, so if you want to answer, make sure to CC me]

When testing CFLAGS with LLVM, I often hit warnings like this one:

	--- libkern.o ---
	building standard kern library
	aarch64--netbsd-clang: error: argument unused during compilation: 'XXX' [-Werror,-Wunused-command-line-argument]

This is annoying, and each time I have to apply this change to make it compile:

	--- share/mk/
	+++ share/mk/
	@@ -568,7 +568,7 @@ __archivesymlinkpic: .USE
	 __buildstdlib: .USE
		@echo building standard ${.TARGET:T:S/.o//:S/lib//} library
		@rm -f ${.TARGET}
	-       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
	+       @${LINK.c:S/-nostdinc//} -nostdlib ${LDFLAGS} -Wno-unused-command-line-argument -r -o ${.TARGET} `NM=${NM} ${LORDER} ${.ALLSRC:M*o} | ${TSORT}`
	 .if !target(__buildproflib)

There is already the "S/-nostdinc//" that drops one CFLAG to avoid the warning
with it, but the number of CFLAGS to list there can quickly grow, and I think
that it is better to disable the warning completely.

I'll commit that soon, feel free to improve afterwards if you have better


Home | Main Index | Thread Index | Old Index