From owner-freebsd-toolchain@freebsd.org Sun Nov 5 00:15:00 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 7CAEBE5B35E for ; Sun, 5 Nov 2017 00:15:00 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: from asp.reflexion.net (outbound-mail-210-141.reflexion.net [208.70.210.141]) (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 2A19E64D4A for ; Sun, 5 Nov 2017 00:14:59 +0000 (UTC) (envelope-from markmi@dsl-only.net) Received: (qmail 29739 invoked from network); 5 Nov 2017 00:14:58 -0000 Received: from unknown (HELO rtc-sm-01.app.dca.reflexion.local) (10.81.150.1) by 0 (rfx-qmail) with SMTP; 5 Nov 2017 00:14:58 -0000 Received: by rtc-sm-01.app.dca.reflexion.local (Reflexion email security v8.40.3) with SMTP; Sat, 04 Nov 2017 20:14:58 -0400 (EDT) Received: (qmail 18160 invoked from network); 5 Nov 2017 00:14:57 -0000 Received: from unknown (HELO iron2.pdx.net) (69.64.224.71) by 0 (rfx-qmail) with (AES256-SHA encrypted) SMTP; 5 Nov 2017 00:14:57 -0000 Received: from [192.168.1.25] (c-76-115-7-162.hsd1.or.comcast.net [76.115.7.162]) by iron2.pdx.net (Postfix) with ESMTPSA id 2747CEC7B31; Sat, 4 Nov 2017 17:14:57 -0700 (PDT) Content-Type: text/plain; charset=utf-8 Mime-Version: 1.0 (Mac OS X Mail 10.3 \(3273\)) Subject: Re: [toolchain] lib/clan/llvm.build.mk: Shouldn't BUILD_TRIPLE definition rely host 'cc -dumpmachine'? From: Mark Millard In-Reply-To: Date: Sat, 4 Nov 2017 17:14:56 -0700 Cc: =?utf-8?Q?Eddy_Petri=C8=99or?= , freebsd-arm@freebsd.org, freebsd-toolchain@freebsd.org, Dimitry Andric Content-Transfer-Encoding: quoted-printable Message-Id: <505436FF-E15C-42DE-8855-47FB5A99E64B@dsl-only.net> References: <7CAFD8CC-BDA1-4E89-BD7E-D0089E27036F@dsl-only.net> To: Gerald Pfeifer X-Mailer: Apple Mail (2.3273) 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, 05 Nov 2017 00:15:00 -0000 On 2017-Nov-4, at 3:57 PM, Gerald Pfeifer wrote: > On Sun, 29 Oct 2017, Eddy Petri=C8=99or wrote: >> Yep --and it is even more complicated: gcc vs. clang are sometimes=20 >> different for the target listed. . . >>=20 >> For example -m32 for amd64 changes the clang result: >>=20 >> # clang -dumpmachine >> x86_64-unknown-freebsd12.0 >>=20 >> .. >>=20 >> # gcc7 -dumpmachine >> x86_64-portbld-freebsd12.0 >=20 > That's not actually related to GCC, but the lang/gcc* ports using > the FreeBSD Ports Collection's default that explicitly set >=20 > CONFIGURE_TARGET?=3D ${ARCH}-portbld-${OPSYS:tl}${OSREL} >=20 > By default GCC would use the same as clang. Interesting. Good to know. Thanks. We still end up with depending on --dumpmachine giving non-uniform results across typical compilers in a standard FreeBSD environment. It looks like depending on -dumpmachine should be avoided for any more than a local workaround. (Some Linux distributions might also vary such definitions to be non-default as well for all I know.) =3D=3D=3D Mark Millard markmi at dsl-only.net