From patchwork Wed Nov 9 12:41:52 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adhemerval Zanella X-Patchwork-Id: 81477 Delivered-To: patch@linaro.org Received: by 10.140.97.165 with SMTP id m34csp173674qge; Wed, 9 Nov 2016 04:42:24 -0800 (PST) X-Received: by 10.98.200.203 with SMTP id i72mr32921157pfk.181.1478695344311; Wed, 09 Nov 2016 04:42:24 -0800 (PST) Return-Path: Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id y128si42016553pgy.46.2016.11.09.04.42.24 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 09 Nov 2016 04:42:24 -0800 (PST) Received-SPF: pass (google.com: domain of libc-alpha-return-74573-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Authentication-Results: mx.google.com; dkim=pass header.i=@sourceware.org; spf=pass (google.com: domain of libc-alpha-return-74573-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) smtp.mailfrom=libc-alpha-return-74573-patch=linaro.org@sourceware.org; dmarc=fail (p=NONE dis=NONE) header.from=linaro.org DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id; q=dns; s= default; b=Md8OGErxv2k29ZCJYuxSnAlb40QcTLxo3xLFfSrosgC5rLBurrwvb BMW9/MkhmKr9ObJvJaCuhyKwE3+IlGNtEzUbPx3aZKx9yEvSapsLPGj/weQlPlZM wgPlR56Y91Q57O8IucLQ/HBbab8I+Jrk6y1LyjDYH/FV8echqo6Fxc= 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:from:to:subject:date:message-id; s=default; bh=2hlXHsJJDKrcJPPblSC4UHCOuUU=; b=DsUHduiHAfMSXacmtWtcNVCXClG9 uFqkkqrKXCpXEIsTnfyF2fmNtxWCG0ZpGg2qQsQOEpzUowILHpFhLubb9c22uYWo BWGZfkJpgHpBt4WK+vsCaqwijIAG1kYjXxxI92bm0yInohqSR6vtwFNJkh74BYSK aPKggwddSdaq52I= Received: (qmail 101796 invoked by alias); 9 Nov 2016 12:42:13 -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 101763 invoked by uid 89); 9 Nov 2016 12:42:11 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.4 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_NONE, RCVD_IN_SORBS_SPAM, SPF_PASS autolearn=no version=3.3.2 spammy=sh4-linux-gnu, sh4linuxgnu, 17, 9, undefine X-HELO: mail-ua0-f182.google.com X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:subject:date:message-id; bh=PTaxS2UxzZsNDSV4heYyiKVq0Zibnzu1bVvtbKKpF0Q=; b=Dt6GRQI318svMfqZpe7R9T3jpvZtDi/p1Hg6IflDVifOE+rO+XJdRhVzo8QPMkrRfi rSVUw5Hrmz0lGLp5WaI30d/IZb2cisxqqoYM6zGm7h1HAHVzx5Z66E5WIWz+AWINc6nM T72bIJfK00LhTVUgyFoHmJv12GdsSgOsxiA7gC3g7IstB0glVJc4ApLjdF7kRm8BEnfx ntDllwKVTyZ0RvJe2SBLt8kZgDFpke0xd+CPFMTM47QBtU20YicE1W7niePiP/2TfkY8 JvXPBtQHliNrOq5LMhEadFe3g0zM6ANeORAbjvLnElcW+Nud9WGCvp42ttvd49FHsc8Y NkPw== X-Gm-Message-State: ABUngvdjxzNFtEzuvZxsOJPbinCdynF262jcxzpOOTrSNqzUBmc9yaJiEzzrjl5Bi1AzZqsm X-Received: by 10.159.33.97 with SMTP id 88mr420178uab.156.1478695319016; Wed, 09 Nov 2016 04:41:59 -0800 (PST) From: Adhemerval Zanella To: libc-alpha@sourceware.org Subject: [PATCH] Fix sh4 build with __ASSUME_ST_INO_64_BIT redefinition Date: Wed, 9 Nov 2016 10:41:52 -0200 Message-Id: <1478695312-5009-1-git-send-email-adhemerval.zanella@linaro.org> Since 327792c sh4 builds fails with: ../sysdeps/unix/sysv/linux/kernel-features.h:49:0: error: "__ASSUME_ST_INO_64_BIT" redefined [-Werror] #define __ASSUME_ST_INO_64_BIT 1 ^ In file included from ../sysdeps/unix/sysv/linux/sysdep.h:19:0, from ../sysdeps/unix/sysv/linux/sh/sysdep.h:24, from ../sysdeps/unix/sysv/linux/sh/sh4/sysdep.h:4, from :1: ../sysdeps/unix/sysv/linux/sh/kernel-features.h:47:0: note: this is the location of the previous definition #define __ASSUME_ST_INO_64_BIT 0 It is because sh4 kernel-features.sh is included multiple times without guards and this patch fixes by adding them. Tested on a sh4-linux-gnu build. Also with this issues, is there are strong reason to *not* have include guards on kernel-features.h? With current approach, a architecture can't include Linux default kernel-features.h and redefine it to a different value, only undefine it (unless it explicit do not include default kernel-features.h, and I think that's is not the idea). * sysdeps/unix/sysv/linux/sh/kernel-features.h: Add include guards. --- ChangeLog | 5 +++++ sysdeps/unix/sysv/linux/sh/kernel-features.h | 5 +++++ 2 files changed, 10 insertions(+) -- 2.7.4 diff --git a/sysdeps/unix/sysv/linux/sh/kernel-features.h b/sysdeps/unix/sysv/linux/sh/kernel-features.h index ea4fdbc..d03aafa 100644 --- a/sysdeps/unix/sysv/linux/sh/kernel-features.h +++ b/sysdeps/unix/sysv/linux/sh/kernel-features.h @@ -17,6 +17,9 @@ License along with the GNU C Library; if not, see . */ +#ifndef __KERNEL_FEATURES_SH__ +# define __KERNEL_FEATURES_SH__ + /* SH uses socketcall. */ #define __ASSUME_SOCKETCALL 1 @@ -50,3 +53,5 @@ the kernel interface for p{read,write}64 adds a dummy long argument before the offset. */ #define __ASSUME_PRW_DUMMY_ARG 1 + +#endif