public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
@ 2023-05-16  6:52 pan2.li
  2023-05-16  7:10 ` Robin Dapp
  0 siblings, 1 reply; 9+ messages in thread
From: pan2.li @ 2023-05-16  6:52 UTC (permalink / raw)
  To: gcc-patches; +Cc: juzhe.zhong, kito.cheng, pan2.li, yanzhang.wang, jeffreyalaw

From: Pan Li <pan2.li@intel.com>

This patch would like to align the stdint.h to the stdint-gcc.h for all
the RVV test files. Aka:

stdint.h => stdint-gcc.h

Signed-off-by: Pan Li <pan2.li@intel.com>

gcc/testsuite/ChangeLog:

	* gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h:
	Replace stdint.h with stdint-gcc.h.
	* gcc.target/riscv/rvv/autovec/binop/shift-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vadd-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vand-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vdiv-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vmax-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vmin-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vmul-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vor-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vrem-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vsub-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/binop/vxor-template.h: Ditto.
	* gcc.target/riscv/rvv/autovec/series-1.c: Ditto.
	* gcc.target/riscv/rvv/autovec/vmv-imm-run.c: Ditto.
	* gcc.target/riscv/rvv/autovec/vmv-imm-template.h: Ditto.
---
 .../gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h  | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/shift-template.h         | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vadd-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vand-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vdiv-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vmax-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vmin-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vmul-template.h          | 2 +-
 gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vor-template.h | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vrem-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vsub-template.h          | 2 +-
 .../gcc.target/riscv/rvv/autovec/binop/vxor-template.h          | 2 +-
 gcc/testsuite/gcc.target/riscv/rvv/autovec/series-1.c           | 2 +-
 gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-run.c        | 2 +-
 gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-template.h   | 2 +-
 15 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h
index a0ddc00849d..8d1cefdca85 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-scalar-template.h
@@ -2,7 +2,7 @@
 /* { dg-do run } */
 /* { dg-additional-options "-std=c99 --param=riscv-autovec-preference=scalable -fno-vect-cost-model --save-temps" } */
 
-#include <stdint.h>
+#include <stdint-gcc.h>
 #include <assert.h>
 
 #define SHIFTL(TYPE,VAL)				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-template.h
index 64e0a386b06..16ae48c8ede 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/shift-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST1_TYPE(TYPE)					\
   __attribute__((noipa))					\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-template.h
index 5ed79329138..cd945d471d2 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vadd-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vand-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vand-template.h
index 7d02c83d164..5cabe073097 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vand-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vand-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vdiv-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vdiv-template.h
index 7fbba7b4133..12a1de32874 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vdiv-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vdiv-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmax-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmax-template.h
index df0f9f2aeeb..fc6a07e3ce9 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmax-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmax-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmin-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmin-template.h
index 459f58ddec1..06f6b95461e 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmin-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmin-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmul-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmul-template.h
index b029c06efd6..37f77972101 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmul-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vmul-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vor-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vor-template.h
index 859ae67c5ee..e60146cc232 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vor-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vor-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vrem-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vrem-template.h
index 71eebc8b645..d5ef40667ff 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vrem-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vrem-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-template.h
index 0566f3dcbfb..8c0a9c99217 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vsub-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vxor-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vxor-template.h
index 954a247f539..370b242f197 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vxor-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/binop/vxor-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define TEST_TYPE(TYPE) 				\
   __attribute__((noipa))				\
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/series-1.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/series-1.c
index a01f6ce7411..1c697228e9b 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/series-1.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/series-1.c
@@ -1,7 +1,7 @@
 /* { dg-do compile } */
 /* { dg-options "-march=rv32gcv -mabi=ilp32d --param riscv-autovec-preference=fixed-vlmax --param riscv-autovec-lmul=m4" } */
 
-#include <stdint.h>
+#include <stdint-gcc.h>
 
 #define NUM_ELEMS(TYPE) (64 / sizeof (TYPE))
 
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-run.c b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-run.c
index 309a296b686..6764110d461 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-run.c
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-run.c
@@ -3,7 +3,7 @@
 
 #include "vmv-imm-template.h"
 
-#include <stdint.h>
+#include <stdint-gcc.h>
 #include <assert.h>
 
 #define SZ 512
diff --git a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-template.h b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-template.h
index 93ba5204c2e..855343d7e3e 100644
--- a/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-template.h
+++ b/gcc/testsuite/gcc.target/riscv/rvv/autovec/vmv-imm-template.h
@@ -1,4 +1,4 @@
-#include <stdint.h>
+#include <stdint-gcc.h>
 #include <assert.h>
 
 #define VMV_POS(TYPE,VAL)				\
-- 
2.34.1


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-16  6:52 [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests pan2.li
@ 2023-05-16  7:10 ` Robin Dapp
  2023-05-16  7:16   ` Li, Pan2
  2023-05-17  6:15   ` Richard Biener
  0 siblings, 2 replies; 9+ messages in thread
