From: "H.J. Lu" <hjl.tools@gmail.com>
To: Joseph Myers <joseph@codesourcery.com>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: Make check-installed-headers.sh ignore sys/sysctl.h for x32
Date: Mon, 07 Nov 2016 23:30:00 -0000 [thread overview]
Message-ID: <CAMe9rOoFaWEaVR8wqOOaPXHW8idr8czY8MEAh8FhzjQ23LP3Tw@mail.gmail.com> (raw)
In-Reply-To: <alpine.DEB.2.20.1611032248050.20687@digraph.polyomino.org.uk>
On Thu, Nov 3, 2016 at 3:48 PM, Joseph Myers <joseph@codesourcery.com> wrote:
> check-installed-headers tests were failing for x32 because of the x86
> bits/sysctl.h containing a #error for x32. This patch makes the tests
> ignore sys/sysctl.h for x32, similar to the other special-casing of
> particular headers.
>
> Tested for x86_64 (full testing for -m64, compile-only for x32).
>
> 2016-11-03 Joseph Myers <joseph@codesourcery.com>
>
> * scripts/check-installed-headers.sh: Ignore sys/sysctl.h for x32.
>
> diff --git a/scripts/check-installed-headers.sh b/scripts/check-installed-headers.sh
> index 87d6142..a245fe6 100644
> --- a/scripts/check-installed-headers.sh
> +++ b/scripts/check-installed-headers.sh
> @@ -66,6 +66,7 @@ trap "rm -f '$cih_test_c'" 0
>
> failed=0
> is_x86_64=unknown
> +is_x32=unknown
> for header in "$@"; do
> # Skip various headers for which this test gets a false failure.
> case "$header" in
> @@ -83,6 +84,28 @@ for header in "$@"; do
> (sys/elf.h)
> continue;;
>
> + # sys/sysctl.h is unsupported for x32.
> + (sys/sysctl.h)
> + case "$is_x32" in
> + (yes) continue;;
> + (no) ;;
> + (unknown)
> + cat >"$cih_test_c" <<EOF
> +#if defined __x86_64__ && defined __ILP32__
> +# error "is x32"
> +#endif
> +EOF
> + if $cc_cmd -fsyntax-only "$cih_test_c" > /dev/null 2>&1
> + then
> + is_x32=no
> + else
> + is_x32=yes
> + continue
> + fi
> + ;;
> + esac
> + ;;
> +
> # sys/vm86.h is "unsupported on x86-64" and errors out on that target.
> (sys/vm86.h)
> case "$is_x86_64" in
>
It looks good to me.
Thanks.
--
H.J.
prev parent reply other threads:[~2016-11-07 23:30 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-11-03 22:48 Joseph Myers
2016-11-07 23:30 ` H.J. Lu [this message]
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=CAMe9rOoFaWEaVR8wqOOaPXHW8idr8czY8MEAh8FhzjQ23LP3Tw@mail.gmail.com \
--to=hjl.tools@gmail.com \
--cc=joseph@codesourcery.com \
--cc=libc-alpha@sourceware.org \
/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).