Date: Sat, 05 May 2018 11:20:06 +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-U6LVavn72y@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=227918 --- Comment #3 from Kenneth Salerno <kennethsalerno@yahoo.com> --- (In reply to Bryan Drewery from comment #2) Hello, devel/xtoolchain-llvm* is just a no-build external compiler definition setting XCC variables etc., not an external /cross-compiler/ being built specifically for a single target arch like for example devel/powerpc64-gcc is. xtoolchain-llvm60 is therefore equivalent to what I am doing already in make.conf: MYLLVMSUFFIX = 60 _OSRELEASE != uname -r OSREL = ${_OSRELEASE:C/-.*//} XCC = /usr/local/bin/clang${MYLLVMSUFFIX} XCXX = /usr/local/bin/clang++${MYLLVMSUFFIX} XCPP = /usr/local/bin/clang-cpp${MYLLVMSUFFIX} CROSS_BINUTILS_PREFIX = /usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XCFLAGS += -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XCXXFLAGS += -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XLDFLAGS += -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- NO_WERROR = WERROR = WITHOUT_GCC = yes WITHOUT_GCC_BOOTSTRAP = yes WITHOUT_GNUCXX = yes WITH_CLANG = yes WITH_CLANG_BOOTSTRAP = yes WITH_CLANG_FULL = yes WITH_CLANG_IS_CC = yes WITH_LLD = yes So the problem with all of this is when you use llvm to cross-compile (e.g. amd64 build host -> ppc64 target), and you don't specify -B, it will try to use /usr/bin/ld which will default to the host machine arch. To force the correct arch I am using powerpc64-binutils, which has a funky prefix (/usr/local/bin/powerpc64-unknown-freebsd11.1- that breaks this directly exists check in Makefile.inc1 that will always fail and not automatically add the correct -B from my CROSS_BINUTILS_PREFIX. -- 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-U6LVavn72y>
