[PATCH] D56215: [lld] [ELF] Include default search paths for NetBSD driver
Kamil Rytarowski via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Jan 3 12:31:53 PST 2019
krytarowski added a comment.
On 03.01.2019 21:19, Joerg Sonnenberger wrote:
> On Thu, Jan 03, 2019 at 06:34:22PM +0000, Kamil Rytarowski via Phabricator via cfe-commits wrote:
>
>> krytarowski added a comment.
>>
>> Actually I find it frustrating and unfair as GNU ld doesn't have builtin
>> knowledge either.. it's passed with gross 'super hack' comments from build scripts... but we are forced to push it to lld in order to move on.
>
> I'm puzzled. Seriously, when was the last time you actually checked how
> much customization contains on a per-OS base in GNU ld? Yes, I'm
> including the various build scripts because GNU ld is generally build by
> a mix of hard-coded logic in the tool itself and various adjustments in
> the linker scripts it is shipped with. But they are all a builtin part
> of GNU ld as far as the end user is concerned. It is pretty much
> irrelevant from a point of functionality where that logic is, but
> skipping is a serious usability issue.
>
> Joerg
I'm referring to code '/usr/src/external/gpl3/binutils/usr.bin/ld/Makefile':
# XXX super hack
. if (${BINUTILS_MACHINE_ARCH} == "x86_64" && \
("${f}" == "elf_i386" || "${f}" == "i386nbsd"))
EMUL_LIB_PATH.${f}=/usr/lib/i386
. elif (${BINUTILS_MACHINE_ARCH} == "sparc64" && \
("${f}" == "elf32_sparc" || "${f}" == "sparcnbsd"))
EMUL_LIB_PATH.${f}=/usr/lib/sparc
. elif !empty(BINUTILS_MACHINE_ARCH:Mmips64*)
. if "${f}" == "elf32ltsmip" || "${f}" == "elf32btsmip"
EMUL_LIB_PATH.${f}:=/usr/lib/o32
. elif "${f}" == "elf64ltsmip" || "${f}" == "elf64btsmip"
EMUL_LIB_PATH.${f}:=/usr/lib/64
. else
EMUL_LIB_PATH.${f}=/usr/lib
. endif
. else
EMUL_LIB_PATH.${f}=/usr/lib
. endif
e${f}.c: ${DIST}/ld/genscripts.sh ${.CURDIR}/Makefile stringify.sed
${_MKTARGET_CREATE}
unset MACHINE || true; \
LIB_PATH=${EMUL_LIB_PATH.${f}} NATIVE=yes \
${HOST_SH} ${DIST}/ld/genscripts.sh ${DIST}/ld \
${LIBDIR} "/usr" "/usr/bin" \
${G_target_alias} ${G_target_alias} ${G_target_alias} \
${G_EMUL} ${LIBDIR} yes ${G_enable_initfini_array} \
${f} "${G_target_alias}"
So we are now trying to put the logic directly into lld.
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56215/new/
https://reviews.llvm.org/D56215
More information about the cfe-commits
mailing list