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....@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 via email to