From owner-freebsd-bugs@freebsd.org Sat May 5 11:20:10 2018 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 91265FAAA24 for ; Sat, 5 May 2018 11:20:09 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id DA0C287FC7 for ; Sat, 5 May 2018 11:20:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: by mailman.ysv.freebsd.org (Postfix) id 97503FAAA23; Sat, 5 May 2018 11:20:08 +0000 (UTC) Delivered-To: bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 70403FAAA22 for ; Sat, 5 May 2018 11:20:08 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.ysv.freebsd.org (mxrelay.ysv.freebsd.org [IPv6:2001:1900:2254:206a::19:3]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mxrelay.ysv.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E054E87FBE for ; Sat, 5 May 2018 11:20:07 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mxrelay.ysv.freebsd.org (Postfix) with ESMTPS id ED2511DE2A for ; Sat, 5 May 2018 11:20:06 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id w45BK6ki080530 for ; Sat, 5 May 2018 11:20:06 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id w45BK6uR080529 for bugs@FreeBSD.org; Sat, 5 May 2018 11:20:06 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f 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 Date: Sat, 05 May 2018 11:20:06 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: patch X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: kennethsalerno@yahoo.com X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 05 May 2018 11:20:10 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D227918 --- Comment #3 from Kenneth Salerno --- (In reply to Bryan Drewery from comment #2) Hello, devel/xtoolchain-llvm* is just a no-build external compiler definition sett= ing XCC variables etc., not an external /cross-compiler/ being built specifical= ly for a single target arch like for example devel/powerpc64-gcc is.=20 xtoolchain-llvm60 is therefore equivalent to what I am doing already in make.conf: MYLLVMSUFFIX =3D 60 _OSRELEASE !=3D uname -r OSREL =3D ${_OSRELEASE:C/-.*//} XCC =3D /usr/local/bin/clang${MYLLVMSUFFIX} XCXX =3D /usr/local/bin/clang++${MYLLVMSUFFIX} XCPP =3D /usr/local/bin/clang-cpp${MYLLVMSUFFIX} CROSS_BINUTILS_PREFIX =3D /usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XCFLAGS +=3D -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XCXXFLAGS +=3D -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- XLDFLAGS +=3D -B/usr/local/bin/powerpc64-unknown-freebsd${OSREL}- NO_WERROR =3D WERROR =3D WITHOUT_GCC =3D yes WITHOUT_GCC_BOOTSTRAP =3D yes WITHOUT_GNUCXX =3D yes WITH_CLANG =3D yes WITH_CLANG_BOOTSTRAP =3D yes WITH_CLANG_FULL =3D yes WITH_CLANG_IS_CC =3D yes WITH_LLD =3D 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 dire= ctly exists check in Makefile.inc1 that will always fail and not automatically a= dd the correct -B from my CROSS_BINUTILS_PREFIX. --=20 You are receiving this mail because: You are the assignee for the bug.=