From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 16101 invoked by alias); 18 Jun 2018 09:34:18 -0000 Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org Received: (qmail 16082 invoked by uid 89); 18 Jun 2018 09:34:18 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,RCVD_IN_DNSWL_NONE,SPF_PASS,URIBL_RED autolearn=ham version=3.3.2 spammy=H*Ad:U*fw, UD:mathbuiltins.def, sk:mathbui, sensible X-Spam-User: qpsmtpd, 2 recipients X-HELO: mail-lf0-f52.google.com Received: from mail-lf0-f52.google.com (HELO mail-lf0-f52.google.com) (209.85.215.52) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 18 Jun 2018 09:34:16 +0000 Received: by mail-lf0-f52.google.com with SMTP id x13-v6so8137113lff.10; Mon, 18 Jun 2018 02:34:16 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=boXzpCQ2mZYlkVi1Z/EPKCtGooz5QDh6MlC1jyv0PUc=; b=s0N7Cq1uC0yAiIKljElQT80KDOaFvLSbPTvvDCde3ZSQu7vBtf+fFdujA/xCxJzBfE obSS/RJ/i6CSSWkml+bUnBLFmi1Be5MAexXzZTm7a7nymAUjv0ZwE4/+J4T/G3wXFp5t +LvsOHY7H7u7S3UUkhqA+XMMt+LcP+Jwd6LRENVaYUtW1GCEz/+MJhF8jGy+k785x/WP zQapKPBjd4zUYYOz5Y5WvmlNphgzgNksiCSs+9EBcK2SCNg9l+wz5kcoVHPIn7oJ5QJF 3xLJ4uN7srHY1UIYFGFI/10IYcNJ8Q5k9j29UqMELYvlNpOQc4y6GcWh2fGiuuf3qBPX nr0g== X-Gm-Message-State: APt69E1QjW314rWhl/TGZL41oidtqYQVowLuCbDl2f6ggCV6nfHy3Qb0 2dQQrUeDbYa+gDfWa+gOFdz1g37X9pIwlRJf8/Y= X-Google-Smtp-Source: ADUXVKIwmXdi+vdAXVH4n52cwRqYPWEYnnSZ7+3QJrX4+y8ivs0fpVL+1eqxWEjjnKAmBz1WDfvKFjDBC8gq7YF8Lfs= X-Received: by 2002:a19:e1c2:: with SMTP id l63-v6mr6757254lfk.102.1529314454459; Mon, 18 Jun 2018 02:34:14 -0700 (PDT) MIME-Version: 1.0 References: <6a8d496b-d830-5eb2-eba3-c2e452d06493@arm.com> <80c395e1-9de5-1d9c-35b6-1ccfdfa6a9e5@arm.com> <20180410102954.GB8577@tucnak> <20180410130655.GD8577@tucnak> <877en01nvw.fsf@mid.deneb.enyo.de> <8736xo1kon.fsf@mid.deneb.enyo.de> In-Reply-To: From: Richard Biener Date: Mon, 18 Jun 2018 11:10:00 -0000 Message-ID: Subject: Re: libmvec in gcc to have vector math in fortran To: "Joseph S. Myers" Cc: Thomas Koenig , Florian Weimer , Jakub Jelinek , szabolcs.nagy@arm.com, Janne Blomqvist , nd@arm.com, GCC Development , "fortran@gcc.gnu.org" , sellcey@cavium.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-06/txt/msg00194.txt.bz2 On Fri, Jun 15, 2018 at 10:59 PM Joseph Myers wrote: > > On Fri, 15 Jun 2018, Thomas Koenig wrote: > > > Hi Richard, > > > > > First and foremost we need a syntax that actually works for the > > > Fortran frontend and a way to automatically include this special > > > header / module. > > > > I can imagine parsing the relevant headers while compiling gfortran > > and generating C code from it, which could then be #included in the > > compiler source code. It should be possible to extend mathbuiltins.def > > that way. > > The libmvec functions present depend on the multilib (for example, glibc > only currently supports them for x86_64, not for 32-bit x86). Given this > multilib dependence, parsing the glibc headers when building the compiler > itself is probably not a sensible option. I'm thinking of sth like the C stdc-predef.h header which is always included by the compiler. So it needs to be sth parseable by gfortran which means it needs to be a module or sth equivalent to a fortran include file. GCC supports -include on the command-line, gfortran does not and it could also support sth like -use FOO to import module FOO. The rest could be then done by specs processing (or similar to the stdc-predef.h via a fortran specific target hook). Richard. > > -- > Joseph S. Myers > joseph@codesourcery.com