[Bug 227918] [PATCH] remove exists check for CROSS_BINUTILS_PREFIX for external clang builds on secondary arches
bugzilla-noreply at freebsd.org
bugzilla-noreply at freebsd.org
Tue May 8 01:39:28 UTC 2018
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=227918
--- Comment #5 from Mark Millard <marklmi26-fbsd at yahoo.com> ---
(In reply to Kenneth Salerno from comment #0)
Quote:
therefore requires BFLAGS+= -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}-
set in Makefile.inc1
End quote
Why not something based more on something like:
(the _altbinutils suffix is explained later)
CROSS_TOOLCHAIN=llvm60_altbinutils
CROSS_BINUTILS_PREFIX=/usr/local/powerpc64-unknown-freebsd${OSREL}/bin
# ls /usr/local/powerpc64-unknown-freebsd12.0/bin/
ar as ld ld.bfd nm objcopy objdump ranlib readelf size
strip
(So strings is missing and would need, say,
/usr/local/bin/powerpc64-unknown-freebsd${OSREL}-strings via, say, XSTRINGS.)
Of course there are lines in /usr/local/share/toolchains/llvm60.mk
that are a problem and need an alternative to avoid use of lld and
such:
# diff /usr/local/share/toolchains/llvm60.mk
/usr/local/share/toolchains/llvm60_altbinutils.mk
4,5c4,5
< XLD=/usr/local/llvm60/bin/ld.lld
< CROSS_BINUTILS_PREFIX=/var/empty
---
> #XLD=/usr/local/llvm60/bin/ld.lld
> #CROSS_BINUTILS_PREFIX=/var/empty
I'll note that /usr/src/Makefile.inc1 already has logic for -B that
applies absent those when CROSS_BINUTILS_PREFIX is defined and
exists:
.if defined(CROSS_BINUTILS_PREFIX) && exists(${CROSS_BINUTILS_PREFIX})
# In the case of xdev-build tools, CROSS_BINUTILS_PREFIX won't be a
# directory, but the compiler will look in the right place for its
# tools so we don't need to tell it where to look.
BFLAGS+= -B${CROSS_BINUTILS_PREFIX}
.endif
(I've got such a cross-build in process to test. I've done this
before but its been a while.)
--
You are receiving this mail because:
You are the assignee for the bug.
More information about the freebsd-bugs
mailing list