From patchwork Thu Feb 28 13:18:51 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?q?Martin_Li=C5=A1ka?= X-Patchwork-Id: 31686 Received: (qmail 92967 invoked by alias); 28 Feb 2019 13:18:57 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 92948 invoked by uid 89); 28 Feb 2019 13:18:56 -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, SPF_PASS autolearn=ham version=3.3.2 spammy= X-HELO: mx1.suse.de Subject: Re: [PATCH] Fix location where math-vector-fortran.h is installed. To: Zack Weinberg Cc: Florian Weimer , Joseph Myers , GNU C Library References: <863ffa3b-af66-7d82-21a8-e809fd6c1b62@suse.cz> <08214004-67b7-ce24-07ec-3cd685c65038@suse.cz> <84b2b212-a70a-e18a-5929-d89d6014fb70@suse.cz> <44cd0edb-2ab3-2908-8adb-f2e06859ecfe@suse.cz> <57bb8e48-8805-91ca-9902-9c6fbc3d5360@suse.cz> <87imx62qtr.fsf@oldenburg2.str.redhat.com> From: =?UTF-8?Q?Martin_Li=c5=a1ka?= Message-ID: <974399a2-cf1a-1b23-bb9d-b97772278335@suse.cz> Date: Thu, 28 Feb 2019 14:18:51 +0100 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.5.1 MIME-Version: 1.0 In-Reply-To: On 2/27/19 4:00 PM, Zack Weinberg wrote: > On Wed, Feb 27, 2019 at 3:09 AM Martin Liška wrote: >> On 2/26/19 10:41 PM, Zack Weinberg wrote: >>> On Tue, Feb 26, 2019 at 4:16 PM Florian Weimer wrote: >>>> * Martin Liška: >>>>> On 2/26/19 7:05 PM, Joseph Myers wrote: >>>>>> On Tue, 26 Feb 2019, Martin Liška wrote: >>>>>> >>>>>>> Hi. >>>>>>> >>>>>>> This is follow up patch where I fix location where the header >>>>>>> is installed. I made a type as I was copying & pasting. >>> >>> Do I understand correctly that the desired installation location is >>> $(prefix)/include/finclude/math-vector-fortran.h ? >> >> Yes. > > Will there ever be C headers in $(prefix)/include/finclude ? Hello. No, only Fortran header files. > >>>> In file included from /tmp/cih_test_C67G81.c:8: >>>> ../sysdeps/x86/fpu/finclude/math-vector-fortran.h:1:1: error: expected identifie >>>> r or ‘(’ before ‘!’ token >>>> ! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -* >> >> I skipped that header explicitly. > ... >> + # Skip Fortran header >> + (finclude/math-vector-fortran.h) >> + continue;; > > To put the above question another way, is there a reason why this shouldn't be > > + # Skip Fortran headers > + (finclude/*) > + continue;; > > ? Yes. > >> And for the check-wrapper-headers.py, I read a header file and skip files >> with 'f90' file type. > > If you're going to do it this way, I recommend you copy the more > general Emacs modeline parser from > https://sourceware.org/ml/libc-alpha/2019-02/msg00539.html ... but if > we can just skip finclude/* that might be a better approach for both > scripts. Agree, it would be easier. Martin > > zw > From b52fa57a42a335d50f03cfe4addd9d92e31851b6 Mon Sep 17 00:00:00 2001 From: marxin Date: Tue, 26 Feb 2019 18:17:36 +0100 Subject: [PATCH] Fix location where math-vector-fortran.h is installed. ChangeLog: 2019-02-26 Martin Liska * math/Makefile: Change location where math-vector-fortran.h is installed. * math/finclude/math-vector-fortran.h: Move from bits/math-vector-fortran.h. * sysdeps/x86/fpu/finclude/math-vector-fortran.h: Move from sysdeps/x86/fpu/bits/math-vector-fortran.h. * scripts/check-installed-headers.sh: Skip Fortran header files. * scripts/check-wrapper-headers.py: Likewise. --- math/Makefile | 2 +- {bits => math/finclude}/math-vector-fortran.h | 2 +- scripts/check-installed-headers.sh | 4 ++++ scripts/check-wrapper-headers.py | 4 ++++ sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h | 2 +- 5 files changed, 11 insertions(+), 3 deletions(-) rename {bits => math/finclude}/math-vector-fortran.h (98%) rename sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h (99%) diff --git a/math/Makefile b/math/Makefile index fc4191089d..cb4eaec6a9 100644 --- a/math/Makefile +++ b/math/Makefile @@ -26,7 +26,7 @@ headers := math.h bits/mathcalls.h bits/mathinline.h \ fpu_control.h complex.h bits/cmathcalls.h fenv.h \ bits/fenv.h bits/fenvinline.h bits/mathdef.h tgmath.h \ bits/math-finite.h bits/math-vector.h \ - bits/math-vector-fortran.h \ + finclude/math-vector-fortran.h \ bits/libm-simd-decl-stubs.h bits/iscanonical.h \ bits/flt-eval-method.h bits/fp-fast.h bits/fp-logb.h \ bits/long-double.h bits/mathcalls-helper-functions.h \ diff --git a/bits/math-vector-fortran.h b/math/finclude/math-vector-fortran.h similarity index 98% rename from bits/math-vector-fortran.h rename to math/finclude/math-vector-fortran.h index 7c1e095094..66d467c22d 100644 --- a/bits/math-vector-fortran.h +++ b/math/finclude/math-vector-fortran.h @@ -1,4 +1,4 @@ -! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Platform-specific declarations of SIMD math functions for Fortran. ! Copyright (C) 2019 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh index 8e7beffd82..e90bdc389f 100644 --- a/scripts/check-installed-headers.sh +++ b/scripts/check-installed-headers.sh @@ -84,6 +84,10 @@ for header in "$@"; do (sys/elf.h) continue;; + # Skip Fortran headers + (finclude/*) + continue;; + # sys/sysctl.h is unsupported for x32. (sys/sysctl.h) case "$is_x32" in diff --git a/scripts/check-wrapper-headers.py b/scripts/check-wrapper-headers.py index 094faa3ced..fc3c25d7de 100644 --- a/scripts/check-wrapper-headers.py +++ b/scripts/check-wrapper-headers.py @@ -75,6 +75,10 @@ def check_headers(args): is_nonsysdep_header = os.access(header, os.R_OK) if is_nonsysdep_header: + # Skip Fortran header files + if 'finclude' in header: + continue + include_path = os.path.join(args.root, INCLUDE, header) if not os.access(include_path, os.R_OK): print('error: missing wrapper header {} for {}'.format( diff --git a/sysdeps/x86/fpu/bits/math-vector-fortran.h b/sysdeps/x86/fpu/finclude/math-vector-fortran.h similarity index 99% rename from sysdeps/x86/fpu/bits/math-vector-fortran.h rename to sysdeps/x86/fpu/finclude/math-vector-fortran.h index 36051cc73e..4b69beed67 100644 --- a/sysdeps/x86/fpu/bits/math-vector-fortran.h +++ b/sysdeps/x86/fpu/finclude/math-vector-fortran.h @@ -1,4 +1,4 @@ -! Platform-specific declarations of SIMD math functions for Fortran. -*- f90 -*- +! Platform-specific declarations of SIMD math functions for Fortran. ! Copyright (C) 2019 Free Software Foundation, Inc. ! This file is part of the GNU C Library. ! -- 2.20.1