public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
From: Richard Biener <richard.guenther@gmail.com>
To: Kito Cheng <kito.cheng@sifive.com>
Cc: Robin Dapp <rdapp.gcc@gmail.com>,
	pan2.li@intel.com, gcc-patches@gcc.gnu.org, juzhe.zhong@rivai.ai,
	yanzhang.wang@intel.com, jeffreyalaw@gmail.com
Subject: Re: [PATCH] RISC-V: Adjust stdint.h to stdint-gcc.h for rvv tests
Date: Wed, 17 May 2023 14:22:50 +0200	[thread overview]
Message-ID: <E4F0118D-DFF1-4F7A-9ACB-8046F8D15E25@gmail.com> (raw)
In-Reply-To: <CALLt3Tju5L6F9DaxYKGhCfT-JvE8AwrdYxeJs3g=s4zFcgWQ0Q@mail.gmail.com>



> 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

  reply	other threads:[~2023-05-17 12:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-05-16  6:52 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 [this message]
2023-05-17 13:07           ` Kito Cheng

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=E4F0118D-DFF1-4F7A-9ACB-8046F8D15E25@gmail.com \
    --to=richard.guenther@gmail.com \
    --cc=gcc-patches@gcc.gnu.org \
    --cc=jeffreyalaw@gmail.com \
    --cc=juzhe.zhong@rivai.ai \
    --cc=kito.cheng@sifive.com \
    --cc=pan2.li@intel.com \
    --cc=rdapp.gcc@gmail.com \
    --cc=yanzhang.wang@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).