From patchwork Tue Apr 9 21:26:40 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos O'Donell X-Patchwork-Id: 32232 Received: (qmail 21418 invoked by alias); 9 Apr 2019 21:26:46 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 21406 invoked by uid 89); 9 Apr 2019 21:26:46 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-18.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 spammy= X-HELO: mail-qt1-f169.google.com Return-Path: To: Szabolcs Nagy , libc-alpha From: Carlos O'Donell Subject: New failure on aarch64 in Fedora Rawhide. Message-ID: Date: Tue, 9 Apr 2019 17:26:40 -0400 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.4.0 MIME-Version: 1.0 Szabolcs, https://kojipkgs.fedoraproject.org//work/tasks/2880/34082880/build.log BUILDSTDERR: In file included from ../sysdeps/aarch64/sysdep.h:22, BUILDSTDERR: from ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:26, BUILDSTDERR: from ../sysdeps/aarch64/nptl/tls.h:37, BUILDSTDERR: from ../include/errno.h:25, BUILDSTDERR: from ../sysdeps/unix/sysv/linux/netlink_assert_response.c:19: BUILDSTDERR: ../sysdeps/generic/sysdep.h:81: error: "CFI_RESTORE" redefined [-Werror] BUILDSTDERR: 81 | # define CFI_RESTORE(reg) \ BUILDSTDERR: | BUILDSTDERR: In file included from ../sysdeps/unix/sysdep.h:18, BUILDSTDERR: from ../sysdeps/unix/sysv/linux/aarch64/sysdep.h:25, BUILDSTDERR: from ../sysdeps/aarch64/nptl/tls.h:37, BUILDSTDERR: from ../include/errno.h:25, BUILDSTDERR: from ../sysdeps/unix/sysv/linux/netlink_assert_response.c:19: BUILDSTDERR: ../sysdeps/generic/sysdep.h:81: note: this is the location of the previous definition BUILDSTDERR: 81 | # define CFI_RESTORE(reg) \ BUILDSTDERR: | BUILDSTDERR: cc1: all warnings being treated as errors This just came up in Fedora Rawhide. We have no guards on systeps/generic/sysdep.h, I assume we want to include it multiple times with different macro API settings. Note the difference in include path is: sysdeps/aarch64/sysdep.h vs. sysdeps/unix/sysdep.h In sysdeps/unix/sysv/linux/aarch64/sysdep.h we include both: 25 #include 26 #include Then in sysdeps/aarch64/sysdep.h we include: 22 #include Then in sysdeps/unix/sysdeps.h we include: 18 #include So we get two copies. In general the project rule has been "Include the headers you need." Guarding the macros with ifndef could lead to defaults being used incorrectly (macro API issues), and was the reason we enabled -Wundef, so doing that makes things less robust. It would be really nice if we could just include what we needed once. I would like to get to something like this: --- We include the aarch64 sysdep.h, and then the Linux version, and we're done. This avoids the double inclusion, and appears to work just fine, matching what other arches do. Thoughts? diff --git a/sysdeps/unix/sysv/linux/aarch64/sysdep.h b/sysdeps/unix/sysv/linux/aarch64/sysdep.h index 935c507f8cb36b2a..35f3dd65b3397001 100644 --- a/sysdeps/unix/sysv/linux/aarch64/sysdep.h +++ b/sysdeps/unix/sysv/linux/aarch64/sysdep.h @@ -22,9 +22,8 @@ /* Always enable vsyscalls on aarch64 */ #define ALWAYS_USE_VSYSCALL 1 -#include -#include #include +#include /* Defines RTLD_PRIVATE_ERRNO and USE_DL_SYSINFO. */ #include