From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 39604 invoked by alias); 30 Aug 2019 14:49:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 39591 invoked by uid 89); 30 Aug 2019 14:49:34 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-16.6 required=5.0 tests=AWL,BAYES_00,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,SPF_PASS autolearn=ham version=3.3.1 spammy=commercial X-HELO: foss.arm.com Received: from foss.arm.com (HELO foss.arm.com) (217.140.110.172) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 30 Aug 2019 14:49:32 +0000 Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 569D4344; Fri, 30 Aug 2019 07:49:31 -0700 (PDT) Received: from localhost (e121540-lin.manchester.arm.com [10.32.99.62]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id B925A3F703; Fri, 30 Aug 2019 07:49:30 -0700 (PDT) From: Richard Sandiford To: Christophe Lyon Mail-Followup-To: Christophe Lyon ,Christophe Lyon , gcc Patches , richard.sandiford@arm.com Cc: Christophe Lyon , gcc Patches Subject: Re: [ARM/FDPIC v5 02/21] [ARM] FDPIC: Handle arm*-*-uclinuxfdpiceabi in configure scripts References: <20190515124006.25840-1-christophe.lyon@st.com> <20190515124006.25840-3-christophe.lyon@st.com> Date: Fri, 30 Aug 2019 15:15:00 -0000 In-Reply-To: (Christophe Lyon's message of "Fri, 30 Aug 2019 16:35:05 +0200") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-IsSubscribed: yes X-SW-Source: 2019-08/txt/msg02090.txt.bz2 Christophe Lyon writes: > On Fri, 30 Aug 2019 at 11:00, Richard Sandiford > wrote: >> >> Christophe Lyon writes: >> > @@ -785,7 +785,7 @@ case ${target} in >> > esac >> > tmake_file="t-slibgcc" >> > case $target in >> > - *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu) >> > + *-*-linux* | frv-*-*linux* | *-*-kfreebsd*-gnu | *-*-kopensolaris*-gnu | *-*-uclinuxfdpiceabi) >> > :;; >> > *-*-gnu*) >> > native_system_header_dir=/include >> >> I don't think this is necessary, since this target will never match the >> following *-*-gnu*) stanza anyway. > OK (I thought it was clearer to add the fdpic config where we already > have linux that would not match) I think the idea is to match pure GNU systems only in the second stanza (i.e. GNU/Hurd). So we need the first stanza to exclude hybrid-GNU systems like GNU/Linux, GNU/Solaris, GNU/FreeBSD, etc. Since uclinuxfdpiceabi isn't a GNU-based system, I don't think it needs to appear at all. >> > diff --git a/libtool.m4 b/libtool.m4 >> > index 8966762..64e507a 100644 >> > --- a/libtool.m4 >> > +++ b/libtool.m4 >> > @@ -3734,7 +3739,7 @@ m4_if([$1], [CXX], [ >> > ;; >> > esac >> > ;; >> > - linux* | k*bsd*-gnu | kopensolaris*-gnu) >> > + linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinux*) >> > case $cc_basename in >> > KCC*) >> > # KAI C++ Compiler >> >> Is this needed? It seems to be in the !GCC branch of an if/else. > I must admit I didn't test this case. I thought it was needed because > this target does not match "linux*", in case someone tries to compile > with another compiler... > > >> >> If it is needed, the default: >> >> _LT_TAGVAR(lt_prog_compiler_can_build_shared, $1)=no >> >> seems correct for non-FDPIC uclinux. >> > So, either use uclinuxfdpiceabi above, or do nothing and do not try to > support other compilers? Yeah. I think the latter's better, since in this context we only need libtool.m4 to support building with GCC. The decision might be different for upstream libtool, but do any commercial compilers support Arm FDPIC yet? >> > @@ -4032,7 +4037,7 @@ m4_if([$1], [CXX], [ >> > _LT_TAGVAR(lt_prog_compiler_static, $1)='-non_shared' >> > ;; >> > >> > - linux* | k*bsd*-gnu | kopensolaris*-gnu) >> > + linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinux*) >> > case $cc_basename in >> > # old Intel for x86_64 which still supported -KPIC. >> > ecc*) >> >> Same here. >> >> > @@ -5946,7 +5951,7 @@ if test "$_lt_caught_CXX_error" != yes; then >> > _LT_TAGVAR(inherit_rpath, $1)=yes >> > ;; >> > >> > - linux* | k*bsd*-gnu | kopensolaris*-gnu) >> > + linux* | k*bsd*-gnu | kopensolaris*-gnu | uclinuxfdpiceabi) >> > case $cc_basename in >> > KCC*) >> > # Kuck and Associates, Inc. (KAI) C++ Compiler >> >> Here too the code seems to be dealing specifically with non-GCC compilers. >> >> > @@ -6598,7 +6603,7 @@ interix[[3-9]]*) >> > _LT_TAGVAR(postdeps,$1)= >> > ;; >> > >> > -linux*) >> > +linux* | uclinux*) >> > case `$CC -V 2>&1 | sed 5q` in >> > *Sun\ C*) >> > # Sun C++ 5.9 >> >> Here too. (It only seems to do anything for Sun's C compiler.) >> >> The fewer hunks we have to maintain downstream the better :-) >> > Sure. > > I thought safer/cleaner to prepare the cases for non-GCC compilers, I > guess it's better not to add that until proven useful? Yeah, I think so. I guess it depends on your POV. To me, it seems cleaner to add uclinux* and uclinuxfdpiceabi only where we know there's a specific need, since that's also how we decide which of uclinux* and uclinuxfdpiceabi to use. Thanks, Richard