tech-toolchain archive

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

netbsd-8 build failing with newer clang



newer clang defaults to c++11, newer clang++ makes
-Wreserved-user-defined-literal fatal by default.
For when people inevitably complain about it here, the diff to netbsd-8
to fix it is probably something like this (or maybe use older C++)

Index: Makefile.gnuhost
===================================================================
RCS file: /cvsroot/src/tools/Makefile.gnuhost,v
retrieving revision 1.44.8.2
diff -u -r1.44.8.2 Makefile.gnuhost
--- Makefile.gnuhost	18 Apr 2018 14:01:16 -0000	1.44.8.2
+++ Makefile.gnuhost	21 Oct 2018 21:43:44 -0000
@@ -19,8 +19,10 @@
 
 # Disable use of pre-compiled headers on Darwin.
 BUILD_OSTYPE!= uname -s
-.if ${BUILD_OSTYPE} == "Darwin"
+HOST_COMPILER_CLANG != if ${HOST_CC} --version | grep -q -s clang; then echo yes; else echo no; fi
+.if ${HOST_COMPILER_CLANG} == "yes"
 HOST_CFLAGS+=-O2 -no-cpp-precomp
+HOST_CXXFLAGS+=-Wno-error=reserved-user-defined-literal
 .endif
 
 MAKE_PROGRAM?=	${MAKE}



Home | Main Index | Thread Index | Old Index