From patchwork Mon Mar 9 14:50:38 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Peter Seiderer X-Patchwork-Id: 1251588 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=gmx.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; secure) header.d=gmx.net header.i=@gmx.net header.a=rsa-sha256 header.s=badeba3b8450 header.b=DMXd2dck; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48bh495CRbz9sPK for ; Tue, 10 Mar 2020 01:51:05 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id ED10C25784; Mon, 9 Mar 2020 14:51:02 +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 usB4y5YCd-hT; Mon, 9 Mar 2020 14:51:00 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id C063E25868; Mon, 9 Mar 2020 14:51:00 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id BD0111BF2B8 for ; Mon, 9 Mar 2020 14:50:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id B9830883DF for ; Mon, 9 Mar 2020 14:50:45 +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 NC3QbbJX7bkr for ; Mon, 9 Mar 2020 14:50:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mout.gmx.net (mout.gmx.net [212.227.15.18]) by whitealder.osuosl.org (Postfix) with ESMTPS id 88A7B883DD for ; Mon, 9 Mar 2020 14:50:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=gmx.net; s=badeba3b8450; t=1583765439; bh=RlX6eMYZumufez8pMibQa4yaGCDMENZEqBLsdRdQvTI=; h=X-UI-Sender-Class:From:To:Cc:Subject:Date; b=DMXd2dckPSdnN+5B9OR3yR6P/vnrdK7Ic2tTqZC1OPRHB1BrawJr/Rbum7B4a7/As pIANA7YV1UkIx3ioaNAb1zs/vmrXbhEoOWwu5+hdbKLzrFiAUafRphWryXZxiFO0v9 QQMzqlBy7noby7P8jUZXZYNrxzvjhyLWtLQZ3HFI= X-UI-Sender-Class: 01bb95c1-4bf8-414a-932a-4f6e2808ef9c Received: from localhost.fritz.box ([62.216.209.180]) by mail.gmx.com (mrgmx004 [212.227.17.190]) with ESMTPSA (Nemesis) id 1MDhlV-1j1AaG1lYt-00Aomf; Mon, 09 Mar 2020 15:50:39 +0100 From: Peter Seiderer To: buildroot@busybox.net Date: Mon, 9 Mar 2020 15:50:38 +0100 Message-Id: <20200309145038.18093-1-ps.report@gmx.net> X-Mailer: git-send-email 2.25.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:7o+3RT2w0EMbt8I2+gbh3N178zT1B/z8ZY1LrabTlUjL0UiGAC8 Omq5SUAkIt6K9+s0VlbwezWggW7mHMbb/1TNEYzbJQNj2G0BUN7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qc6rDWphiMavkGAoBsB/hKHk4Ro2YQhfUXyipuxwCsIXAnJsArDDS3CtwhwFwwkcwbU0elPTK vEJM+FwTBfVO3HZYv/idQjMHOrpOtbz5NGAPOTdPk1XKZ5K14Yx32wamSPiVQ+nvGQeVdzCze ckwrfxo5r8Q7n2rYTTGz7kmvCzAFtDaHymV590ZMQ0GwzK98s0VC13FJZqkqDpyC2A1G5WmPi 8W/TWnnswfs/dS2iXKMVKKPKaEF+IWrWq8128Sm4vRDqDBMzKGzozchoNtLi3Bf/QfE5M+G47 qn6JybhRpKU1HRbfxYNvuj4yjAQrHZVfT2SrzYOpUvGwGWBs7FVMVks6Pcr0Rv48qbP4QU3hY mCQKiGJykhd9Ciohr Subject: [Buildroot] [PATCH v1] package/php: fix aarch64 uclibc-ng compile 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: Adam Duskett Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The aarch64 compile uses the sys/auxv.h header which is not provided by ulcibc-ng. Add configure.ac patch to check for the header before using it in ext/standard/crc32.c. Fixes: https://bugs.busybox.net/show_bug.cgi?id=12626 build/php-7.4.3/ext/standard/crc32.c:26:12: schwerwiegender Fehler: sys/auxv.h: Datei oder Verzeichnis nicht gefunden Signed-off-by: Peter Seiderer --- ...Check-for-sys-auxv.h-before-using-it.patch | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 package/php/0005-Check-for-sys-auxv.h-before-using-it.patch diff --git a/package/php/0005-Check-for-sys-auxv.h-before-using-it.patch b/package/php/0005-Check-for-sys-auxv.h-before-using-it.patch new file mode 100644 index 0000000000..265bb4248c --- /dev/null +++ b/package/php/0005-Check-for-sys-auxv.h-before-using-it.patch @@ -0,0 +1,59 @@ +From f150702d5ab72878d45b722b6d7d4194db92c44a Mon Sep 17 00:00:00 2001 +From: Peter Seiderer +Date: Mon, 9 Mar 2020 15:36:48 +0100 +Subject: [PATCH] Check for sys/auxv.h before using it. + +Fixes aarch64 compile wiht uclibc-ng (does not provide +sys/auxv.h header file). + +Signed-off-by: Peter Seiderer +--- + configure.ac | 1 + + ext/standard/crc32.c | 9 +++++++-- + 2 files changed, 8 insertions(+), 2 deletions(-) + +diff --git a/configure.ac b/configure.ac +index 5219a5f2..caf62302 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -440,6 +440,7 @@ resolv.h \ + strings.h \ + syslog.h \ + sysexits.h \ ++sys/auxv.h \ + sys/ioctl.h \ + sys/file.h \ + sys/mman.h \ +diff --git a/ext/standard/crc32.c b/ext/standard/crc32.c +index c3ca5903..e59ab45f 100644 +--- a/ext/standard/crc32.c ++++ b/ext/standard/crc32.c +@@ -17,10 +17,15 @@ + */ + + #include "php.h" ++#ifdef PHP_WIN32 ++#include "config.w32.h" ++#else ++#include ++#endif + #include "basic_functions.h" + #include "crc32.h" + +-#if defined(__aarch64__) ++#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H) + # include + # if defined(__linux__) + # include +@@ -85,7 +90,7 @@ PHP_NAMED_FUNCTION(php_if_crc32) + + crc = crcinit^0xFFFFFFFF; + +-#if defined(__aarch64__) ++#if defined(__aarch64__) && defined(HAVE_SYS_AUXV_H) + if (has_crc32_insn()) { + crc = crc32_aarch64(crc, p, nr); + RETURN_LONG(crc^0xFFFFFFFF); +-- +2.25.1 +