From patchwork Fri Mar 19 21:27:37 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1456041 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=smtp3.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) 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=H6OeGVbA; dkim-atps=neutral Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4F2H9Z6yrGz9sR4 for ; Sat, 20 Mar 2021 08:30:10 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 371CC6FAFA; Fri, 19 Mar 2021 21:30:09 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id sV1eNAtqsTCx; Fri, 19 Mar 2021 21:30:08 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by smtp3.osuosl.org (Postfix) with ESMTP id 5E9846F845; Fri, 19 Mar 2021 21:30:07 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from smtp3.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 8F2111BF337 for ; Fri, 19 Mar 2021 21:30:05 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp3.osuosl.org (Postfix) with ESMTP id 76C826F845 for ; Fri, 19 Mar 2021 21:30:05 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from smtp3.osuosl.org ([127.0.0.1]) by localhost (smtp3.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id K46W3E48ZOi8 for ; Fri, 19 Mar 2021 21:30:04 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.8.0 Received: from mail-wr1-x429.google.com (mail-wr1-x429.google.com [IPv6:2a00:1450:4864:20::429]) by smtp3.osuosl.org (Postfix) with ESMTPS id 6187E6E56C for ; Fri, 19 Mar 2021 21:30:04 +0000 (UTC) Received: by mail-wr1-x429.google.com with SMTP id b9so10482740wrt.8 for ; Fri, 19 Mar 2021 14:30:04 -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=0mB/gI8SNaOWmbAHiPoh1WYcC1eXArEIWg7YxnbUfgo=; b=H6OeGVbA0uQiA144xwEKSueQ+5FXV8Tz4tNNcK6Ek+jvdat+DFOMtl5HOIMNO+WJYB 7ThSyTlJfe06tEBhsEjE3kBHH/f2O/o/9YWprartrs7YHXzomVMSwPKp6zz2YxTU9QCp mCUR0GeqjRmm8E+CbJwjLoRaE7lNxs3KvfUq+YLj7IKK7SNf7Rkz0n6CNjJt4Zb0YEKm XX/ckSS92oC86Z4cSMKXlcwDmCtkpq6ccSng05mBKz0b0oVoI1UZPOyiUXCbAnDXcCgE Q6kUikz5apwgUC+QtlGiCF60D+GLnhdkf3o3GZJkhWXx+EudI+pkcUJPXIGRfyR5DZRE 4IKg== 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=0mB/gI8SNaOWmbAHiPoh1WYcC1eXArEIWg7YxnbUfgo=; b=kJPJfW50crBGyoNtZgIDFyShhcJ81ouMdl+K4ZnDv14pwW1sFJpc3w0a9jYJ/eQvje 7YGioqP5o9Ii+T4r14XBQfC5M2FAy4oqK1BCAVL2KeZqi7DwJ7qXWO7U+k3RpcR8pQIZ 3SA96Ndpt+/3mYCzNsrUBB2xre0MwYTftNpjo9VPxTqAcurQL3+PXYm80jKnRhFRv6hb SKcvGY9yfM5Jj5wfrqON0VZrZx/SNCj477IxvCgoumW8sY94u6S27PRqb1v6FOkOFJLq +aARUJkvwXKjmKUyJeQ2oQjt4cTWjUUlRAZ6biprgiu97Sv3R65ip7VEdkSA/mUoOGsx LIiw== X-Gm-Message-State: AOAM531ag1hoQj4fncQ616BknjvGmdH0aGQNmdNEN3OpNOMPZ1hIiEN3 4Tm5pNgSPFxK7rweKebkV3XCy9VrvmU= X-Google-Smtp-Source: ABdhPJwbxdwOrlehFQMzkgZq9VYyiq1ahFFrui3S78FR9B+BEnxXRDp3apZOBpe2F0kSFeSFhT5Mlw== X-Received: by 2002:a05:6000:114e:: with SMTP id d14mr6585639wrx.236.1616189402171; Fri, 19 Mar 2021 14:30:02 -0700 (PDT) Received: from kali.home (lfbn-ren-1-358-30.w2-10.abo.wanadoo.fr. [2.10.19.30]) by smtp.gmail.com with ESMTPSA id f2sm9961418wrq.34.2021.03.19.14.30.01 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 19 Mar 2021 14:30:01 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Fri, 19 Mar 2021 22:27:37 +0100 Message-Id: <20210319212737.353274-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.30.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/janet: fix build without threads 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: Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fix build of janet without threads which is broken since its addition in commit 9a5c9c058cbb250cfb9519347507a030e157ed16 Fixes: - http://autobuild.buildroot.org/results/dd894a7178a395ea29912804132b1516934e8fa3 Signed-off-by: Fabrice Fontaine --- ...eson.build-fix-build-without-threads.patch | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 package/janet/0003-meson.build-fix-build-without-threads.patch diff --git a/package/janet/0003-meson.build-fix-build-without-threads.patch b/package/janet/0003-meson.build-fix-build-without-threads.patch new file mode 100644 index 0000000000..e6c9e878b4 --- /dev/null +++ b/package/janet/0003-meson.build-fix-build-without-threads.patch @@ -0,0 +1,72 @@ +From a7abe11105ac71081455fb4ff0400606bf1668e8 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Thu, 18 Mar 2021 09:00:23 +0100 +Subject: [PATCH] meson.build: fix build without threads + +Fix the following build failure with -Dsingle_threaded=true on embedded +toolchains without pthread: + +FAILED: janet.p/meson-generated_.._janet.c.o +/home/buildroot/autobuild/run/instance-3/output-1/host/bin/arm-linux-gcc -Ijanet.p -I. -I.. -I../src/include -fdiagnostics-color=always -pipe -Wall -Winvalid-pch -std=c99 -O3 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -pthread -fvisibility=hidden -MD -MQ janet.p/meson-generated_.._janet.c.o -MF janet.p/meson-generated_.._janet.c.o.d -o janet.p/meson-generated_.._janet.c.o -c janet.c +In file included from /home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/stdlib.h:24, + from ../src/include/janet.h:300, + from src/core/features.h:57: +/home/buildroot/autobuild/run/instance-3/output-1/host/arm-buildroot-linux-uclibcgnueabihf/sysroot/usr/include/features.h:218:5: warning: #warning requested reentrant code, but thread support was disabled [-Wcpp] + 218 | # warning requested reentrant code, but thread support was disabled + | ^~~~~~~ +src/core/ev.c:39:10: fatal error: pthread.h: No such file or directory + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/janet-lang/janet/commit/a7abe11105ac71081455fb4ff0400606bf1668e8] +--- + meson.build | 13 +++++++++---- + 1 file changed, 9 insertions(+), 4 deletions(-) + +diff --git a/meson.build b/meson.build +index ea8c2f2e..d6c6c069 100644 +--- a/meson.build ++++ b/meson.build +@@ -60,7 +60,7 @@ conf.set('JANET_NO_SOURCEMAPS', not get_option('sourcemaps')) + conf.set('JANET_NO_ASSEMBLER', not get_option('assembler')) + conf.set('JANET_NO_PEG', not get_option('peg')) + conf.set('JANET_NO_NET', not get_option('net')) +-conf.set('JANET_NO_EV', not get_option('ev')) ++conf.set('JANET_NO_EV', not get_option('ev') or get_option('single_threaded')) + conf.set('JANET_REDUCED_OS', get_option('reduced_os')) + conf.set('JANET_NO_TYPED_ARRAY', not get_option('typed_array')) + conf.set('JANET_NO_INT_TYPES', not get_option('int_types')) +@@ -173,9 +173,14 @@ janetc = custom_target('janetc', + 'JANET_PATH', janet_path, 'JANET_HEADERPATH', header_path + ]) + ++janet_dependencies = [m_dep, dl_dep] ++if not get_option('single_threaded') ++ janet_dependencies += thread_dep ++endif ++ + libjanet = library('janet', janetc, + include_directories : incdir, +- dependencies : [m_dep, dl_dep, thread_dep], ++ dependencies : janet_dependencies, + version: meson.project_version(), + soversion: version_parts[0] + '.' + version_parts[1], + install : true) +@@ -189,7 +194,7 @@ else + endif + janet_mainclient = executable('janet', janetc, mainclient_src, + include_directories : incdir, +- dependencies : [m_dep, dl_dep, thread_dep], ++ dependencies : janet_dependencies, + c_args : extra_cflags, + install : true) + +@@ -202,7 +207,7 @@ if meson.is_cross_build() + endif + janet_nativeclient = executable('janet-native', janetc, mainclient_src, + include_directories : incdir, +- dependencies : [m_dep, dl_dep, thread_dep], ++ dependencies : janet_dependencies, + c_args : extra_native_cflags, + native : true) + else