From: espie Date: Sun, 4 Jun 2017 12:25:19 +0000 (+0000) Subject: pass better arguments to mkdep. X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=9306cdbfdcc90fc60260b9a10d9362f86156f6fe;p=openbsd pass better arguments to mkdep. - some std= parameters are actually critical, -std=c++11 makes a huge difference for clang. - explicitly ask mkdep to run the C++ compiler for C++ code, as again, some compilers will see the difference. (this should allow us to repair make depend under src/gnu/usr.bin/clang) okay kettenis@ --- diff --git a/share/mk/bsd.dep.mk b/share/mk/bsd.dep.mk index e693dcf5e7d..3e7fb6cb238 100644 --- a/share/mk/bsd.dep.mk +++ b/share/mk/bsd.dep.mk @@ -1,4 +1,4 @@ -# $OpenBSD: bsd.dep.mk,v 1.13 2017/05/31 07:48:04 anton Exp $ +# $OpenBSD: bsd.dep.mk,v 1.14 2017/06/04 12:25:19 espie Exp $ # $NetBSD: bsd.dep.mk,v 1.12 1995/09/27 01:15:09 christos Exp $ # some of the rules involve .h sources, so remove them from mkdep line @@ -12,19 +12,19 @@ realdepend: _SUBDIRUSE @rm -f .depend @files="${.ALLSRC:M*.s} ${.ALLSRC:M*.S}"; \ if [ "$$files" != " " ]; then \ - echo mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files;\ - mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ + echo mkdep -a ${MKDEP} ${CFLAGS:M-std=*} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files;\ + mkdep -a ${MKDEP} ${CFLAGS:M-std=*} ${CFLAGS:M-[ID]*} ${CPPFLAGS} ${AINC} $$files; \ fi @files="${.ALLSRC:M*.c}"; \ if [ "$$files" != "" ]; then \ - echo mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ + echo mkdep -a ${MKDEP} ${CFLAGS:M-std=*} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ mkdep -a ${MKDEP} ${CFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ fi @files="${.ALLSRC:M*.cc} ${.ALLSRC:M*.C} ${.ALLSRC:M*.cpp}"; \ files="$$files ${.ALLSRC:M*.cxx}"; \ if [ "$$files" != " " ]; then \ - echo mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ - mkdep -a ${MKDEP} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ + echo CC=${CXX:Q} mkdep -a ${MKDEP} ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ + CC=${CXX:Q} mkdep -a ${MKDEP} ${CXXFLAGS:M-std=*} ${CXXFLAGS:M-[ID]*} ${CPPFLAGS} $$files; \ fi . else .depend: