From owner-freebsd-toolchain@freebsd.org Thu Nov 9 09:28:23 2017 Return-Path: Delivered-To: freebsd-toolchain@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 32C7EE7010E for ; Thu, 9 Nov 2017 09:28:23 +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 mx1.freebsd.org (Postfix) with ESMTPS id 1FF337F026 for ; Thu, 9 Nov 2017 09:28:23 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id vA99SMIW065187 for ; Thu, 9 Nov 2017 09:28:23 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-toolchain@FreeBSD.org Subject: [Bug 223551] for external toolchain support, X prefix is not setting build utils for make buildworld Date: Thu, 09 Nov 2017 09:28:23 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: misc X-Bugzilla-Version: 11.1-RELEASE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: markmi@dsl-only.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: freebsd-toolchain@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-toolchain@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Maintenance of FreeBSD's integrated toolchain List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 09 Nov 2017 09:28:23 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D223551 --- Comment #2 from Mark Millard --- (In reply to sid from comment #0) I'll also mention that there is a port devel/xtoolchain-llvm50 that installs files to help configure for using llvm50 as a cross-compiler. For example: # more /usr/local/share/toolchains/llvm50.mk XCC=3D/usr/local/bin/clang50 XCXX=3D/usr/local/bin/clang++50 XCPP=3D/usr/local/bin/clang-cpp50 XLD=3D/usr/local/llvm50/bin/ld.lld CROSS_BINUTILS_PREFIX=3D/var/empty X_COMPILER_TYPE=3Dclang An example for a gcc compiler is: # more /usr/local/share/toolchains/aarch64-gcc.mk XCC=3D/usr/local/bin/aarch64-unknown-freebsd12.0-gcc XCXX=3D/usr/local/bin/aarch64-unknown-freebsd12.0-g++ XCPP=3D/usr/local/bin/aarch64-unknown-freebsd12.0-cpp CROSS_BINUTILS_PREFIX=3D/usr/local/aarch64-freebsd/bin/ X_COMPILER_TYPE=3Dgcc It would take also assigning CC/CXX/CPP/. . . in order to also use llvm50 materials as the host compiler/toolchain as well during cross-builds. (Note that the limiting condition of a cross-build is a form of native build, where the target happens to match the host type. But technically the CC/CXX/CPP/. . . could be assigned but the XCC/XCXX/XCPP/. . . left unassigned for "self hosted" that avoids the system compiler.) One does have to consider what to do with (showing WITHOUT_ use): WITHOUT_CROSS_COMPILER=3D WITHOUT_SYSTEM_COMPILER=3D WITH_SYSTEM_COMPILER=3D would be directly indicating to use the system compiler when a cross compiler does not seem to need to be built. WITH_CROSS_COMPILE=3D vs. WITHOUT_CROSS_COMPILER=3D is less obvious and I analyzed source code to see which way had the properties that I was after in each case. In my earlier example it was using WITHOUT_ for both and I explicitly set lots of things. This makes the case structurally more similar to the case of avoiding the system compiler (and potential cross compiler variant): in part it is just replacing some paths. It is not obvious what your host-native vs. cross-build-target intents are for use of: /usr/local/bin/llvm-as50 /usr/local/bin/llvm-ar50 /usr/local/bin/lld-link50 /usr/local/bin/llvm-nm50 /usr/local/bin/llvm-objdump50 /usr/local/bin/llvm-ranlib50 /usr/local/bin/llvm-strings50 (I've had examples of the host-native vs. cross-build-toolchain using different tools.) You may have to specify more of your intent for such things in order to find out what is needed to configure things. --=20 You are receiving this mail because: You are the assignee for the bug.=