From patchwork Sun Dec 8 18:58:22 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Paul Cercueil X-Patchwork-Id: 1205734 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=fail (p=none dis=none) header.from=crapouillou.net Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=crapouillou.net header.i=@crapouillou.net header.b="INmmsmrQ"; 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 47WFwM65zKz9sP3 for ; Mon, 9 Dec 2019 05:58:43 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 7033C20456; Sun, 8 Dec 2019 18:58:41 +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 CbWvuakfm+Te; Sun, 8 Dec 2019 18:58:38 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D424C203E7; Sun, 8 Dec 2019 18:58:37 +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 213CB1BF592 for ; Sun, 8 Dec 2019 18:58:36 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 1C5F486788 for ; Sun, 8 Dec 2019 18:58:36 +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 XWjMOdL+EekQ for ; Sun, 8 Dec 2019 18:58:35 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from crapouillou.net (outils.crapouillou.net [89.234.176.41]) by whitealder.osuosl.org (Postfix) with ESMTPS id EA87486786 for ; Sun, 8 Dec 2019 18:58:34 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1575831510; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-transfer-encoding:content-transfer-encoding: in-reply-to:references; bh=aVOx9iWGrC9x2J8e7/BY5OZmBtFXzzRbqnmDxIXF7lY=; b=INmmsmrQrVoybfXSsjWmF20ntDwfpHhLD9Ihw+Jra9cV7OSn76KqYVu1FebKgmbQc+wDXr B+pW1dzjzmvBn4Rz5PwS6jW03yEmlH5i+R4xsA73E62F/L1daHLo+cw5WEBq1rPbx22H0o zcM9gvFCI4avRXFBNXEN5sgmsd9/2nU= From: Paul Cercueil To: buildroot@busybox.net Date: Sun, 8 Dec 2019 19:58:22 +0100 Message-Id: <20191208185822.163008-1-paul@crapouillou.net> MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/apitrace: Fix build under uClibc/musl 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: Paul Cercueil , od@zcrc.me Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add a patch which has been merged upstream (PR: https://github.com/apitrace/apitrace/pull/644) which allows apitrace to be compiled under uClibc and musl. Signed-off-by: Paul Cercueil --- .../0001-dlsym-Fix-build-under-uClibc.patch | 30 +++++++++++++++++++ package/apitrace/Config.in | 6 ++-- 2 files changed, 32 insertions(+), 4 deletions(-) create mode 100644 package/apitrace/0001-dlsym-Fix-build-under-uClibc.patch diff --git a/package/apitrace/0001-dlsym-Fix-build-under-uClibc.patch b/package/apitrace/0001-dlsym-Fix-build-under-uClibc.patch new file mode 100644 index 0000000000..73286c4cbf --- /dev/null +++ b/package/apitrace/0001-dlsym-Fix-build-under-uClibc.patch @@ -0,0 +1,30 @@ +From 189a3b8397c61ba262a2221885e38dc514c59d94 Mon Sep 17 00:00:00 2001 +From: Paul Cercueil +Date: Sat, 7 Dec 2019 00:00:57 +0100 +Subject: [PATCH] dlsym: Fix build under uClibc + +uClibc defines the __GLIBC__ macro too (I know, right?), so verify that +__UCLIBC__ is not defined before we can use glibc-specific internal +functions. + +Signed-off-by: Paul Cercueil +--- + wrappers/dlsym.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/wrappers/dlsym.cpp b/wrappers/dlsym.cpp +index 2eda082a..5ab8465b 100644 +--- a/wrappers/dlsym.cpp ++++ b/wrappers/dlsym.cpp +@@ -34,7 +34,7 @@ + #include "os.hpp" + + +-#ifdef __GLIBC__ ++#if defined(__GLIBC__) && !defined(__UCLIBC__) + + + #include +-- +2.24.0 + diff --git a/package/apitrace/Config.in b/package/apitrace/Config.in index c1be619f1b..45b4c307bb 100644 --- a/package/apitrace/Config.in +++ b/package/apitrace/Config.in @@ -1,11 +1,9 @@ -comment "apitrace needs a glibc toolchain w/ C++, gcc >= 4.9" - depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_USES_GLIBC \ - || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 +comment "apitrace needs a toolchain w/ C++, gcc >= 4.9" + depends on !BR2_INSTALL_LIBSTDCPP || !BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 config BR2_PACKAGE_APITRACE bool "apitrace" depends on BR2_INSTALL_LIBSTDCPP - depends on BR2_TOOLCHAIN_USES_GLIBC # uses glibc specific __libc_dlsym depends on BR2_TOOLCHAIN_GCC_AT_LEAST_4_9 select BR2_PACKAGE_XLIB_LIBX11 if BR2_PACKAGE_XORG7 select BR2_PACKAGE_LIBPNG