From: Robin Dapp @ 2023-05-16  7:10 UTC (permalink / raw)
  To: pan2.li, gcc-patches
  Cc: rdapp.gcc, juzhe.zhong, kito.cheng, yanzhang.wang, jeffreyalaw

> This patch would like to align the stdint.h to the stdint-gcc.h for all
> the RVV test files. Aka:
> 
> stdint.h => stdint-gcc.h

Looks good.  Jeff already pre-approved so you can go ahead and install
this on the trunk.

Regards
 Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-16  7:10 ` Robin Dapp
@ 2023-05-16  7:16   ` Li, Pan2
  2023-05-16  7:29     ` Li, Pan2
  2023-05-17  6:15   ` Richard Biener
  1 sibling, 1 reply; 9+ messages in thread
From: Li, Pan2 @ 2023-05-16  7:16 UTC (permalink / raw)
  To: Robin Dapp, gcc-patches
  Cc: juzhe.zhong, kito.cheng, Wang, Yanzhang, jeffreyalaw

Got it, thanks, will commit to trunk after pass the rvv test.

Pan

-----Original Message-----
From: Robin Dapp <rdapp.gcc@gmail.com> 
Sent: Tuesday, May 16, 2023 3:11 PM
To: Li, Pan2 <pan2.li@intel.com>; gcc-patches@gcc.gnu.org
Cc: rdapp.gcc@gmail.com; juzhe.zhong@rivai.ai; kito.cheng@sifive.com; Wang, Yanzhang <yanzhang.wang@intel.com>; jeffreyalaw@gmail.com
Subject: Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests

> This patch would like to align the stdint.h to the stdint-gcc.h for 
> all the RVV test files. Aka:
> 
> stdint.h => stdint-gcc.h

Looks good.  Jeff already pre-approved so you can go ahead and install this on the trunk.

Regards
 Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* RE: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-16  7:16   ` Li, Pan2
@ 2023-05-16  7:29     ` Li, Pan2
  0 siblings, 0 replies; 9+ messages in thread
From: Li, Pan2 @ 2023-05-16  7:29 UTC (permalink / raw)
  To: Robin Dapp, gcc-patches
  Cc: juzhe.zhong, kito.cheng, Wang, Yanzhang, jeffreyalaw

Committed, thanks all.

Pan

-----Original Message-----
From: Li, Pan2 
Sent: Tuesday, May 16, 2023 3:17 PM
To: Robin Dapp <rdapp.gcc@gmail.com>; gcc-patches@gcc.gnu.org
Cc: juzhe.zhong@rivai.ai; kito.cheng@sifive.com; Wang, Yanzhang <yanzhang.wang@intel.com>; jeffreyalaw@gmail.com
Subject: RE: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests

Got it, thanks, will commit to trunk after pass the rvv test.

Pan

-----Original Message-----
From: Robin Dapp <rdapp.gcc@gmail.com>
Sent: Tuesday, May 16, 2023 3:11 PM
To: Li, Pan2 <pan2.li@intel.com>; gcc-patches@gcc.gnu.org
Cc: rdapp.gcc@gmail.com; juzhe.zhong@rivai.ai; kito.cheng@sifive.com; Wang, Yanzhang <yanzhang.wang@intel.com>; jeffreyalaw@gmail.com
Subject: Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests

> This patch would like to align the stdint.h to the stdint-gcc.h for 
> all the RVV test files. Aka:
> 
> stdint.h => stdint-gcc.h

Looks good.  Jeff already pre-approved so you can go ahead and install this on the trunk.

Regards
 Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-16  7:10 ` Robin Dapp
  2023-05-16  7:16   ` Li, Pan2
