Fix location where math-vector-fortran.h is installed.

Message ID 57bb8e48-8805-91ca-9902-9c6fbc3d5360@suse.cz
State Superseded
Headers

Commit Message

Martin Liška Feb. 26, 2019, 6:30 p.m. UTC
  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.
> 
> It's not clear to me that we want to add a top-level finclude/ directory 
> in the glibc source tree.  Would math/finclude/ work just as well as a 
> source tree location for this file?
> 

Yes, I can confirm math/finclude work as well.

May I install the patch?
Martin
  

Comments

Florian Weimer Feb. 26, 2019, 9:16 p.m. UTC | #1
* 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.
>> 
>> It's not clear to me that we want to add a top-level finclude/ directory 
>> in the glibc source tree.  Would math/finclude/ work just as well as a 
>> source tree location for this file?
>> 
>
> Yes, I can confirm math/finclude work as well.
>
> May I install the patch?

This causes test suite failures for me:

math/check-installed-headers-c.out:

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 -*
-
 ^

math/check-wrapper-headers.out:

error: missing wrapper header include/finclude/math-vector-fortran.h for math/finclude/math-vector-fortran.h

I think we need to whitelist this in multiple places.  It is unfortunate
that Fortran headers use .h like C headers.

Is the finclude/ prefix standardized?

Thanks,
Florian
  
Zack Weinberg Feb. 26, 2019, 9:41 p.m. UTC | #2
On Tue, Feb 26, 2019 at 4:16 PM Florian Weimer <fweimer@redhat.com> 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 ?

> This causes test suite failures for me:
>
> math/check-installed-headers-c.out:
>
> 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 -*

Moving the file out of bits/ caused it to be newly subject to these tests.

If $(prefix)/include/finclude/ is intended to contain nothing but
Fortran headers, we could add finclude to the list of subdirectories
to skip in scripts/check*headers* ...

zw
  

Patch

From cb267faade1b6558e895b496294cd8783236be3f Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
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  <mliska@suse.cz>

	* math/Makefile: Change location where math-vector-fortran.h is
	installed.
	* 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.
---
 math/Makefile                                            | 2 +-
 {bits => math/finclude}/math-vector-fortran.h            | 0
 sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h | 0
 3 files changed, 1 insertion(+), 1 deletion(-)
 rename {bits => math/finclude}/math-vector-fortran.h (100%)
 rename sysdeps/x86/fpu/{bits => finclude}/math-vector-fortran.h (100%)

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 100%
rename from bits/math-vector-fortran.h
rename to math/finclude/math-vector-fortran.h
diff --git a/sysdeps/x86/fpu/bits/math-vector-fortran.h b/sysdeps/x86/fpu/finclude/math-vector-fortran.h
similarity index 100%
rename from sysdeps/x86/fpu/bits/math-vector-fortran.h
rename to sysdeps/x86/fpu/finclude/math-vector-fortran.h
-- 
2.20.1