On 4/30/24 12:45 PM, Helmut Grohne wrote:
The definition of LIMITS_H_TEST evaluates its existence in
BUILD_SYSTEM_HEADER_DIR, but we'd actually need it to check a target
version. Hence this check occasionally produces misdetections when build
and target differ. In some cases such as cygming, the header is only
installed after performing the build. Instead of resolving these
situations by guessing, defer the test to the time of use and check for
the header using __has_include_next which will use the correct include
search path.

2024-04-30  Helmut Grohne  <hel...@subdivi.de>

        PR bootstrap/80677
         * gcc/limitx.h: Only #include syslimits.h when another <limits.h>
          exists.
         * gcc/limity.h: Only #include limits.h when another <limits.h>
          exists.
         * gcc/Makefile.in: Delete LIMITS_H_TEST default and always wrap
          limits.h with limitx.h and limity.h.
        * Makefile.tpl: Drop forwarding of LIMITS_H_TEST
        * Makefile.in: Regenerate.
        * gcc/config/i386/t-cygming: Delete unused LIMITS_H_TEST.
        * gcc/config/t-rtems: Likewise.
        * gcc/config/t-vxworks: Likewise.
        * gcc/config/vms/t-vms: Likewise.
As I noted in the related BZ. I think there's something more fundamental going on here. The claim that this stuff doesn't work for host != target isn't as general as one might think as we do those kind of builds every day.
I would start by first getting the debian multiarch patches upstreamed 
as I get a sense this is related to multiarch.
Jeff

Reply via email to