diff mbox series

[Committed,4/4] IBM Z: zTPF: Include glibc-stdint.h

Message ID 20200304131327.79444-4-krebbel@linux.ibm.com
State New
Headers show
Series [Committed,1/4] IBM Z: zTPF: Add tpf trace customization options | expand

Commit Message

Andreas Krebbel March 4, 2020, 1:13 p.m. UTC
Building a zTPF cross currently fails when building libstdc++
complaining about the __UINTPTR_TYPE__ to be missing.

Fixed by including the glibc-stdint.h header.

2020-03-04  Andreas Krebbel  <krebbel@linux.ibm.com>

	* config.gcc: Include the glibc-stdint.h header for zTPF.
---
 gcc/config.gcc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Joseph Myers March 4, 2020, 11:34 p.m. UTC | #1
On Wed, 4 Mar 2020, Andreas Krebbel wrote:

> Building a zTPF cross currently fails when building libstdc++
> complaining about the __UINTPTR_TYPE__ to be missing.
> 
> Fixed by including the glibc-stdint.h header.

To confirm: TPF provides a <stdint.h> header, which uses the same types 
as glibc's <stdint.h> does?

If so, you can remove TPF from the list of targets for which bug 448 has 
yet to be resolved.  (If TPF doesn't provide <stdint.h>, you should set 
use_gcc_stdint=provide for TPF in config.gcc.  If it provides it but using 
different types from glibc, you'll need to add a host-side header 
describing those types instead of using glibc-stdint.h.)
Andreas Krebbel March 5, 2020, 12:56 p.m. UTC | #2
On 3/5/20 12:34 AM, Joseph Myers wrote:
> On Wed, 4 Mar 2020, Andreas Krebbel wrote:
> 
>> Building a zTPF cross currently fails when building libstdc++
>> complaining about the __UINTPTR_TYPE__ to be missing.
>>
>> Fixed by including the glibc-stdint.h header.
> 
> To confirm: TPF provides a <stdint.h> header, which uses the same types 
> as glibc's <stdint.h> does?

TPF uses an older version of Glibc. So they have stdint.h and the C99 types. Only the *_WIDTH macros
appear to be missing in their version.

Andreas

> 
> If so, you can remove TPF from the list of targets for which bug 448 has 
> yet to be resolved.  (If TPF doesn't provide <stdint.h>, you should set 
> use_gcc_stdint=provide for TPF in config.gcc.  If it provides it but using 
> different types from glibc, you'll need to add a host-side header 
> describing those types instead of using glibc-stdint.h.)
>
diff mbox series

Patch

diff --git a/gcc/config.gcc b/gcc/config.gcc
index ae5a845fcce..2df4b36d190 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -3104,7 +3104,7 @@  s390x-*-linux*)
 	tmake_file="${tmake_file} s390/t-linux64 s390/t-s390"
 	;;
 s390x-ibm-tpf*)
-	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h s390/tpf.h"
+	tm_file="s390/s390x.h s390/s390.h dbxelf.h elfos.h glibc-stdint.h s390/tpf.h"
 	tm_p_file=s390/s390-protos.h
 	c_target_objs="${c_target_objs} s390-c.o"
 	cxx_target_objs="${cxx_target_objs} s390-c.o"