From patchwork Sun Mar 10 09:46:27 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1054000 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.137; helo=fraxinus.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.b="iE5VpoH1"; 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 44HGbf5h7Xz9s5c for ; Sun, 10 Mar 2019 20:46:54 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id A892185792; Sun, 10 Mar 2019 09:46:51 +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 xoU_4DzCLgqG; Sun, 10 Mar 2019 09:46:48 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2EC26855CE; Sun, 10 Mar 2019 09:46:48 +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 A73D21BF5E0 for ; Sun, 10 Mar 2019 09:46:47 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id A469486FF9 for ; Sun, 10 Mar 2019 09:46:47 +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 K5kb4cZmnfRf for ; Sun, 10 Mar 2019 09:46:45 +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 hemlock.osuosl.org (Postfix) with ESMTPS id 5409486A07 for ; Sun, 10 Mar 2019 09:46:45 +0000 (UTC) Received: by mail-wr1-f65.google.com with SMTP id n2so1849721wrw.8 for ; Sun, 10 Mar 2019 01:46:45 -0800 (PST) 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=jYoDtlbZBSTK4zScwdAihUJSohU3i53ExQh77+CH6TM=; b=iE5VpoH1UWSYqd2jVl8mvSbDigcoQ2kh4es+5fWxaqE/NrtV9z+f3ecjQXQipjnpnt ydKeBNLt/9X46TUoMXbBsIlVs0E1gQi3AkZA6jqmWIuERZ+sEbbQzwc3Xr4JtOkYWbOF 0Dez79p6odRZqvZBYjFM3y/pS8oa5IRtl0XpsIYuwtwYPxr5z7W5GOcP9xym71ST1BHS vpljO5stqd6LSxRfz4bDzCpF2m483fkaz/ak4qt1ExluUb/4+npcq57yCz/sCi0Zfamc zsb23sFNWjiuB8pNB4jx705sBJPfPYPriucVdiXCYv+CFeHY3gPi57v2a1/p7dni3SAA 34tA== 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=jYoDtlbZBSTK4zScwdAihUJSohU3i53ExQh77+CH6TM=; b=uJ+mI3ZsYrt2Dpiy9nLTjJ/Qx+bnknWt8NNkijxRV7Fe2m2Vap+3d7IaO4diJRQS// BRRolq+t4dtguq+Jfq5DzEGh6JAEf4fMerf+c+2UkmHzeLUM9urxhIO4egai1ATZrVoc dVBS961859eoEQxsGyjOCLfij1Kl2owiZ67S/Bqr8nXUmEiKslLR8s+DjHonWm2Y83i/ CbZMF7BcXh5UeUIUXLR6gcA/6DZMdiK0mUwWssocbFtJ4tAQX/JKtak77pmdpF/ORNIQ P12xgkjGQLw66vncJfbs20gi/peO7mvQGljg9maKGubLdufPVTzt+zWzPVNb5efvhXpU 3P/A== X-Gm-Message-State: APjAAAWCbluIgXXuqzGXKxV8FC5J6D8m2kbpAu6O0HXFZZEgjL4IfdKL lKD3JbjKdG5b1OdL5/DX/PpSeV7s X-Google-Smtp-Source: APXvYqwU/DQ9lvqf9nMs6j7CE2gaxPZP18yL7UmjVIvoG/ydvtzuHD9J4XcTarELA4wJwCkYXXwkUg== X-Received: by 2002:a5d:6b43:: with SMTP id x3mr18040714wrw.76.1552211203567; Sun, 10 Mar 2019 01:46:43 -0800 (PST) Received: from kali.home (lfbn-ren-1-128-3.w83-205.abo.wanadoo.fr. [83.205.212.3]) by smtp.gmail.com with ESMTPSA id 12sm31951355wme.25.2019.03.10.01.46.42 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sun, 10 Mar 2019 01:46:42 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Sun, 10 Mar 2019 10:46:27 +0100 Message-Id: <20190310094627.20440-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/libdrm: fix build without fork 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 , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/8d6194982c1080e173fcef8212fb06e6dc275d58 Signed-off-by: Fabrice Fontaine --- ...-amdgpu-basic_tests.c-check-for-fork.patch | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 package/libdrm/0004-amdgpu-basic_tests.c-check-for-fork.patch diff --git a/package/libdrm/0004-amdgpu-basic_tests.c-check-for-fork.patch b/package/libdrm/0004-amdgpu-basic_tests.c-check-for-fork.patch new file mode 100644 index 0000000000..806c0c0fb7 --- /dev/null +++ b/package/libdrm/0004-amdgpu-basic_tests.c-check-for-fork.patch @@ -0,0 +1,64 @@ +From a5ba5f3c194aa68b1e944d6691ad5cbbb2766ba7 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Sun, 10 Mar 2019 09:44:11 +0100 +Subject: [PATCH libdrm] amdgpu/basic_tests.c: check for fork + +amdgpu test program use fork since +https://cgit.freedesktop.org/mesa/drm/commit/tests/amdgpu/basic_tests.c?id=736ef0b61cab55378202c5f49d91799cc2b99091 + +However, this function is not always available so add a check for it in +configure.ac and use it in tests/amdgpu/basic_tests.c + +Fixes: + - http://autobuild.buildroot.org/results/8d6194982c1080e173fcef8212fb06e6dc275d58 + +Signed-off-by: Fabrice Fontaine +[Upstream status: sent to dri-devel@lists.freedesktop.org] +--- + configure.ac | 2 ++ + tests/amdgpu/basic_tests.c | 4 ++++ + 2 files changed, 6 insertions(+) + +diff --git a/configure.ac b/configure.ac +index d72e84ad..6effb9a2 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -193,6 +193,8 @@ AC_CHECK_FUNCS([open_memstream], + [AC_DEFINE([HAVE_OPEN_MEMSTREAM], 1, [Have open_memstream()])], + [AC_DEFINE([HAVE_OPEN_MEMSTREAM], 0)]) + ++AC_CHECK_FUNCS([fork]) ++ + dnl Use lots of warning flags with with gcc and compatible compilers + + dnl Note: if you change the following variable, the cache is automatically +diff --git a/tests/amdgpu/basic_tests.c b/tests/amdgpu/basic_tests.c +index dbae4d53..c32a1351 100644 +--- a/tests/amdgpu/basic_tests.c ++++ b/tests/amdgpu/basic_tests.c +@@ -1646,10 +1646,12 @@ static void amdgpu_userptr_test(void) + while (j++ < sdma_write_length) + pm4[i++] = 0xdeadbeaf; + ++#ifdef HAVE_FORK + if (!fork()) { + pm4[0] = 0x0; + exit(0); + } ++#endif + + amdgpu_test_exec_cs_helper(context_handle, + AMDGPU_HW_IP_DMA, 0, +@@ -1675,7 +1677,9 @@ static void amdgpu_userptr_test(void) + r = amdgpu_cs_ctx_free(context_handle); + CU_ASSERT_EQUAL(r, 0); + ++#ifdef HAVE_FORK + wait(NULL); ++#endif + } + + static void amdgpu_sync_dependency_test(void) +-- +2.20.1 +