From owner-freebsd-toolchain@freebsd.org Sun Oct 29 04:45:35 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 32AE0E58D9C for ; Sun, 29 Oct 2017 04:45:35 +0000 (UTC) (envelope-from sid@bsdmail.com) Received: from mout.gmx.com (mout.gmx.com [74.208.4.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "mail.gmx.com", Issuer "thawte SSL CA - G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id E41B76ADE1 for ; Sun, 29 Oct 2017 04:45:34 +0000 (UTC) (envelope-from sid@bsdmail.com) Received: from [108.70.50.7] by 3c-app-mailcom-lxa12.server.lan (via HTTP); Sun, 29 Oct 2017 05:40:17 +0100 MIME-Version: 1.0 Message-ID: From: Sid To: freebsd-toolchain@freebsd.org Subject: External LLVM toolchain not consistently locating c++ when compiling ports Content-Type: text/plain; charset=UTF-8 Date: Sun, 29 Oct 2017 05:40:17 +0100 Importance: normal Sensitivity: Normal X-Priority: 3 X-Provags-ID: V03:K1:6ZdejegoinGxp1ehFQB17z4EDJym+Ep8xlnGQzb4Pfm 6f1wZqLdqJ7uqz+R4dd9CWrR5g5TiddWDW5wvZfI+7BlcaBr1Y TQhcuZ55s7Zji91wXM2JkSZwccpy3+SU877eDc4oV+pe7u5GK2 KsFFcIt0GNTFfgzQzSdx4DP29jDEmCahKuh/XAJBefjPczGIZN ZfY655SvTqWtKlwH07qxf9UKnef4ZdD5tIh1yA5Uc8ksJW6WJS d0/MGoU9/4tQbBA3OB+5oNIs/xlKdaY+uVgY1KK46dnCWLOpju nN5zt4= X-UI-Out-Filterresults: notjunk:1;V01:K0:gKqCFS6yvlE=:bZtdAmrhbX+FOITddHErk2 LgiO63JcWz1aI7XPH3e1Pooid4/waVwu6W4DYaXdEDfrAX39f/VVRjheWjrR9oeanyvC1LHrP K419GRkQ++vtfc0x+XztlaLCnLOlwt8YZao0XvxLx94fqurgBZqSE914b17x8u9u1hlTD8c0G 4CYGltQKqDXrdtpqffrfZK0cqKe42HsuIUuoeeD9STY6JgAYlcX4xesoHqr7XDHIyOixEsGNu E0/NZyuGGJaeWLwqytNsB4VF/Uu9OK4NCSenMPXK1hZjIdfWccqPnPLeB8ObU21jY3il9ePWh BId9zLf3uieGpz+//NE2HL5mTyC+61y8SplZWo6eZJWHpQcg+jK7/b4lWg5Uk2TMA8PEi1t7N 1Yt5/fMTHU2du6FP5QXLGrlCgmlI6/WabQFWY/dszQ86+vb0tO2g3lckdcUSEkk9mPtDamNc+ vGNeBZJrJ+N0OI85lle8MaeKPqrL0BfUvVj2zJsPDP965L6dyAzEpwFRwSGsRYwAQiECbl2u4 Qufi4ebwvxkckxt2l3/KyS8TkovP9MRTAzZMTH6L/hQ 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: Sun, 29 Oct 2017 04:45:35 -0000 In /etc/make.conf, when I use, XCC= /usr/local/bin/clang40 XCXX= /usr/local/bin/clang++40 XCPP= /usr/local/bin/clang-cpp40 for ports that require c++ without clang in the base system, I get the error code make: "/usr/ports/Mk/Uses/compiler.mk" line 112:warning: "c++ -### /dev/null 2>&1" returned non-zero status Base and the kernel builds well with this setting. Compiles that don't need c++ also work with this setting. I've compensated by adding CC= /usr/local/bin/clang40 CXX= /usr/local/bin/clang++40 CPP= /usr/local/bin/clang-cpp40 to the above. While this works for many ports requiring c++, it doesn't work for Rust, and programs that depend on it (Firefox, Thunderbird). It seems that XCXX is supposed to replace CXX fully, considering that XCC replaces CC, and XCPP replaces CPP when compiling other ports. The error message for compiling rust with all of the above (XCC, XCXX, XCPP, CC, CXX, CPP) set is couldn't find required command: "c++" This error happens whether the port option for lang/rust is set to compile with llvm40 or the bundled version. This is affected by /usr/ports/Mk/Uses/compiler.mk and I think this problem affects ports compiled with c++ in the base system as well. Thank you