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: 1082828 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-101290-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="oajJTL2/"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 44f0jT1PRhz9sRJ for ; Wed, 10 Apr 2019 07:26:52 +1000 (AEST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; q=dns; s=default; b=iZg UAldYiB94y0XKEgtCIVB2YKIZYl8gZuFO3awUlkjL0/VkuJpeIHRP6AqIX9EuHnC jtTOWz1ocHnWownwzDUZdedvkiBmt9NYyIxTfNh9dilnbwRQWjyaWR5yeLAFzJs5 5iJRt7nxzkdvruOchyrEuUGcLshylTuzWoxW4wFM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:to:from:subject:message-id:date:mime-version :content-type:content-transfer-encoding; s=default; bh=Z3xSTTssj OaJewNukSJvMRDV9xg=; b=oajJTL2/rJ5WLMCirQYwvZbfJCg+PJyz+gso/2rk4 rgKmyZdjoS07HkmYdxPIRQVmoVsG9IEM+UsXT86GzuIxTlATzIoBU4nZ9+yWFTR5 DAymGZt11ueXBEOsVhEAHS1DP4uWaseD0BJMF4f5AT571kSGAakoU6gw999pGxCK YI= 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 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