@ 2023-05-17  6:15   ` Richard Biener
  2023-05-17  6:25     ` Robin Dapp
  1 sibling, 1 reply; 9+ messages in thread
From: Richard Biener @ 2023-05-17  6:15 UTC (permalink / raw)
  To: Robin Dapp
  Cc: pan2.li, gcc-patches, juzhe.zhong, kito.cheng, yanzhang.wang,
	jeffreyalaw

On Tue, May 16, 2023 at 9:11 AM Robin Dapp via Gcc-patches
<gcc-patches@gcc.gnu.org> wrote:
>
> > This patch would like to align the stdint.h to the stdint-gcc.h for all
> > the RVV test files. Aka:
> >
> > stdint.h => stdint-gcc.h
>
> Looks good.  Jeff already pre-approved so you can go ahead and install
> this on the trunk.

Huh, including stdint-gcc.h looks completely wrong.  What's the issue you are
trying to solve?

> Regards
>  Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-17  6:15   ` Richard Biener
@ 2023-05-17  6:25     ` Robin Dapp
  2023-05-17  6:55       ` Kito Cheng
  0 siblings, 1 reply; 9+ messages in thread
From: Robin Dapp @ 2023-05-17  6:25 UTC (permalink / raw)
  To: Richard Biener
  Cc: rdapp.gcc, pan2.li, gcc-patches, juzhe.zhong, kito.cheng,
	yanzhang.wang, jeffreyalaw

> Huh, including stdint-gcc.h looks completely wrong.  What's the issue you are
> trying to solve?

The way I understood it is that that's a temporary workaround until
all multilib et al. (+testsuite) configurations are in place but I
haven't checked the details myself.  Eventually this should be done
properly so we can include the regular headers.  Kito might want to
comment as he dealt with it before.

I used #include <stdlib.h> for all those tests and Andreas Schwab reported:
 
  /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No such file or directory

Regards
 Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-17  6:25     ` Robin Dapp
@ 2023-05-17  6:55       ` Kito Cheng
  2023-05-17 12:22         ` Richard Biener
  0 siblings, 1 reply; 9+ messages in thread
From: Kito Cheng @ 2023-05-17  6:55 UTC (permalink / raw)
  To: Robin Dapp
  Cc: Richard Biener, pan2.li, gcc-patches, juzhe.zhong, yanzhang.wang,
	jeffreyalaw

RISC-V glibc will require corresponding muilti-lib has built there,
otherwise will report something like:

  /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No
such file or directory

But actually we only require those fixed length types to compile and
scan assembly or dump,
So we don't really have those multilib built, that's the reason we
workaround this way.

This way could work even if the multilib build is disabled, and seems
ARM has same issue around that and just disable those tests:

---
# Return 1 if this is an ARM target supporting -mfloat-abi=soft.  Some
# multilibs may be incompatible with this option.

proc check_effective_target_arm_soft_ok { } {
   return [check_no_compiler_messages arm_soft_ok object {
       #include <stdint.h>
       int dummy;
       int main (void) { return 0; }
       } "-mfloat-abi=soft"]
}

# Return 1 if this is an ARM target supporting -mfloat-abi=soft even
# for linking.  Some multilibs may be incompatible with this option,
# and some linkers may reject incompatible options.

proc check_effective_target_arm_soft_ok_link { } {
   return [check_no_compiler_messages arm_soft_ok_link executable {
       #include <stdint.h>
       int dummy;
       int main (void) { return 0; }
       } "-mfloat-abi=soft"]
}
---


