From patchwork Tue Sep 15 09:46:22 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1364188 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=ZiCxHx68; 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 4BrJKJ1xl5z9sVB for ; Tue, 15 Sep 2020 19:46:44 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 2968687117; Tue, 15 Sep 2020 09:46:40 +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 GCa-rbqwTK7H; Tue, 15 Sep 2020 09:46:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5B74E86FE2; Tue, 15 Sep 2020 09:46:36 +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 456A41BF28B for ; Tue, 15 Sep 2020 09:46:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 422FD86FE1 for ; Tue, 15 Sep 2020 09:46:35 +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 1QqTH2CwCn9t for ; Tue, 15 Sep 2020 09:46:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id 7F20286FDF for ; Tue, 15 Sep 2020 09:46:34 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id c18so2554795wrm.9 for ; Tue, 15 Sep 2020 02:46:34 -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=Y7GfliGdVJHY0YGdfvT82NHC2wEDKx2ihY9Dnm8mq2s=; b=ZiCxHx68b+VE4GeCCt0eFuvCjuO2U8F1ZhxNvxXQFzyTtZyhWTH0Q5rZMCSFAOFcU+ R3RmviOEen/sWM7fpnPSm/P5ePhMkwR6H62q40RST77d1lLPUlvi7xXjEoQ/a1psUCm8 Y2bsJ3m3Rv92oZrLCWPn0t9UPLiah1yx3DTnCiuC6odzWA980uymSP37RpPLylMLdE9Z 29tsijnDoJpUhYkQxj7Y7l33xwMioCbXZWjS+i7G60QcDC8hBfRHZJ+Kou+KyN/0vuDT QeSVLBX9H+j4Sm14wLrsKKQKgm8X4vz9gh3dbqI1QvUspvlsu84Pvs/n6LlO8RZDNd8Z i9sQ== 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=Y7GfliGdVJHY0YGdfvT82NHC2wEDKx2ihY9Dnm8mq2s=; b=ueBJQ+eZ8gZz4XGG5+XBjAJWXX8gG7JgO3A2zbqESE7UzcVBU98rY055u0vsL5WkY6 yht4572hugvx4c05TNwwbNYKO+3mrqqzFf5MqGrZg1dl8lP62vab7MsIsOpr1k0YzQGq WyAbeqHVDfrHtPPer/1J8fkx8kOYEPlYcwju4KFc2Z/xxa3FtmTKeIEk4Yg7E9vUs3jl TMbmlrRmszRRJ1iHoMctLNc63QO6dYJljJxFPJk4Q8WYfJSbN28yZKeyjQX4e3qS7sdi 4t6cE9ZrrdHe3bL90qL2eoz7t80t6t1zhzfK7Z2MCoSkprzHIWTHoiTnVlk4l6FX1wkb 68Gg== X-Gm-Message-State: AOAM531nSvrG1NvWsDWIFnYtnNwmcW0NQGkDmkviED3gjJw/XB/D/sAH w+8rYw9ikzz/vvWnVg+pJuVSy3NZ8T8= X-Google-Smtp-Source: ABdhPJzDfuZXCmv4L9G/1X6G0M6qzCR5oxy0ueyDIYLbXTnmus2i/WNb0PbvYRmtgEsuYss8bu4KDg== X-Received: by 2002:adf:c44d:: with SMTP id a13mr20119502wrg.11.1600163192768; Tue, 15 Sep 2020 02:46:32 -0700 (PDT) Received: from lano-work.andritz.com ([80.120.136.76]) by smtp.gmail.com with ESMTPSA id y5sm23870413wmg.21.2020.09.15.02.46.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 02:46:32 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 15 Sep 2020 11:46:22 +0200 Message-Id: <20200915094625.598048-1-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] package/pkg-meson.mk: fix generation of pkg_config_static prop 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: Eric Le Bihan , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" fixes following in the generated cross-complation.conf file: pkg_config_static = '$(if $(BR2_STATIC_LIBS),true,false)' Signed-off-by: Norbert Lange --- package/pkg-meson.mk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index c3fe6df5d0..7d103add98 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -195,7 +195,7 @@ define PKG_MESON_INSTALL_CROSS_CONF -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g" \ -e 's%@HOST_DIR@%$(HOST_DIR)%g' \ -e 's%@STAGING_DIR@%$(STAGING_DIR)%g' \ - -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \ + -e 's%@STATIC@%$$(if $(BR2_STATIC_LIBS),true,false)%g' \ $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ > $(HOST_DIR)/etc/meson/cross-compilation.conf.in sed -e 's%@PKG_TARGET_CFLAGS@%%g' \ From patchwork Tue Sep 15 09:46:23 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1364189 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.138; helo=whitealder.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=HQR2NdcO; dkim-atps=neutral Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BrJKL6Hghz9sVB for ; Tue, 15 Sep 2020 19:46:46 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 435C486686; Tue, 15 Sep 2020 09:46:44 +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 Ada-u1Hfx4Hq; Tue, 15 Sep 2020 09:46:42 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id 77FCD863D5; Tue, 15 Sep 2020 09:46:42 +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 91A081BF28B for ; Tue, 15 Sep 2020 09:46:41 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 8E76087059 for ; Tue, 15 Sep 2020 09:46:41 +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 oUjATgQyIhwl for ; Tue, 15 Sep 2020 09:46:41 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by hemlock.osuosl.org (Postfix) with ESMTPS id EAC1486FE5 for ; Tue, 15 Sep 2020 09:46:40 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id j2so2570772wrx.7 for ; Tue, 15 Sep 2020 02:46:40 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=f28W4BtQjpYABSS7nQNZk3d6UEOryH4D7Ej5Aeeu1qc=; b=HQR2NdcOSJz7QTMGNwVGZgEYob36NnFmXmQqSx+KgkvWmufLpw9rJJ1B0msw2STURd qtDfdIaWuZT1IEelPErhZDFHMmai7ET9DyXDCHmTCqtPPUWxQiqjCInkrpJ5fOJs31u0 5/33g/aOF3f6R4KEXfMuXQvY3M8dlg1IRrLPTa1ixDql7TDwKSVUz0Xm7zCk1Or8+5Eh 1vfZhr1lP6nmGqNn/MmupOngN0i4VDeCiwLsAZPjZE6ajk2+bdZMbs1e9Z88ztvkSwMD kn5QviBz2svIl+HWNlDi3gY/q72l/jhYJXxVx2+VW21weXt31gJDzYa69AvTFfIAMRUq mloQ== 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=f28W4BtQjpYABSS7nQNZk3d6UEOryH4D7Ej5Aeeu1qc=; b=XOUuBpxTirNj75FyPVQRIF+DlCmWsxurRPLe8r18iKteX6w4DusQyPkaOu4x24vGnn sAPcE2MRkVu5POUrQyNfbPPf7+JFAZPxMo6AbZtdQXXPwTl4BsRHjwOBht8c1ymsGnoQ e42GNgN/qI7XiWfUweyUNFOpy2Djz1ljYRHsrtUb61dnNkAf4kyeKPM4x4zvIjNxZc4R Wby1ih8olNjYeZNVTyd8m1lilwNLgFDUIeXeWz3qSYmtprVbyh8mhYVg7H6DGyYK84Hd haIPv+I5KxHyIz2cn3n6GUWo773F7pASeXjGVPwgjCkwzqcS5W4lfOmSkjEHfH1q2++i T76g== X-Gm-Message-State: AOAM53243G9GymJRJIs1RhPwlpqXM5KkpejCSFY1PF7114Ct9ZdK3DJK ctyUZM5OkS52sPPD/MpwD9Dy3FetzKE= X-Google-Smtp-Source: ABdhPJyR8HGtGqjweolU7ZfFCJuq2yhNhYVUa4Aoihs4CqQZADAmFXgDX8ahPBtiOzDk1dfoWt+ZxA== X-Received: by 2002:adf:e6c8:: with SMTP id y8mr22258471wrm.229.1600163199279; Tue, 15 Sep 2020 02:46:39 -0700 (PDT) Received: from lano-work.andritz.com ([80.120.136.76]) by smtp.gmail.com with ESMTPSA id y5sm23870413wmg.21.2020.09.15.02.46.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 02:46:38 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 15 Sep 2020 11:46:23 +0200 Message-Id: <20200915094625.598048-2-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915094625.598048-1-nolange79@gmail.com> References: <20200915094625.598048-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/3] package/meson: use specific BR variables for cross-compilation.conf 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: Eric Le Bihan , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" dont depend on specific names of compiler tools, but use existing Buildroot variables. Signed-off-by: Norbert Lange --- package/meson/cross-compilation.conf.in | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/package/meson/cross-compilation.conf.in b/package/meson/cross-compilation.conf.in index e9344e2b2f..67c5da8156 100644 --- a/package/meson/cross-compilation.conf.in +++ b/package/meson/cross-compilation.conf.in @@ -4,11 +4,11 @@ # - Buildroot's 'target' is Meson's 'host' [binaries] -c = '@TARGET_CROSS@gcc' -cpp = '@TARGET_CROSS@g++' -ar = '@TARGET_CROSS@ar' -strip = '@TARGET_CROSS@strip' -pkgconfig = '@HOST_DIR@/bin/pkgconf' +c = '@TARGET_CC@' +cpp = '@TARGET_CXX@' +ar = '@TARGET_AR@' +strip = '@TARGET_STRIP@' +pkgconfig = '@PKG_CONFIG_HOST_BINARY@' g-ir-compiler = '@STAGING_DIR@/usr/bin/g-ir-compiler' g-ir-scanner = '@STAGING_DIR@/usr/bin/g-ir-scanner' From patchwork Tue Sep 15 09:46:24 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Norbert Lange X-Patchwork-Id: 1364190 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=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=Zb+BQGoI; 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 4BrJKX57Xyz9sVB for ; Tue, 15 Sep 2020 19:46:56 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9922720110; Tue, 15 Sep 2020 09:46:51 +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 3CrRPYpt21GU; Tue, 15 Sep 2020 09:46:45 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8EE5220354; Tue, 15 Sep 2020 09:46:45 +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 2D0321BF28B for ; Tue, 15 Sep 2020 09:46:44 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 29D9586341 for ; Tue, 15 Sep 2020 09:46:44 +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 a-QFKsBIr0de for ; Tue, 15 Sep 2020 09:46:43 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) by fraxinus.osuosl.org (Postfix) with ESMTPS id D414E862A5 for ; Tue, 15 Sep 2020 09:46:42 +0000 (UTC) Received: by mail-wr1-f53.google.com with SMTP id a17so2581742wrn.6 for ; Tue, 15 Sep 2020 02:46:42 -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:in-reply-to:references :mime-version:content-transfer-encoding; bh=O0bhPPxT+ton0qCNNt0pnKwS56bP+NAWBBwPjOiyV9w=; b=Zb+BQGoIw2p4T2x1ZYv55qK6Giw9mGTgYA4AYkv7EnfUZOC/SBDDccqeXe9UNo4rYY YZcMiZ1eDffx8GlkYNSmlobF2nx7VLKi22rSejthaH8YZVbWQHJmjYi535xNkoo/y5s6 7MRVGjvwaN3r7v69eAgXvyTdKfcf32zxRlmkFJAEM1Kxujog9ISlxXVxyisHqsMcHN79 +Xpj3FG6GVHYrwHD4MjEytKFKltN16pJpvehiDYBkATLRcBzUtOrjcUih0tsx82maDVc 2Mn+Kgfd6esf8HstOIs8yJKc9FcObaE+JOGytggSibW+mMPjkE/BTJ6+uitoiQiDwB3R 6Fxw== 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=O0bhPPxT+ton0qCNNt0pnKwS56bP+NAWBBwPjOiyV9w=; b=H3cagxLViRT2swy7apct/IAkvj55/w2b8D329bx5hJNGhIIJfFF1XFhAA7j30A+gLc HqDeT0y91ZheTm5VmWCPjyN37vzCJyTZW/SaN4ma5+KuJ+tEIA4xhtUMPIDmI6YrPb+w watziyAZ4+ro/2QVT2V6WmybgPTs9Y6TmQhPs6u08qcj9gT2Z+7zbFaY1or1wqiBFx+6 Xhrrn5FJ+hFQNC4B4GWNPj2xOvlTC0B/VbjheQYVlELQ+vdTzfQvuGmSteoz38Jjn5kI pvlyNodJvXSKqfwjSonemiiXvxlrtg6/Fpx8UfwPVKoiCj8ouR9Lf/nqEg11A2K7aUT7 OQmQ== X-Gm-Message-State: AOAM5303bCkGhJkijLMMKdHuvZnL0mWitEZKugf3OTcjh6dVeu/b4g1x O7IwD9AJa6osICOaQK/0LgBRA/HFd9o= X-Google-Smtp-Source: ABdhPJxpxgkG7G7rPdEoLf1REaigkEHsOHHMUmY6epm1M7WGcqNy1udI+iNibCZXtKuxHB3UHN1iQw== X-Received: by 2002:adf:f504:: with SMTP id q4mr20159348wro.353.1600163200772; Tue, 15 Sep 2020 02:46:40 -0700 (PDT) Received: from lano-work.andritz.com ([80.120.136.76]) by smtp.gmail.com with ESMTPSA id y5sm23870413wmg.21.2020.09.15.02.46.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 15 Sep 2020 02:46:40 -0700 (PDT) From: Norbert Lange To: buildroot@buildroot.org Date: Tue, 15 Sep 2020 11:46:24 +0200 Message-Id: <20200915094625.598048-3-nolange79@gmail.com> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200915094625.598048-1-nolange79@gmail.com> References: <20200915094625.598048-1-nolange79@gmail.com> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 3/3] package/pkg-meson: move crosscompilation support out of package 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: Eric Le Bihan , Norbert Lange Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" install the cross-compilation.conf file when setting up the toolchain, not as part of host-meson. This allows external usage of the buildroot toolchain through meson, whether the host-meson package is built or not (similar to other build systems). Removed a few variables, as they were only used to communicate between meson package and pkg-meson and are needed anymore. Signed-off-by: Norbert Lange --- package/meson/meson.mk | 32 ------- package/pkg-meson.mk | 90 ++++++++++++------- .../misc}/cross-compilation.conf.in | 0 3 files changed, 60 insertions(+), 62 deletions(-) rename {package/meson => support/misc}/cross-compilation.conf.in (100%) diff --git a/package/meson/meson.mk b/package/meson/meson.mk index 8633a2f717..acbd21b6f1 100644 --- a/package/meson/meson.mk +++ b/package/meson/meson.mk @@ -13,38 +13,6 @@ MESON_SETUP_TYPE = setuptools HOST_MESON_DEPENDENCIES = host-ninja HOST_MESON_NEEDS_HOST_PYTHON = python3 -HOST_MESON_TARGET_ENDIAN = $(call qstrip,$(call LOWERCASE,$(BR2_ENDIAN))) -HOST_MESON_TARGET_CPU = $(GCC_TARGET_CPU) - -# https://mesonbuild.com/Reference-tables.html#cpu-families -ifeq ($(BR2_arcle)$(BR2_arceb),y) -HOST_MESON_TARGET_CPU_FAMILY = arc -else ifeq ($(BR2_arm)$(BR2_armeb),y) -HOST_MESON_TARGET_CPU_FAMILY = arm -else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) -HOST_MESON_TARGET_CPU_FAMILY = aarch64 -else ifeq ($(BR2_i386),y) -HOST_MESON_TARGET_CPU_FAMILY = x86 -else ifeq ($(BR2_mips)$(BR2_mipsel),y) -HOST_MESON_TARGET_CPU_FAMILY = mips -else ifeq ($(BR2_mips64)$(BR2_mips64el),y) -HOST_MESON_TARGET_CPU_FAMILY = mips64 -else ifeq ($(BR2_powerpc),y) -HOST_MESON_TARGET_CPU_FAMILY = ppc -else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) -HOST_MESON_TARGET_CPU_FAMILY = ppc64 -else ifeq ($(BR2_riscv),y) -HOST_MESON_TARGET_CPU_FAMILY = riscv64 -else ifeq ($(BR2_sparc),y) -HOST_MESON_TARGET_CPU_FAMILY = sparc -else ifeq ($(BR2_sparc64),y) -HOST_MESON_TARGET_CPU_FAMILY = sparc64 -else ifeq ($(BR2_x86_64),y) -HOST_MESON_TARGET_CPU_FAMILY = x86_64 -else -HOST_MESON_TARGET_CPU_FAMILY = $(ARCH) -endif - # Avoid interpreter shebang longer than 128 chars define HOST_MESON_SET_INTERPRETER $(SED) '1s:.*:#!/usr/bin/env python3:' $(HOST_DIR)/bin/meson diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 7d103add98..a9ded9fe5a 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -57,29 +57,17 @@ $(2)_NINJA_ENV ?= ifndef $(2)_CONFIGURE_CMDS ifeq ($(4),target) -$(2)_CFLAGS ?= $$(TARGET_CFLAGS) -$(2)_LDFLAGS ?= $$(TARGET_LDFLAGS) -$(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS) - # Configure package for target # # define $(2)_CONFIGURE_CMDS rm -rf $$($$(PKG)_SRCDIR)/build mkdir -p $$($$(PKG)_SRCDIR)/build - sed -e 's%@TARGET_CROSS@%$$(TARGET_CROSS)%g' \ - -e 's%@TARGET_ARCH@%$$(HOST_MESON_TARGET_CPU_FAMILY)%g' \ - -e 's%@TARGET_CPU@%$$(HOST_MESON_TARGET_CPU)%g' \ - -e 's%@TARGET_ENDIAN@%$$(HOST_MESON_TARGET_ENDIAN)%g' \ - -e "s%@TARGET_CFLAGS@%$$(call make-sq-comma-list,$$($(2)_CFLAGS))%g" \ - -e "s%@TARGET_LDFLAGS@%$$(call make-sq-comma-list,$$($(2)_LDFLAGS))%g" \ - -e "s%@TARGET_CXXFLAGS@%$$(call make-sq-comma-list,$$($(2)_CXXFLAGS))%g" \ - -e 's%@HOST_DIR@%$$(HOST_DIR)%g' \ - -e 's%@STAGING_DIR@%$$(STAGING_DIR)%g' \ - -e 's%@STATIC@%$$(if $$(BR2_STATIC_LIBS),true,false)%g' \ - -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \ + sed -e "/^\[binaries\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_BINARIES),\n$$(x)):" \ -e "/^\[properties\]$$$$/s:$$$$:$$(foreach x,$$($(2)_MESON_EXTRA_PROPERTIES),\n$$(x)):" \ - package/meson/cross-compilation.conf.in \ + $$(call PKG_MESON_CROSSCONFIG_SED,$$(if $$($(2)_CFLAGS),$(2)_CFLAGS,TARGET_CFLAGS), \ + $$(if $$($(2)_CXXFLAGS),$(2)_CXXFLAGS,TARGET_CXXFLAGS), \ + $$(if $$($(2)_LDFLAGS),$(2)_LDFLAGS,TARGET_LDFLAGS)) \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf PATH=$$(BR_PATH) $$($$(PKG)_CONF_ENV) $$(MESON) \ --prefix=/usr \ @@ -178,30 +166,72 @@ meson-package = $(call inner-meson-package,$(pkgname),$(call UPPERCASE,$(pkgname host-meson-package = $(call inner-meson-package,host-$(pkgname),$(call UPPERCASE,host-$(pkgname)),$(call UPPERCASE,$(pkgname)),host) ################################################################################ -# Generation of the Meson cross-compilation.conf file +# Generation of the Meson compile flags and cross-compilation file ################################################################################ +# https://mesonbuild.com/Reference-tables.html#cpu-families +ifeq ($(BR2_arcle)$(BR2_arceb),y) +PKG_MESON_TARGET_CPU_FAMILY = arc +else ifeq ($(BR2_arm)$(BR2_armeb),y) +PKG_MESON_TARGET_CPU_FAMILY = arm +else ifeq ($(BR2_aarch64)$(BR2_aarch64_be),y) +PKG_MESON_TARGET_CPU_FAMILY = aarch64 +else ifeq ($(BR2_i386),y) +PKG_MESON_TARGET_CPU_FAMILY = x86 +else ifeq ($(BR2_mips)$(BR2_mipsel),y) +PKG_MESON_TARGET_CPU_FAMILY = mips +else ifeq ($(BR2_mips64)$(BR2_mips64el),y) +PKG_MESON_TARGET_CPU_FAMILY = mips64 +else ifeq ($(BR2_powerpc),y) +PKG_MESON_TARGET_CPU_FAMILY = ppc +else ifeq ($(BR2_powerpc64)$(BR2_powerpc64le),y) +PKG_MESON_TARGET_CPU_FAMILY = ppc64 +else ifeq ($(BR2_riscv),y) +PKG_MESON_TARGET_CPU_FAMILY = riscv64 +else ifeq ($(BR2_sparc),y) +PKG_MESON_TARGET_CPU_FAMILY = sparc +else ifeq ($(BR2_sparc64),y) +PKG_MESON_TARGET_CPU_FAMILY = sparc64 +else ifeq ($(BR2_x86_64),y) +PKG_MESON_TARGET_CPU_FAMILY = x86_64 +else +PKG_MESON_TARGET_CPU_FAMILY = $(ARCH) +endif + +# Generates sed patterns for patching the cross-compilation.conf template, +# since Flags might contain commas the arguments are passed indirectly by +# variable name (stripped to deal with whitespaces). +# Aruments are variable containing cflags, cxxflags, ldflags. +define PKG_MESON_CROSSCONFIG_SED + -e "s%@TARGET_CROSS@%$(TARGET_CROSS)%g" \ + -e "s%@TARGET_CC@%$(TARGET_CC)%g" \ + -e "s%@TARGET_CXX@%$(TARGET_CXX)%g" \ + -e "s%@TARGET_AR@%$(TARGET_AR)%g" \ + -e "s%@TARGET_STRIP@%$(TARGET_STRIP)%g" \ + -e "s%@TARGET_ARCH@%$(PKG_MESON_TARGET_CPU_FAMILY)%g" \ + -e "s%@TARGET_CPU@%$(GCC_TARGET_CPU)%g" \ + -e "s%@TARGET_ENDIAN@%$(call LOWERCASE,$(BR2_ENDIAN))%g" \ + -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$($(strip $(1))))%g" \ + -e "s%@TARGET_LDFLAGS@%$(call make-sq-comma-list,$($(strip $(3))))%g" \ + -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$($(strip $(2))))%g" \ + -e "s%@HOST_DIR@%$(HOST_DIR)%g" \ + -e "s%@PKG_CONFIG_HOST_BINARY@%$(PKG_CONFIG_HOST_BINARY)%g" \ + -e "s%@STAGING_DIR@%$(STAGING_DIR)%g" \ + -e 's%@STATIC@%$(if $(BR2_STATIC_LIBS),true,false)%g' \ + $(TOPDIR)/support/misc/cross-compilation.conf.in +endef + # Generate a Meson cross-compilation.conf suitable for use with the # SDK; also install the file as a template for users to add their # own flags if they need to. define PKG_MESON_INSTALL_CROSS_CONF mkdir -p $(HOST_DIR)/etc/meson - sed -e 's%@TARGET_CROSS@%$(TARGET_CROSS)%g' \ - -e 's%@TARGET_ARCH@%$(HOST_MESON_TARGET_CPU_FAMILY)%g' \ - -e 's%@TARGET_CPU@%$(HOST_MESON_TARGET_CPU)%g' \ - -e 's%@TARGET_ENDIAN@%$(HOST_MESON_TARGET_ENDIAN)%g' \ - -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g" \ + sed -e "s%@TARGET_CFLAGS@%$(call make-sq-comma-list,$(TARGET_CFLAGS))@PKG_TARGET_CFLAGS@%g" \ -e "s%@TARGET_LDFLAGS@%$(call make-sq-comma-list,$(TARGET_LDFLAGS))@PKG_TARGET_CFLAGS@%g" \ -e "s%@TARGET_CXXFLAGS@%$(call make-sq-comma-list,$(TARGET_CXXFLAGS))@PKG_TARGET_CFLAGS@%g" \ - -e 's%@HOST_DIR@%$(HOST_DIR)%g' \ - -e 's%@STAGING_DIR@%$(STAGING_DIR)%g' \ - -e 's%@STATIC@%$$(if $(BR2_STATIC_LIBS),true,false)%g' \ - $(HOST_MESON_PKGDIR)/cross-compilation.conf.in \ + $(call PKG_MESON_CROSSCONFIG_SED) \ > $(HOST_DIR)/etc/meson/cross-compilation.conf.in - sed -e 's%@PKG_TARGET_CFLAGS@%%g' \ - -e 's%@PKG_TARGET_LDFLAGS@%%g' \ - -e 's%@PKG_TARGET_CXXFLAGS@%%g' \ - $(HOST_DIR)/etc/meson/cross-compilation.conf.in \ + sed $(call PKG_MESON_CROSSCONFIG_SED,TARGET_CFLAGS,TARGET_CXXFLAGS,TARGET_LDFLAGS) \ > $(HOST_DIR)/etc/meson/cross-compilation.conf endef diff --git a/package/meson/cross-compilation.conf.in b/support/misc/cross-compilation.conf.in similarity index 100% rename from package/meson/cross-compilation.conf.in rename to support/misc/cross-compilation.conf.in