From patchwork Fri Nov 9 15:07:06 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Alexandre Oliva X-Patchwork-Id: 995583 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=gcc.gnu.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=gcc-patches-return-489529-incoming=patchwork.ozlabs.org@gcc.gnu.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=adacore.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b="CqLHOg47"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 42s3Rs0wh3z9s4s for ; Sat, 10 Nov 2018 02:07:51 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; q=dns; s=default; b=qM7gr+xPH+hm7Qh8 FbU1ej+rc/wQ37IVh7EkvkUSIsmL9QufR0G1idhEcGBoM9456a0dflxpF3mF5fTC n1YSDPK6I1J5T3s/VOO7vX0nNtNCDL13VTTEqRN22ZaiPGN+B7/998CpL/vBWi7I uQ1HnDlYJv3/5q+kFj7G2T9s51w= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:from :to:cc:subject:date:message-id:mime-version:content-type :content-transfer-encoding; s=default; bh=bjEFGvHnsAOhGt1di/+cSQ FdgYs=; b=CqLHOg47gX093bETm5uhkRL7PURrFywCr71/5nlVOBnpqgoPKw2LDe 22tFA9wrifDBnAbKIXcE2cPeLrn6JLMew13ZmvQuiYD/GGCYwhTPgKPQ6/c4V/Fe yi9qcMeSaaSfqYKBn36OvSaoZf/A/svaWCN7cKbiVI+rjqW0nHVKw= Received: (qmail 101348 invoked by alias); 9 Nov 2018 15:07:44 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 101332 invoked by uid 89); 9 Nov 2018 15:07:43 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, TIME_LIMIT_EXCEEDED autolearn=unavailable version=3.3.2 spammy=xf, config.gcc, configgcc, UD:config.gcc X-HELO: rock.gnat.com Received: from rock.gnat.com (HELO rock.gnat.com) (205.232.38.15) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 09 Nov 2018 15:07:33 +0000 Received: from localhost (localhost.localdomain [127.0.0.1]) by filtered-rock.gnat.com (Postfix) with ESMTP id C32F256013; Fri, 9 Nov 2018 10:07:31 -0500 (EST) Received: from rock.gnat.com ([127.0.0.1]) by localhost (rock.gnat.com [127.0.0.1]) (amavisd-new, port 10024) with LMTP id PtAaR2GhwfbP; Fri, 9 Nov 2018 10:07:31 -0500 (EST) Received: from free.home (tron.gnat.com [IPv6:2620:20:4000:0:46a8:42ff:fe0e:e294]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by rock.gnat.com (Postfix) with ESMTPS id E0EBB56012; Fri, 9 Nov 2018 10:07:30 -0500 (EST) Received: from livre (livre.home [172.31.160.2]) by free.home (8.15.2/8.15.2) with ESMTP id wA9F76in014259; Fri, 9 Nov 2018 13:07:09 -0200 From: Alexandre Oliva To: Richard Earnshaw Cc: Olivier Hainque , gcc-patches@gcc.gnu.org, Nick Clifton , Ramana Radhakrishnan , Kyrylo Tkachov , James Greenhalgh , Marcus Shawcroft , Richard Sandiford , Kito Cheng , Palmer Dabbelt , Andrew Waterman , Jim Wilson , Oleg Endo , Jan Hubicka Subject: [RFC] support --with-multilib-list=@/path/name Date: Fri, 09 Nov 2018 13:07:06 -0200 Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Richard, Olivier tells me he talked to you briefly at the Cauldron about allowing custom multilib sets to be configured from custom Makefile fragments supplied at configure time, and that you was somewhat receptive to the idea. I have implemented this as follows, for ARM targets only so far, using "@/path/name" in the argument to --with-multilib-list to mean /path/name is to be used as a multilib-list Makefile fragment. Does this look like an acceptable interface? Is it ok as far as ARM maintainers are concerned? Any objections from maintainers of other targets that support --with-multilib-list (or from anyone else) to the syntax, to the implementation, or to extending this possibility to their ports? for gcc/ChangeLog * config.gcc (tmake_file): Add /path/name to tmake_file for each @/path/name in --with-multilib-list on arm-*-* targets. * configure.ac: Accept full pathnames in tmake_file. * configure: Rebuilt. * doc/install.texi (with-multilib-list): Document it. --- gcc/config.gcc | 13 +++++++++++++ gcc/configure | 9 ++++++--- gcc/configure.ac | 5 ++++- gcc/doc/install.texi | 22 +++++++++++++++------- 4 files changed, 38 insertions(+), 11 deletions(-) diff --git a/gcc/config.gcc b/gcc/config.gcc index 7578ff03825e..f1363c41f989 100644 --- a/gcc/config.gcc +++ b/gcc/config.gcc @@ -3998,6 +3998,19 @@ case "${target}" in aprofile|rmprofile) tmake_profile_file="arm/t-multilib" ;; + @/*) + ml=`echo "X$arm_multilib" | sed '1s,^X@,,'` + if test -f "${ml}"; then + tmake_file="${tmake_file} ${ml}" + else + echo "Error: ${ml} does not exist" >&2 + exit 1 + fi + ;; + @*) + echo "Error: multilib config file must start with /" >&2 + exit 1 + ;; *) echo "Error: --with-multilib-list=${with_multilib_list} not supported." 1>&2 exit 1 diff --git a/gcc/configure b/gcc/configure index b814484ea25b..5f15c7a1ff02 100755 --- a/gcc/configure +++ b/gcc/configure @@ -12244,7 +12244,10 @@ done tmake_file_= for f in ${tmake_file} do - if test -f ${srcdir}/config/$f + if test -n `echo "X$f" | sed -n '1s,^X/.*,/,p` && test -f "$f" + then + tmake_file_="${tmake_file_} $f" + elif test -f ${srcdir}/config/$f then tmake_file_="${tmake_file_} \$(srcdir)/config/$f" fi @@ -18572,7 +18575,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18575 "configure" +#line 18578 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18678,7 +18681,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18681 "configure" +#line 18684 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 59585912556b..99a3e6f8f52f 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1940,7 +1940,10 @@ done tmake_file_= for f in ${tmake_file} do - if test -f ${srcdir}/config/$f + if test -n `echo "X$f" | sed -n '1s,^X/.*,/,p` && test -f "$f" + then + tmake_file_="${tmake_file_} $f" + elif test -f ${srcdir}/config/$f then tmake_file_="${tmake_file_} \$(srcdir)/config/$f" fi diff --git a/gcc/doc/install.texi b/gcc/doc/install.texi index be9b07b5d23b..fd19fc590ec8 100644 --- a/gcc/doc/install.texi +++ b/gcc/doc/install.texi @@ -1078,13 +1078,21 @@ values and meaning for each target is given below. @table @code @item arm*-*-* -@var{list} is a comma separated list of @code{aprofile} and @code{rmprofile} -to build multilibs for A or R and M architecture profiles respectively. Note -that, due to some limitation of the current multilib framework, using the -combined @code{aprofile,rmprofile} multilibs selects in some cases a less -optimal multilib than when using the multilib profile for the architecture -targetted. The special value @code{default} is also accepted and is equivalent -to omitting the option, ie. only the default run-time library will be enabled. +@var{list} is a comma separated list of @code{aprofile} and +@code{rmprofile} to build multilibs for A or R and M architecture +profiles respectively. Note that, due to some limitation of the current +multilib framework, using the combined @code{aprofile,rmprofile} +multilibs selects in some cases a less optimal multilib than when using +the multilib profile for the architecture targetted. The special value +@code{default} is also accepted and is equivalent to omitting the +option, ie. only the default run-time library will be enabled. + +@var{list} may also contain @code{@@/path/name}, to use the multilib +configuration Makefile fragment @file{/path/name}. Such files enable +custom, user-chosen multilib lists to be configured. Whether multiple +such files can be used together depends on the contents of the supplied +files. See @file{gcc/config/arm/t-*profile} for examples of what such +Makefile fragments ought to look like. The table below gives the combination of ISAs, architectures, FPUs and floating-point ABIs for which multilibs are built for each accepted value.