2017-05-29 20:26 GMT+03:00 Vadim Zhukov <persg...@gmail.com>: > The clang and gcc behave differently regarding executing tools. > While gcc simply runs what he said to, clang tries to be clever > and always find absolute path for a tool, refusing start otherwise. > > The actual problem is starting a linker: ports infrastructure > expects tools are called by name, not by path, and thus could be > overriden via stuff in ${WRKDIR}/bin. This functionality is used, > e.g., to implement USE_WXNEEDED port option. > > But clang calls "/usr/bin/ld", not "ld", and thus ${WRKDIR}/bin/ld > misses a chance to do its magic, and binaries are built without > OPENBSD_WXNEEDED, and some ports blow up (when compiled using clang). > > The patch below is enough to make clang accept and use non-absolute > tool file names and make lang/mono and lang/libv8 happy (more likely > to follow, there is much work to be done). > > So I'm asking compiler gurus and base maintainers, if a patch like > that would be acceptable? And if yes, how do you want it look like > to make supporting it easier? > > Thank you in advance.
P.S.: The Program.inc file is not picked up as dependency, so you'll need to touch gnu/llvm/lib/Support/Program.cpp manually before building clang. -- WBR, Vadim Zhukov