From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 0221D138334 for ; Wed, 25 Jul 2018 09:47:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id BCD34E08E0; Wed, 25 Jul 2018 09:46:49 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 46E73E0891 for ; Wed, 25 Jul 2018 09:46:49 +0000 (UTC) Received: from red.yakaraplc.local (host213-123-185-55.in-addr.btopenworld.com [213.123.185.55]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: chewi) by smtp.gentoo.org (Postfix) with ESMTPSA id 162AE33BEC0 for ; Wed, 25 Jul 2018 09:46:46 +0000 (UTC) Date: Wed, 25 Jul 2018 10:46:42 +0100 From: James Le Cuirot To: gentoo-dev@lists.gentoo.org Subject: Re: [gentoo-dev] [arm17] [PATCH] toolchain-funcs.eclass: Update tc-is-softfloat for new ARM triplets Message-ID: <20180725104642.3f45c48a@red.yakaraplc.local> In-Reply-To: <1532495026.891.0.camel@gentoo.org> References: <20180724230928.30078-1-chewi@gentoo.org> <1532495026.891.0.camel@gentoo.org> X-Mailer: Claws Mail 3.16.0 (GTK+ 2.24.32; x86_64-redhat-linux-gnu) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-dev@lists.gentoo.org Reply-to: gentoo-dev@lists.gentoo.org MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 1dd7760a-5701-437b-8ed0-cd64595a2c8e X-Archives-Hash: 11e3b2bb7c4b90fb50ef5f0f8efb8354 On Wed, 25 Jul 2018 07:03:46 +0200 Micha=C5=82 G=C3=B3rny wrote: > > diff --git a/eclass/toolchain-funcs.eclass b/eclass/toolchain-funcs.ecl= ass > > index cea8949b45d7..f484fffc2664 100644 > > --- a/eclass/toolchain-funcs.eclass > > +++ b/eclass/toolchain-funcs.eclass > > @@ -204,13 +204,38 @@ tc-is-softfloat() { > > bfin*|h8300*) > > echo "only" ;; > > *) > > - if [[ ${CTARGET//_/-} =3D=3D *-softfloat-* ]] ; then > > - echo "yes" > > - elif [[ ${CTARGET//_/-} =3D=3D *-softfp-* ]] ; then > > - echo "softfp" > > - else > > - echo "no" > > - fi > > + case ${CTARGET//_/-} in > > + *-softfloat-*) > > + echo "yes" ;; > > + *-softfp-*) > > + echo "softfp" ;; > > + arm*) > > + # arm-unknown-linux-gnueabi is ambiguous. We used to > > + # treat it as hardfloat but we now treat it as > > + # softfloat like most everyone else. However, we > > + # check existing toolchains to avoid breaking > > + # existing systems, if possible. > > + if type -P ${CTARGET}-cpp >/dev/null; then > > + if ${CTARGET}-cpp -E - <<< __ARM_PCS_VFP 2>/dev/null | grep -q _= _ARM_PCS_VFP; then > > + # Confusingly __SOFTFP__ is defined only > > + # when -mfloat-abi is soft, not softfp. > > + if ${CTARGET}-cpp -E - <<< __SOFTFP__ 2>/dev/null | grep -q __S= OFTFP__; then > > + > > echo "softfp" =20 >=20 > Either the comment is confusing or you did it the other way around. It is correct but also confusing for two different reasons and I only explained one of them. :) If grep finds the given string, that means it is *not* defined because otherwise it would be replaced with "1". I'll add an explanation for that too. --=20 James Le Cuirot (chewi) Gentoo Linux Developer