From patchwork Sat Jun 6 06:43:09 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1304468 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=ChpE1Z//; 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 49f9415sQFz9sRh for ; Sat, 6 Jun 2020 16:44:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id CA127884FB; Sat, 6 Jun 2020 06:44:43 +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 Mz+R43OEn9Vt; Sat, 6 Jun 2020 06:44:39 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id BEADB88524; Sat, 6 Jun 2020 06:44:39 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 8C3D31BF5DD for ; Sat, 6 Jun 2020 06:44:38 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 88B9886C6E for ; Sat, 6 Jun 2020 06:44:38 +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 loE2NyUwmQxN for ; Sat, 6 Jun 2020 06:44:37 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f65.google.com (mail-wr1-f65.google.com [209.85.221.65]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 1276F86B51 for ; Sat, 6 Jun 2020 06:44:37 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id r7so11878220wro.1 for ; Fri, 05 Jun 2020 23:44:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2yicdRGPGRgDozM7e9DtYfy4LE/mkoGUmA9YXvNT7ww=; b=ChpE1Z//wyb/e7pmzxKyVGlMegXZ/Zu/xgst6jcRwBjTPaNih8Rb8t/MMCINnFlrgM 7nU7xJDFYZkS47D9RHYokTaaGh5ModjSCRRcsO6u78brmoE4wcM1QGFU2ReFODv8BPh6 BcezDx0vxok4QjDzwPV2zJ39bk6QHlfmqCtcg7mfMmwhx3Kxn6lrb/YDKh2xuUZHE2XV bEFRDjLKNfnQc3GPNvpwUeKx7NmGq98dxO7ligF9B5DSqgiAvUVXy4Yi1sv7bOBFV3Fx befP6Rgpo1F1LHNaCamOfsEkxUb/KPJgzfhUi5zHMf/+sWAd7ZySvmHgyLDpANmB6cOL CbTA== 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=2yicdRGPGRgDozM7e9DtYfy4LE/mkoGUmA9YXvNT7ww=; b=hSPaKruFDdnoP/FyfNmfc3los790NIvANiHROVqCRasAh3155DKvw8UsaYeVk0UZjb x8YduZ71vfZS7UXlcrjmPSvVpDLcbjkpDYv+mhMXum84W7+RMAcatYOcajVev7Qjexs+ BOET9tAceJW2LqPLCD0E1YQ/IrsD+LxY/J54N8j7JMKavc3m03jE7JkWBCJwULinuGBZ hqVFw08n03886iKhjXIHdYnZLzM6TwNXb+H+sh2x6qfEjSnIa453Gn17ki12Ics61Yah vDbVWeTV4g78/Bz9K3GQlEvmf87T6jvCXvFXKpQJ1yzoWfYzfO+cQiEbQ1Rha9TK8P/e 5GAA== X-Gm-Message-State: AOAM533uxolBJe5g6w1QzIeyxP7sUZw/HFDT6mQu7CYeh1oMdvbkgyNA W4pACqCbekf/AoQYE2YaWhFd7i8c X-Google-Smtp-Source: ABdhPJxWVaXGaWkmkq5Fxm9EbpPHSXFkhaQf7RgPx0KTdu9cfX0yF467owr030/XZq6of9l5tvAzyg== X-Received: by 2002:a5d:4bcb:: with SMTP id l11mr14171701wrt.363.1591425874867; Fri, 05 Jun 2020 23:44:34 -0700 (PDT) Received: from t450s.fritz.box (ip5b426f84.dynamic.kabel-deutschland.de. [91.66.111.132]) by smtp.gmail.com with ESMTPSA id k17sm15739793wrl.54.2020.06.05.23.44.33 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Jun 2020 23:44:34 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Sat, 6 Jun 2020 08:43:09 +0200 Message-Id: <20200606064309.3466-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v1 1/1] package/libdrm: fix build failure 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: Bernd Kuhls , Heiko Thiery Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Add patch to fix build failure with Sourcery Codebench toolchain. The patch is provided upstream: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/75 Fixes: http://autobuild.buildroot.net/results/b7910460015b077fcb2431da608c34f95c2f2fbb/ Signed-off-by: Heiko Thiery --- .../0003-xf86drm.c-fix-build-failure.patch | 84 +++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 package/libdrm/0003-xf86drm.c-fix-build-failure.patch diff --git a/package/libdrm/0003-xf86drm.c-fix-build-failure.patch b/package/libdrm/0003-xf86drm.c-fix-build-failure.patch new file mode 100644 index 0000000000..ba84114f14 --- /dev/null +++ b/package/libdrm/0003-xf86drm.c-fix-build-failure.patch @@ -0,0 +1,84 @@ +From c7d89412884de2dbfa543720d185027377e62f21 Mon Sep 17 00:00:00 2001 +From: Heiko Thiery +Date: Fri, 5 Jun 2020 23:46:52 +0200 +Subject: [PATCH] xf86drm.c: fix build failure + +./xf86drm.c: In function 'drmNodeIsDRM': +../xf86drm.c:2825:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmGetMinorNameForFD': +../xf86drm.c:2938:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmParsePciBusInfo': +../xf86drm.c:3258:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmParsePciDeviceInfo': +../xf86drm.c:3427:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ +../xf86drm.c: In function 'drmGetDeviceNameFromFd2': +../xf86drm.c:4305:7: error: "__FreeBSD__" is not defined [-Werror=undef] + #elif __FreeBSD__ + ^ + +Signed-off-by: Heiko Thiery +[A merge-request with this fix is opened at https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/75] +--- + xf86drm.c | 10 +++++----- + 1 file changed, 5 insertions(+), 5 deletions(-) + +diff --git a/xf86drm.c b/xf86drm.c +index 07a18c44..50a6f092 100644 +--- a/xf86drm.c ++++ b/xf86drm.c +@@ -2822,7 +2822,7 @@ static bool drmNodeIsDRM(int maj, int min) + snprintf(path, sizeof(path), "/sys/dev/char/%d:%d/device/drm", + maj, min); + return stat(path, &sbuf) == 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + char name[SPECNAMELEN]; + + if (!devname_r(makedev(maj, min), S_IFCHR, name, sizeof(name))) +@@ -2935,7 +2935,7 @@ static char *drmGetMinorNameForFD(int fd, int type) + + closedir(sysdir); + return NULL; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + struct stat sbuf; + char dname[SPECNAMELEN]; + const char *mname; +@@ -3255,7 +3255,7 @@ static int drmParsePciBusInfo(int maj, int min, drmPciBusInfoPtr info) + info->func = pinfo.func; + + return 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + return get_sysctl_pci_bus_info(maj, min, info); + #else + #warning "Missing implementation of drmParsePciBusInfo" +@@ -3424,7 +3424,7 @@ static int drmParsePciDeviceInfo(int maj, int min, + device->subdevice_id = pinfo.subdevice_id; + + return 0; +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + drmPciBusInfo info; + struct pci_conf_io pc; + struct pci_match_conf patterns[1]; +@@ -4302,7 +4302,7 @@ drm_public char *drmGetDeviceNameFromFd2(int fd) + free(value); + + return strdup(path); +-#elif __FreeBSD__ ++#elif defined(__FreeBSD__) + return drmGetDeviceNameFromFd(fd); + #else + struct stat sbuf; +-- +2.20.1 +