From patchwork Tue Jun 11 20:55:43 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1114211 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="f12+dSt2"; 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 45Nj2d5txyz9s00 for ; Wed, 12 Jun 2019 06:55:53 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 141C9204F7; Tue, 11 Jun 2019 20:55: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 V76s7r9jdzK0; Tue, 11 Jun 2019 20:55:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id D01EB204F0; Tue, 11 Jun 2019 20:55:49 +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 74E1C1BF37A for ; Tue, 11 Jun 2019 20:55:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 70F1D84AD2 for ; Tue, 11 Jun 2019 20:55:48 +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 xwpIk2ZlJIuZ for ; Tue, 11 Jun 2019 20:55:48 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f68.google.com (mail-wr1-f68.google.com [209.85.221.68]) by fraxinus.osuosl.org (Postfix) with ESMTPS id B1948834D0 for ; Tue, 11 Jun 2019 20:55:47 +0000 (UTC) Received: by mail-wr1-f68.google.com with SMTP id e16so14559312wrn.1 for ; Tue, 11 Jun 2019 13:55:47 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=Ch64XQy5TBWkFir3BalmeKueOMk11auTtogpmIbgTAQ=; b=f12+dSt2MA1oMf1EsXxqCJzag3fLQ+g/982cEWG58os291D3pGz1wZ53wVUdp6IKkH bC9LOkjBI/V2Nx4TgVC+csYapE130sE+0gGCDSNKOoVcCMljqYgilnyzO8FTPipksicy HjUlzcd/EZLPoa19SHiuRy3f9TXor8dwr/ng61pq17xLkc7r3j+oHJhxC7+HG33dmZ6V Au8ePn+Ts14E+TY+QeOQGvHZd9LyUIX1yCvvZ40YXoEVe5MZrO0YVC/p46qHjg3jnZUe VlJMNGbrUPCpwb9+TzDFPlpRQ3cRUXYdrG2c/WVFiiGkAE8azJytwtrcTA+7aKi7bY4R k8/A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=Ch64XQy5TBWkFir3BalmeKueOMk11auTtogpmIbgTAQ=; b=fs11OnqfAOOnkx3OQmDUpyBUBZqTmunAgDfUIDodiIeFMFq+zMMAGg1R88Q4GlElhN gjQxBuoeSClEFLRUZw17GSyM5T4DugJIYXp0ZOXhdRN0MpCnYOZy09/HTAaA0QD7ZJgi iSIVPXdFp30FBNBzK2jBs4Bprb3v/4/snrTsb/JvJ+fVZuBnsjnUyYtiRoXHXoQpjJMY dSKRq1nBkhvNWoJs58dtfQvkIMHAWSBKTQrZh9X2X79uV+XX1j4SniL6BnpsSBYPukl1 zwxMUxvCmunw9noSWiBEii5HnFITy8xw7Z2VEEcTsGfWJOvEo6iCGwMW8B3hOWTqR2Gq WnSA== X-Gm-Message-State: APjAAAVRVueAYJgd+9QHWtMufPmmPVC1RSPjh7eAjk3+lZFWpWmh0Kkp F6SzPL0coHCXpONafaWZLssYgW8D X-Google-Smtp-Source: APXvYqw82S+ILsr5+h3CskybY78U6Q86dmpYKZHwygKDgJ0Nx+WyMSiROmXGgb17dYdYQZII0RV8Ew== X-Received: by 2002:a5d:488a:: with SMTP id g10mr50964877wrq.344.1560286545746; Tue, 11 Jun 2019 13:55:45 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb19:829a:2800:c90f:8064:4fcd:f0ef]) by smtp.gmail.com with ESMTPSA id x129sm5708245wmg.44.2019.06.11.13.55.44 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 13:55:45 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 11 Jun 2019 22:55:43 +0200 Message-Id: <4a99ac5f8c5f10cfc9bb20b33423aceca4773fa0.1560286529.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/2] infra/pkg-meson: allow packages to expand their CFLAGS/CXXFLAGS/LDFLAGS 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 , Adam Duskett , "Yann E. MORIN" , Thomas Petazzoni Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Some packages will want to pass extra CFLAGS, CXXFLAGS, or LDFLAGS. For example, they may want/have to pass $(TARGET_NLS_LIBS), like libglib2 when the toolchain is based on musl or uClibc (because meson does not have all the necessary infra internally to properly and reliably detect the presence of, or need for linking with, -lintl. Signed-off-by: Yann E. MORIN Cc: Adam Duskett Cc: Eric Le Bihan Acked-by: Adam Duskett --- package/pkg-meson.mk | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/package/pkg-meson.mk b/package/pkg-meson.mk index 886fcf7205..8512a3559d 100644 --- a/package/pkg-meson.mk +++ b/package/pkg-meson.mk @@ -49,6 +49,10 @@ $(2)_CONF_ENV ?= $(2)_CONF_OPTS ?= $(2)_NINJA_ENV ?= +$(2)_CFLAGS ?= $$(TARGET_CFLAGS) +$(2)_LDFLAGS ?= $$(TARGET_LDFLAGS) +$(2)_CXXFLAGS ?= $$(TARGET_CXXFLAGS) + # # Configure step. Only define it if not already defined by the package # .mk file. And take care of the differences between host and target @@ -67,9 +71,9 @@ define $(2)_CONFIGURE_CMDS -e "s%@TARGET_ARCH@%$$(HOST_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@%$$(HOST_MESON_SED_CFLAGS)%g" \ - -e "s%@TARGET_LDFLAGS@%$$(HOST_MESON_SED_LDFLAGS)%g" \ - -e "s%@TARGET_CXXFLAGS@%$$(HOST_MESON_SED_CXXFLAGS)%g" \ + -e "s%@TARGET_CFLAGS@%$$(if $$($(2)_CFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CFLAGS)`)%g" \ + -e "s%@TARGET_LDFLAGS@%$$(if $$($(2)_LDFLAGS),`printf '"%s"$$(comma) ' $$($(2)_LDFLAGS)`)%g" \ + -e "s%@TARGET_CXXFLAGS@%$$(if $$($(2)_CXXFLAGS),`printf '"%s"$$(comma) ' $$($(2)_CXXFLAGS)`)%g" \ -e "s%@HOST_DIR@%$$(HOST_DIR)%g" \ package/meson/cross-compilation.conf.in \ > $$($$(PKG)_SRCDIR)/build/cross-compilation.conf From patchwork Tue Jun 11 20:55:44 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Yann E. MORIN" X-Patchwork-Id: 1114212 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.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=free.fr Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.b="uFv/h2aA"; 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 45Nj2l0kYJz9s6w for ; Wed, 12 Jun 2019 06:55:59 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 0CFCF204FB; Tue, 11 Jun 2019 20:55:55 +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 0OGFe8ENl05f; Tue, 11 Jun 2019 20:55:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id CCD4B20507; Tue, 11 Jun 2019 20:55:51 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (smtp1.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 79BBC1BF37A for ; Tue, 11 Jun 2019 20:55:49 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 6EE5684BC2 for ; Tue, 11 Jun 2019 20:55:49 +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 jnF0EJWo64JC for ; Tue, 11 Jun 2019 20:55:48 +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 whitealder.osuosl.org (Postfix) with ESMTPS id 55485873C5 for ; Tue, 11 Jun 2019 20:55:48 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id f9so14496391wre.12 for ; Tue, 11 Jun 2019 13:55:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=RJzF6uTBdaoIkA8fAxzmjkTZzN5hp4T69Lee3Yp4zTs=; b=uFv/h2aAriO2rpmD/WpUNRY2g6qKeKVa+zDNb9lznE1bpOLsGV4omMZN736OcfpDlC 4Ubudn3rrIW7HxWHj9K/kMhfURv7UB39H+RCF9KkkaLBBEmnUbx4lin+Cq/vuHUVPDRH FgzJOXQiwhVvznWsJFFQ3DtfhJE6xtUTkFAL2tmTjhjJ1jmUHKLE5/kXdekDL1bfeRcE zxwAOnYZHf44b+utin4PxlRuoOjyc19oOi9aew0705tmT9kuZPsbAX7wBimd6EqpM8Za tUz6dgkExqHa98KnPn30lr9M3DN/K6kFpW0D9w435Clw5qON6AYlDEMiKNdkV8MUcbKI Yf+A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :in-reply-to:references:mime-version:content-transfer-encoding; bh=RJzF6uTBdaoIkA8fAxzmjkTZzN5hp4T69Lee3Yp4zTs=; b=gK6BnmmhPrhK1gOcLlAYXdTOPWpVXWsvGrd9XEHv3YFcPh5pPtdjfFlu1GP6U0TRwK c2zu+EZ/T39yVMjIHJgk0Gh7D+zxyulIznksIS24rV+Nf+ErwNV2JmOsqHqvLgD2b+3D Qe/Hyhjxt4NC+GZotEBU3u7NvsRR4s+HbNlqZ8MZGvn9u1jkoWI5AHWVetHfovNyx1kD supmUFC/mS86ARhY1Taou975L4ODO9dFEcir2QRqgylxT+n+GKm+w1voYagMJXZwl0fe iQst9ByNIJrIX3mAYuBvuFFzyGTtM1dNwFKINbysfVKc9k3vXaje+gi95BRN1+YF4FH6 ILnw== X-Gm-Message-State: APjAAAVJmdiljkZ/PaKsHcQRNCSi83dlGlsZAGRnA26FsZwfdBe8Oehh 5azaT1c7nZqDunIPK2DpX+CDXyaX X-Google-Smtp-Source: APXvYqxoQt4H1m3PzeYKujrj1CFNnx5Ug44Ud2MqL5of1fDIT3UhKD4Z7vm9W1lA8IWoSHab3guXzg== X-Received: by 2002:a5d:4950:: with SMTP id r16mr6194544wrs.136.1560286546730; Tue, 11 Jun 2019 13:55:46 -0700 (PDT) Received: from localhost.localdomain ([2a01:cb19:829a:2800:c90f:8064:4fcd:f0ef]) by smtp.gmail.com with ESMTPSA id x129sm5708245wmg.44.2019.06.11.13.55.45 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Tue, 11 Jun 2019 13:55:46 -0700 (PDT) From: "Yann E. MORIN" To: buildroot@buildroot.org Date: Tue, 11 Jun 2019 22:55:44 +0200 Message-Id: <348952c2f966fb8c1ccb5b18418b3a8596925645.1560286529.git.yann.morin.1998@free.fr> X-Mailer: git-send-email 2.20.1 In-Reply-To: References: MIME-Version: 1.0 Subject: [Buildroot] [PATCH 2/2] package/libglib2: fix NLS build on musl and uclibc 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: Adam Duskett , "Yann E. MORIN" , Thomas Petazzoni , Fabrice Fontaine Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" libglib2 uses a very crude and error-prone way to detect the intl functions, which basically fails when the C library is not glibc. Now that a meson pacakge can specify its LDFLAGS, use that to pass the infrastructure-provided TARGET_NLS_LIBS to link with. Fixes: http://autobuild.buildroot.org/results/f0d/f0d85d76786343d767fba9c7c5c01f042ecfc018/ [...] Signed-off-by: Yann E. MORIN Cc: Adam Duskett Cc: Fabrice Fontaine Acked-by: Adam Duskett --- package/libglib2/libglib2.mk | 2 ++ 1 file changed, 2 insertions(+) diff --git a/package/libglib2/libglib2.mk b/package/libglib2/libglib2.mk index 78d6e5ab32..04f747cec7 100644 --- a/package/libglib2/libglib2.mk +++ b/package/libglib2/libglib2.mk @@ -31,6 +31,8 @@ LIBGLIB2_DEPENDENCIES = \ host-pkgconf host-libglib2 \ libffi pcre util-linux zlib $(TARGET_NLS_DEPENDENCIES) +LIBGLIB2_LDFLAGS = $(TARGET_LDFLAGS) $(TARGET_NLS_LIBS) + HOST_LIBGLIB2_DEPENDENCIES = \ host-gettext \ host-libffi \