From patchwork Wed Jan 2 15:15:58 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mark Corbin X-Patchwork-Id: 1020016 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.133; helo=hemlock.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="dsvbbRxZ"; dkim-atps=neutral Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43VF532XFWz9s9h for ; Thu, 3 Jan 2019 02:16:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id F3EDA82F21; Wed, 2 Jan 2019 15:16:36 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id pocruStl8IFT; Wed, 2 Jan 2019 15:16:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5F79585A82; Wed, 2 Jan 2019 15:16:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 90E4F1BF46F for ; Wed, 2 Jan 2019 15:16:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8E17F85A82 for ; Wed, 2 Jan 2019 15:16:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9aSYGNs-Ksef for ; Wed, 2 Jan 2019 15:16:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id BCFAE82F21 for ; Wed, 2 Jan 2019 15:16:34 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id z5so30787364wrt.11 for ; Wed, 02 Jan 2019 07:16:34 -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=7IKDzf6kz2ZjqwVqOkHvWX5lYZXdcF+0C1D4hOIek2I=; b=dsvbbRxZly+Zcy4R92gRb84gnOoqxqKXxwIAeCJAVtMu2kdefiBoHtDw2FSa7l0evx UuZy/F8rHqhgcbbmP6NNxnCpj7iWefxbHMGJM3+u67Kxf//QVViPgI0M5kM1qugKkFkx myDHPUbJ16Vz/PhT60ZnzjFED7+wXo108k8fuehsawUxbLDY9dU+tRtk5m4itgStomyU cMN03+3ybltgDnGTS9ZioUEh0f9SpzXR2OB2Wmz7i+8guPHXZnjTgaJGE1NWchJ+pRGb XJhTu7UiblTKkQahg8tzOnri0R/0kqMimA6dx6v68LCte1owpo+3oE9L6gl6NgC74nkf uxUg== 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=7IKDzf6kz2ZjqwVqOkHvWX5lYZXdcF+0C1D4hOIek2I=; b=eVtsCKDx+lqopz6LPps4Ejs2dnwDZGIIfoqiqBpyTCssJq59Ioe0KJWL2Pwzg7PoSx 3BXLyRjyLGsaijCe1hT1hhoXUIiLFGPEepQ63wIAZuij9xp1q3piocF3Q8DOa0bJVDZ3 27Y2bNfUdfjwWOnctm4CccdG/3RoNk2A1OJ3QgFFue503l1Mwo+tETbI5aMJjklLT6yF 7Nb+7ZCxlpbldWsi0MD/CpFoegsDhpGYuTZiN9HhFANZVqnEujWjphhDPh//AUcBB84F ZpqpGoaVkmrHfSJi4+2wGOhBkauZY0wpuqpaObxasJPt1LjtiHaMYrQjolbpMH91R3Ue k50g== X-Gm-Message-State: AJcUuke6ZdPlAqGAdL7xBAHD9YeyPSXZI6SpBUeFuqnQMjfHwcAsysoO pFUCBTh7EqkbSawJOzEmOApUsA0X5w/CSQ== X-Google-Smtp-Source: ALg8bN7Fp0JJIyIYNYoV+GtlYQ6I4yLrr4XwtOui8oafjpFw81AV+plb+e01th9j9JaBnmQ776GYRg== X-Received: by 2002:a5d:664a:: with SMTP id f10mr38103467wrw.311.1546442193019; Wed, 02 Jan 2019 07:16:33 -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 v4sm39336020wme.6.2019.01.02.07.16.32 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 02 Jan 2019 07:16:32 -0800 (PST) From: Mark Corbin To: buildroot@buildroot.org Date: Wed, 2 Jan 2019 15:15:58 +0000 Message-Id: <20190102151559.32221-1-mark.corbin@embecosm.com> X-Mailer: git-send-email 2.19.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2 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 , yann.morin.1998@free.fr 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 --- Changes v1 -> v2: - referenced the commit rather than the mailing list message as the source of the upstream patch (Yann) --- .../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..2fc666dfdc --- /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/git/?p=glibc.git;a=commit;h=0b9c84906f653978fb8768c7ebd0ee14a47e662e] + +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