[Bug 229626] Mk/Uses/compiler.mk has spurious complaints for some ports on gcc-based archs
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Mon Jul 9 04:57:34 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=229626
Bug ID: 229626
Summary: Mk/Uses/compiler.mk has spurious complaints for some
ports on gcc-based archs
Product: Ports & Packages
Version: Latest
Hardware: Any
OS: Any
Status: New
Severity: Affects Some People
Priority: ---
Component: Ports Framework
Assignee: portmgr at FreeBSD.org
Reporter: linimon at FreeBSD.org
CC: ports-bugs at FreeBSD.org
Some ports have adopted the following pattern to work around dependency issues:
BUILD_DEPENDS+= clang40:devel/llvm40
CC= clang40
CXX= clang++40
However, on archs where clang is not the default compiler, this creates
complaints for any bulk build:
/bin/sh: clang40: not found
make[2]: "/usr/ports/Mk/Uses/compiler.mk" line 78: warning: "clang40
--version" returned non-zero status
make[2]: "/usr/ports/Mk/Uses/compiler.mk" line 133: warning: "clang++40 -###
/dev/null 2>&1" returned non-zero status
See sysutils/osquery for an example of "clang40". This pattern is also seen
for instances of "clang50" and "clang60", but the symptoms are the same.
The logic in compiler.mk is hard for me to follow, but here are the offending
lines:
_CCVERSION!= ${CC} --version
_CXXINTERNAL!= ${CXX} -\#\#\# /dev/null 2>&1
These lines were introduced in the initial commit of compiler.mk.
I don't know what the proper fix is, but my guess is that the two lines above
were written assuming that CC/CXX were whatever is in the base system. So,
either those two lines should be fixed, or compiler.mk refactored to take some
kind of parameter to say "assign BUILD_DEPENDS/CPP/CC/CXX/ in the following
fashion" and use that to trigger a code block exactly like e.g. lines 186, 208,
230, 252, and 274.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the freebsd-ports-bugs
mailing list