From patchwork Wed Jan 2 14:17:24 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 1020004 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.138; helo=whitealder.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=embecosm.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=embecosm.com header.i=@embecosm.com header.b="M9mTRmGU"; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43VCnY5BBTz9s4s for ; Thu, 3 Jan 2019 01:18:09 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 26ADF848A3; Wed, 2 Jan 2019 14:18:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id UI4HFwVLpUtq; Wed, 2 Jan 2019 14:18:01 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id D9C94814CA; Wed, 2 Jan 2019 14:18:01 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B826D1C14FF for ; Wed, 2 Jan 2019 14:18:00 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id B59F422BBC for ; Wed, 2 Jan 2019 14:18:00 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id NGBvJ4-lDUYb for ; Wed, 2 Jan 2019 14:18:00 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f66.google.com (mail-wr1-f66.google.com [209.85.221.66]) by silver.osuosl.org (Postfix) with ESMTPS id DAAEE20799 for ; Wed, 2 Jan 2019 14:17:59 +0000 (UTC) Received: by mail-wr1-f66.google.com with SMTP id t27so30628416wra.6 for ; Wed, 02 Jan 2019 06:17:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=embecosm.com; s=google; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s+bpz43akVbU3175XbYrGVjwsT31bTSSPgLGRTVnUZg=; b=M9mTRmGUkBroRdzPIVKod7o55zflmlrmrAeCLZWUjklwgW4s2Qd4ZDmHFZwNoY5GIB mzaC1OHXA7Nlwfh8THzaULKDQ0ktm4ighm6LuLAy2bU0qpMdHB35/E0dvGb8TjsczX3R zQc1dZwL1aZ+xBPTErB+jMFENLxgdAKJDI6MTSoalOYilKeShyWrh+Xm7M/rsQ7Ad0CS OMwjfTkeXQMbsLPSgSwCvKoUtdcTcT0KVfKTREqMr48ZXjqd5xljLxZoiT9HBR3o92fs zKE/REusnVHccB18FjrEt/OYFDs/wcmI51GSvX14LblWUPMJF3qMLQKAg7xAayozbXzR 5iAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=s+bpz43akVbU3175XbYrGVjwsT31bTSSPgLGRTVnUZg=; b=bX+/BuWm3akODpIdQeBeaHhPQ+/bD2lh4ZTSDgNiu/wDehKS9cUalqR0jQK7PGKevs eq8WANIfsMIS1Unv04GRyKhy5kmStv9f9GAI4BeVa4wI9R0FHvsv9wGcvsYebbBdBRKt bEpZ55jm6pFJ9NSdM/6m4h2w5Nb/hBubgS6PHhH6uMB1Uj7HxsMzRwhQVlaUaktPM34Q 84kHu7Es/iP2P3sG4fa3FvpUl5qTqmEYC39FEuAUzd3cERuKB+xnAWoYB1CSlrpXn1ov lv7gK4dQL7IVj37oAB43/wWeyPYRY6NWMrOuoTWTJPwwS11HEf0oGwCS/bUCg53mJqUQ wedg== X-Gm-Message-State: AJcUukdnVJg6cGtTX5byUQxNTXSW8ZOf9d7CSVQ2Ef0Qn30TZJj55/Iu iHX8wNfpDvyCscMn9YpLnbnFG6t9+geKrw== X-Google-Smtp-Source: ALg8bN7i84WcJiUYzGCVb7TseN76sxTSer/GTObgppuR9UO2bHSYwUro0m0qmuKK6zUg51x2rgAMzg== X-Received: by 2002:adf:e08c:: with SMTP id c12mr36459070wri.199.1546438677992; Wed, 02 Jan 2019 06:17:57 -0800 (PST) Received: from godzilla.lym.embecosm-corp.com (cust64-dsl91-135-5.idnet.net. [91.135.5.64]) by smtp.gmail.com with ESMTPSA id t12sm48862729wrr.65.2019.01.02.06.17.57 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 06:17:57 -0800 (PST) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 2 Jan 2019 14:17:24 +0000 Message-Id: <20190102141724.23898-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/glibc: fix include of syscalls.h for RISC-V architecture X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Mark Corbin Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" UAPI header file asm/syscalls.h has been merged into the UAPI asm/unistd.h header file for the RISC-V architecture in the 4.20 kernel. This causes the glibc 2.28 build to break. This commit applies the upstream glibc patch for this issue. Fixes: http://autobuild.buildroot.net/results/8190eb74b2b97911e03671138487d747fcb22cba/ Signed-off-by: Mark Corbin --- .../0002-fix-syscalls-header-for-riscv.patch | 67 +++++++++++++++++++ 1 file changed, 67 insertions(+) create mode 100644 package/glibc/glibc-2.28-50-gb8dd0f42780a3133c02f064a2c0c5c4e7ab61aaa/0002-fix-syscalls-header-for-riscv.patch diff --git a/package/glibc/glibc-2.28-50-gb8dd0f42780a3133c02f064a2c0c5c4e7ab61aaa/0002-fix-syscalls-header-for-riscv.patch b/package/glibc/glibc-2.28-50-gb8dd0f42780a3133c02f064a2c0c5c4e7ab61aaa/0002-fix-syscalls-header-for-riscv.patch new file mode 100644 index 0000000000..a740018e12 --- /dev/null +++ b/package/glibc/glibc-2.28-50-gb8dd0f42780a3133c02f064a2c0c5c4e7ab61aaa/0002-fix-syscalls-header-for-riscv.patch @@ -0,0 +1,67 @@ + has been removed by + +commit 27f8899d6002e11a6e2d995e29b8deab5aa9cc25 +Author: David Abdurachmanov +Date: Thu Nov 8 20:02:39 2018 +0100 + + riscv: add asm/unistd.h UAPI header + + Marcin Juszkiewicz reported issues while generating syscall table for riscv + using 4.20-rc1. The patch refactors our unistd.h files to match some other + architectures. + + - Add asm/unistd.h UAPI header, which has __ARCH_WANT_NEW_STAT only for 64-bit + - Remove asm/syscalls.h UAPI header and merge to asm/unistd.h + - Adjust kernel asm/unistd.h + + So now asm/unistd.h UAPI header should show all syscalls for riscv. + + may be restored by + +Subject: [PATCH] riscv: restore asm/syscalls.h UAPI header +Date: Tue, 11 Dec 2018 09:09:35 +0100 + +UAPI header asm/syscalls.h was merged into UAPI asm/unistd.h header, +which did resolve issue with missing syscalls macros resulting in +glibc (2.28) build failure. It also broke glibc in a different way: +asm/syscalls.h is being used by glibc. I noticed this while doing +Fedora 30/Rawhide mass rebuild. + +The patch returns asm/syscalls.h header and incl. it into asm/unistd.h. +I plan to send a patch to glibc to use asm/unistd.h instead of +asm/syscalls.h + +In the meantime, we use __has_include__, which was added to GCC 5, to +check if exists before including it. Tested with +build-many-glibcs.py for riscv against kernel 4.19.12 and 4.20-rc7. + + [BZ #24022] + * sysdeps/unix/sysv/linux/riscv/flush-icache.c: Check if + exists with __has_include__ before including it. + +[Mark: patch retrieved from +https://sourceware.org/ml/libc-alpha/2018-12/msg00875.html] + +Signed-off-by: Mark Corbin +--- + sysdeps/unix/sysv/linux/riscv/flush-icache.c | 4 ++++ + 1 file changed, 4 insertions(+) + +diff --git a/sysdeps/unix/sysv/linux/riscv/flush-icache.c b/sysdeps/unix/sysv/linux/riscv/flush-icache.c +index d612ef4c6c..d0ecec5107 100644 +--- a/sysdeps/unix/sysv/linux/riscv/flush-icache.c ++++ b/sysdeps/unix/sysv/linux/riscv/flush-icache.c +@@ -21,7 +21,11 @@ + #include + #include + #include ++#if __has_include__ () + #include ++#else ++#include ++#endif + + typedef int (*func_type) (void *, void *, unsigned long int); + +-- +2.19.2