From patchwork Tue Apr 24 16:34:22 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joseph Myers X-Patchwork-Id: 903691 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-91802-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="SnZJc/YC"; 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 40Vpnn0SvJz9s02 for ; Wed, 25 Apr 2018 02:34:36 +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:date:from:to:subject:message-id:mime-version :content-type; q=dns; s=default; b=xY0aTKoenF+UGqnMk72zRcKTXLC8Q AUqyGR8sBJLqX7h1GCsY4WswNbqJZW2c7AZjFuIS+gmg6yDsdZUHq6Xd8BPQKrrp xVjdJqhZaERgRU1Ty6EhR3DIu2I1h+mWA81iyOeUrxpEnA7RGOKNv5B22e11Zm/I TeUizKmUo2uSDM= 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:date:from:to:subject:message-id:mime-version :content-type; s=default; bh=2Gh1Mu6mGGRLFBDPTAstUysZrY8=; b=SnZ Jc/YCvnTBzKkk6xNlzfxFKG+Bc4gdREMYvWaeaq3QJFH5zLmXpuZsZhJ7aT6Ioj0 FOE+HpId3kycsi9M3dDm41K20oZTENYpyuAQ7ylj00DoLKK4Ye4SsJV6zTHRg+sL gjvoea14ugNSQuyhLz22KIxsyjDQt+gYbtNj4+/o= Received: (qmail 110827 invoked by alias); 24 Apr 2018 16:34:31 -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 110811 invoked by uid 89); 24 Apr 2018 16:34:30 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-24.5 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, RCVD_IN_DNSWL_NONE, SPF_PASS, URIBL_RED autolearn=ham version=3.3.2 spammy= X-HELO: relay1.mentorg.com Date: Tue, 24 Apr 2018 16:34:22 +0000 From: Joseph Myers To: Subject: Fix Hurd glibc build with GCC 8 [committed] Message-ID: User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 X-ClientProxiedBy: svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) The build of glibc for Hurd has been failing with GCC mainline because of the checks that aliases have the same type as the symbol aliased; the Hurd dl-sysdep.c has a macro that defines aliases without using the proper type. When GCC 8 branches (soon), I intend to make it the default version in build-many-glibcs.py, so these failures would mean the default build-many-glibcs.py build fails for Hurd again. This patch fixes the Hurd build with GCC 8 by changing the macro that defines the problem aliases to use the correct type for them. An include of is needed to avoid this use of typeof resulting in an error for __access_noerrno not being declared. Tested compilation for i686-gnu with build-many-glibcs.py. Committed. 2018-04-24 Joseph Myers * sysdeps/mach/hurd/dl-sysdep.c: Include . (check_no_hidden): Use type of original function when declaring alias. diff --git a/sysdeps/mach/hurd/dl-sysdep.c b/sysdeps/mach/hurd/dl-sysdep.c index cbf4e05..5471088 100644 --- a/sysdeps/mach/hurd/dl-sysdep.c +++ b/sysdeps/mach/hurd/dl-sysdep.c @@ -46,6 +46,7 @@ #include #include +#include extern void __mach_init (void); @@ -278,8 +279,9 @@ _dl_sysdep_start_cleanup (void) /* This macro checks that the function does not get renamed to be hidden: we do need these to be overridable by libc's. */ -#define check_no_hidden(name) \ -static void __check_##name##_no_hidden(void) __attribute__((alias(#name))); +#define check_no_hidden(name) \ + static __typeof (name) __check_##name##_no_hidden \ + __attribute__ ((alias (#name))); /* Open FILE_NAME and return a Hurd I/O for it in *PORT, or return an error. If STAT is non-zero, stat the file into that stat buffer. */