On Wed, May 17, 2023 at 2:25 PM Robin Dapp <rdapp.gcc@gmail.com> wrote:
>
> > Huh, including stdint-gcc.h looks completely wrong.  What's the issue you are
> > trying to solve?
>
> The way I understood it is that that's a temporary workaround until
> all multilib et al. (+testsuite) configurations are in place but I
> haven't checked the details myself.  Eventually this should be done
> properly so we can include the regular headers.  Kito might want to
> comment as he dealt with it before.
>
> I used #include <stdlib.h> for all those tests and Andreas Schwab reported:
>
>   /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No such file or directory
>
> Regards
>  Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-17  6:55       ` Kito Cheng
@ 2023-05-17 12:22         ` Richard Biener
  2023-05-17 13:07           ` Kito Cheng
  0 siblings, 1 reply; 9+ messages in thread
From: Richard Biener @ 2023-05-17 12:22 UTC (permalink / raw)
  To: Kito Cheng
  Cc: Robin Dapp, pan2.li, gcc-patches, juzhe.zhong, yanzhang.wang,
	jeffreyalaw



> Am 17.05.2023 um 08:55 schrieb Kito Cheng <kito.cheng@sifive.com>:
> 
> RISC-V glibc will require corresponding muilti-lib has built there,
> otherwise will report something like:
> 
>  /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No
> such file or directory
> 
> But actually we only require those fixed length types to compile and
> scan assembly or dump,
> So we don't really have those multilib built, that's the reason we
> workaround this way.
> 
> This way could work even if the multilib build is disabled, and seems
> ARM has same issue around that and just disable those tests:

Then just mimic that or avoid using stdint.h and instead use things like __INT32_TYPE__?

> ---
> # Return 1 if this is an ARM target supporting -mfloat-abi=soft.  Some
> # multilibs may be incompatible with this option.
> 
> proc check_effective_target_arm_soft_ok { } {
>   return [check_no_compiler_messages arm_soft_ok object {
>       #include <stdint.h>
>       int dummy;
>       int main (void) { return 0; }
>       } "-mfloat-abi=soft"]
> }
> 
> # Return 1 if this is an ARM target supporting -mfloat-abi=soft even
> # for linking.  Some multilibs may be incompatible with this option,
> # and some linkers may reject incompatible options.
> 
> proc check_effective_target_arm_soft_ok_link { } {
>   return [check_no_compiler_messages arm_soft_ok_link executable {
>       #include <stdint.h>
>       int dummy;
>       int main (void) { return 0; }
>       } "-mfloat-abi=soft"]
> }
> ---
> 
> 
>> On Wed, May 17, 2023 at 2:25 PM Robin Dapp <rdapp.gcc@gmail.com> wrote:
>> 
>>> Huh, including stdint-gcc.h looks completely wrong.  What's the issue you are
>>> trying to solve?
>> 
>> The way I understood it is that that's a temporary workaround until
>> all multilib et al. (+testsuite) configurations are in place but I
>> haven't checked the details myself.  Eventually this should be done
>> properly so we can include the regular headers.  Kito might want to
>> comment as he dealt with it before.
>> 
>> I used #include <stdlib.h> for all those tests and Andreas Schwab reported:
>> 
>>  /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No such file or directory
>> 
>> Regards
>> Robin

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
  2023-05-17 12:22         ` Richard Biener
@ 2023-05-17 13:07           ` Kito Cheng
  0 siblings, 0 replies; 9+ messages in thread
From: Kito Cheng @ 2023-05-17 13:07 UTC (permalink / raw)
  To: Richard Biener
  Cc: Kito Cheng, Robin Dapp, pan2.li, gcc-patches, juzhe.zhong,
	yanzhang.wang, jeffreyalaw

> > RISC-V glibc will require corresponding muilti-lib has built there,
> > otherwise will report something like:
> >
> >  /usr/include/gnu/stubs.h:11:11: fatal error: gnu/stubs-ilp32d.h: No
> > such file or directory
> >
> > But actually we only require those fixed length types to compile and
> > scan assembly or dump,
> > So we don't really have those multilib built, that's the reason we
> > workaround this way.
> >
> > This way could work even if the multilib build is disabled, and seems
> > ARM has same issue around that and just disable those tests:
>
> Then just mimic that or avoid using stdint.h and instead use things like __INT32_TYPE__?

Hmmm, then that seems like we are inline those types definition from
stdint-gcc.h?

I mean what stdint-gcc.h did is just same as that:

#ifdef __INT8_TYPE__
typedef __INT8_TYPE__ int8_t;
#endif
...
#ifdef __UINT64_TYPE__
typedef __UINT64_TYPE__ uint64_t;
#endif

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2023-05-17 13:07 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-16  6:52 [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests pan2.li
2023-05-16  7:10 ` Robin Dapp
2023-05-16  7:16   ` Li, Pan2
2023-05-16  7:29     ` Li, Pan2
2023-05-17  6:15   ` Richard Biener
2023-05-17  6:25     ` Robin Dapp
2023-05-17  6:55       ` Kito Cheng
2023-05-17 12:22         ` Richard Biener
2023-05-17 13:07           ` Kito Cheng

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).