Date: Tue, 08 May 2018 01:39:25 +0000 From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 227918] [PATCH] remove exists check for CROSS_BINUTILS_PREFIX for external clang builds on secondary arches Message-ID: <bug-227918-227-TwvQMQ9ORX@https.bugs.freebsd.org/bugzilla/> In-Reply-To: <bug-227918-227@https.bugs.freebsd.org/bugzilla/> References: <bug-227918-227@https.bugs.freebsd.org/bugzilla/>
next in thread | previous in thread | raw e-mail | index | archive | help
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227918 --- Comment #5 from Mark Millard <marklmi26-fbsd@yahoo.com> --- (In reply to Kenneth Salerno from comment #0) Quote: therefore requires BFLAGS+=3D -B/usr/local/bin/powerpc64-unknown-freebsd${O= SREL}- set in Makefile.inc1 End quote Why not something based more on something like: (the _altbinutils suffix is explained later) CROSS_TOOLCHAIN=3Dllvm60_altbinutils CROSS_BINUTILS_PREFIX=3D/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 siz= e=20=20=20 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=3D/usr/local/llvm60/bin/ld.lld < CROSS_BINUTILS_PREFIX=3D/var/empty --- > #XLD=3D/usr/local/llvm60/bin/ld.lld > #CROSS_BINUTILS_PREFIX=3D/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+=3D -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.) --=20 You are receiving this mail because: You are the assignee for the bug.=
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-227918-227-TwvQMQ9ORX>