This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH 6/6] Installed header hygiene (BZ#20366): Test of installed headers.


On 09/23/2016 10:01 PM, Zack Weinberg wrote:
> On Fri, Sep 23, 2016 at 5:51 PM, Joseph Myers <joseph@codesourcery.com> wrote:
>> I'm seeing the new tests fail in misc/ for 32-bit x86, because of:
>>
>> ../sysdeps/unix/sysv/linux/x86/sys/elf.h:24:3: error: #warning "This header is obsolete; use <sys/procfs.h> instead." [-Werror=cpp]
>>  # warning "This header is obsolete; use <sys/procfs.h> instead."
>>    ^
>> cc1: all warnings being treated as errors
> 
> I can't conveniently do anything with anything other than x86-64 at
> the moment, but there's already a special case for sys/elf.h in
> check-installed-headers.sh -- would you mind seeing if you can
> generalize it?  Possibly passing $(target_alias) down from the
> Makefile rather than what it does now.

I have just pushed a patch that should correct this problem.  It turns
out that all architectures' versions of sys/elf.h have either an
obsoletion warning or a flat-out #error, so the existing code can be
generalized easily.

zw

diff --git a/ChangeLog b/ChangeLog
index 0484809..88ea4b1 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,8 @@
 2016-09-28  Zack Weinberg  <zackw@panix.com>

+       * scripts/check-installed-headers.sh: Generalize treatment of
+       sys/elf.h to all target architectures.
+
        * sysdeps/unix/sysv/linux/s390/sys/ucontext.h: Restore accidentally-
        deleted typedef ucontext_t.

diff --git a/scripts/check-installed-headers.sh
b/scripts/check-installed-headers.sh
index 7fbc725..87d6142 100644
--- a/scripts/check-installed-headers.sh
+++ b/scripts/check-installed-headers.sh
@@ -77,9 +77,14 @@ for header in "$@"; do
         (bits/* | regexp.h | rpcsvc/*.x)
             continue;;

-        # sys/elf.h and sys/vm86.h are "unsupported on x86-64" and
-        # #error out on that target.
-        (sys/elf.h | sys/vm86.h)
+        # All extant versions of sys/elf.h contain nothing more than an
+        # exhortation (either a #warning or an #error) to use sys/procfs.h
+        # instead, plus an inclusion of that header.
+        (sys/elf.h)
+            continue;;
+
+        # sys/vm86.h is "unsupported on x86-64" and errors out on that
target.
+        (sys/vm86.h)
             case "$is_x86_64" in
                 (yes) continue;;
                 (no)  ;;



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]