From patchwork Thu Apr 2 13:08:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Bisson X-Patchwork-Id: 1265583 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=boundarydevices.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=boundarydevices-com.20150623.gappssmtp.com header.i=@boundarydevices-com.20150623.gappssmtp.com header.a=rsa-sha256 header.s=20150623 header.b=SF/HXy0z; dkim-atps=neutral Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 48tNgL4gzZz9sRN for ; Fri, 3 Apr 2020 00:09:02 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id BB67585FD4; Thu, 2 Apr 2020 13:08:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id MHMguywGpVIL; Thu, 2 Apr 2020 13:08:55 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 0B12E85E8A; Thu, 2 Apr 2020 13:08:55 +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 D78881BF23F for ; Thu, 2 Apr 2020 13:08:53 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id C9B65888F6 for ; Thu, 2 Apr 2020 13:08:53 +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 itv++BOk5f+i for ; Thu, 2 Apr 2020 13:08:52 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f67.google.com (mail-wm1-f67.google.com [209.85.128.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 74E0A88970 for ; Thu, 2 Apr 2020 13:08:52 +0000 (UTC) Received: by mail-wm1-f67.google.com with SMTP id j19so3591841wmi.2 for ; Thu, 02 Apr 2020 06:08:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=boundarydevices-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=pV9cOZ2vTJ5d7+5Isl5zwfzt6hkfsmz1/jtVVfwFIDs=; b=SF/HXy0zdwA2tFQupuYtHwCVZncl1bPE8qP/rRyphf+Gts2LwQ9lDthcfLFRgnji5r 6iI5t7vmKoG/MMZ5/f/EiNHPkgbRWREVTXVl0KMsLQ0/G4s9MlJ7ZrOqkiOUqHf+6QY4 y0X7f5A5Ej+xatyb7WatVYy48owYHuLIv6anautDmJJND7GFLFnsC4usTovFF+g0ZhQj GQIXnaUHQLX6iST+8058sluiNF32+r5AZgMEJ0wIoXuF4DAnALLGVCOZAwqwAmCKhgRP v3J//1QCH4fjfHmgpcxXM63OJzO1ufiKqrRd4v/ixkn3obKBBQJFWw5ANJGAfHLKgxdS fG0Q== 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:in-reply-to :references:mime-version:content-transfer-encoding; bh=pV9cOZ2vTJ5d7+5Isl5zwfzt6hkfsmz1/jtVVfwFIDs=; b=Z8iLs+KcORNXCqYOGwnT8Fb+NEaO4Dt/JScn+7lriBCSzrJQ1DBQAjkkOn/I8GuD9G VNyIm/MZuETa9FTnc2fYzqvkM6nrgmZDzvjeQRI/MbKz4ICykNyLD9kS5cW46FH3/RY7 U481o+ykAmfNIH5ONiM2/WF1tiOr7IyjOzJBqgwSp4g0SRDdoIwQ4fCd8O2462ujV9s5 5vDLwo9PrM/7+KSZtf1CbJHL/7maKMJiKAAaKg2UyIOVWE7YeV/BOFssbfmW34ILW625 g7F8Gsff2Ny/bFAkccdEJKtaZupDrkFc9U8gYr+gFnXWZ68y6+6cqnjFc9cUnKfbAmyv BfQA== X-Gm-Message-State: AGi0PubxMa0eEEeQHUN8c2TKFfi7jJbbihp4pz0dPDFSSwyJwzhhxQQF uR02QawMDxC31F76300Z1hJRBoNbVcQ= X-Google-Smtp-Source: APiQypKPyXagllLhLl6otVnFVT1U7WJQJG6EuXNUAwa2hjTjY5QgedoTKZYCZ7JGf3NpnhtEv1ba1g== X-Received: by 2002:a1c:7f55:: with SMTP id a82mr3733866wmd.16.1585832929779; Thu, 02 Apr 2020 06:08:49 -0700 (PDT) Received: from p1g2.home (2a01cb000f89b400cc883edd44ec4519.ipv6.abo.wanadoo.fr. [2a01:cb00:f89:b400:cc88:3edd:44ec:4519]) by smtp.gmail.com with ESMTPSA id q11sm7417840wme.0.2020.04.02.06.08.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 02 Apr 2020 06:08:48 -0700 (PDT) From: Gary Bisson To: buildroot@buildroot.org Date: Thu, 2 Apr 2020 15:08:42 +0200 Message-Id: <20200402130842.918696-3-gary.bisson@boundarydevices.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20200402130842.918696-1-gary.bisson@boundarydevices.com> References: <20200402130842.918696-1-gary.bisson@boundarydevices.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/freescale-imx/imx-gpu-viv: fix build issue with Wayland backend 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: Gary Bisson , Refik Tuzakli Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Just like Jerome had to do with EGL_API_FB back in the days, in order to compile with Vivante header it is necessary to have some defines setup as the default behavior of eglplatform.h is to include Xlib.h. So this patch sets WL_EGL_PLATFORM when the Wayland backend is used. This option is actually declared in egl.pc but not all packages use pkg-config properly. Signed-off-by: Gary Bisson Tested-by: Heiko Thiery --- Fixes the following build issue (building weston): In file included from host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/egl.h:39, from ../libweston/renderer-gl/gl-renderer.h:36, from ../libweston/backend-drm/drm-gbm.c:42: host/aarch64-buildroot-linux-gnu/sysroot/usr/include/EGL/eglplatform.h:144:10: fatal error: X11/Xlib.h: No such file or directory 144 | #include --- package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk index 646d4e3673..cd9a9339b4 100644 --- a/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk +++ b/package/freescale-imx/imx-gpu-viv/imx-gpu-viv.mk @@ -59,9 +59,9 @@ define IMX_GPU_VIV_BUILD_CMDS endef ifeq ($(IMX_GPU_VIV_LIB_TARGET),fb) -define IMX_GPU_VIV_FIXUP_FB_HEADERS +define IMX_GPU_VIV_FIXUP_HEADERS $(SED) '39i\ - #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) \n\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ #define EGL_API_FB \n\ #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h endef @@ -77,6 +77,12 @@ ifeq ($(IMX_GPU_VIV_LIB_TARGET),wl) define IMX_GPU_VIV_FIXUP_PKGCONFIG ln -sf egl_wayland.pc $(@D)/gpu-core/usr/lib/pkgconfig/egl.pc endef +define IMX_GPU_VIV_FIXUP_HEADERS + $(SED) '39i\ + #if !defined(EGL_API_X11) && !defined(EGL_API_DFB) && !defined(EGL_API_FB) && !defined(WL_EGL_PLATFORM) \n\ + #define WL_EGL_PLATFORM\n\ + #endif' $(STAGING_DIR)/usr/include/EGL/eglplatform.h +endef endif ifeq ($(IMX_GPU_VIV_LIB_TARGET),x11) @@ -89,7 +95,7 @@ endif define IMX_GPU_VIV_INSTALL_STAGING_CMDS cp -r $(@D)/gpu-core/usr/* $(STAGING_DIR)/usr - $(IMX_GPU_VIV_FIXUP_FB_HEADERS) + $(IMX_GPU_VIV_FIXUP_HEADERS) $(IMX_GPU_VIV_FIXUP_PKGCONFIG) for lib in egl gbm glesv1_cm glesv2 vg; do \ $(INSTALL) -m 0644 -D \