From patchwork Sat Aug 3 09:38:56 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Titouan Christophe X-Patchwork-Id: 1141472 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.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=railnova.eu Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=railnova-eu.20150623.gappssmtp.com header.i=@railnova-eu.20150623.gappssmtp.com header.b="CYQ6AWf1"; 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 460zWb0rncz9s7T for ; Sat, 3 Aug 2019 19:39:23 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 54EC7881D9; Sat, 3 Aug 2019 09:39:17 +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 RshavIWaWNlf; Sat, 3 Aug 2019 09:39:15 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6FDA988253; Sat, 3 Aug 2019 09:39:14 +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 50C061BF2F8 for ; Sat, 3 Aug 2019 09:39:13 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 4E23A844E9 for ; Sat, 3 Aug 2019 09:39:13 +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 cjsaVTtnwTYP for ; Sat, 3 Aug 2019 09:39:11 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from mail-ed1-f66.google.com (mail-ed1-f66.google.com [209.85.208.66]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 74CC0844C6 for ; Sat, 3 Aug 2019 09:39:11 +0000 (UTC) Received: by mail-ed1-f66.google.com with SMTP id s49so39686471edb.1 for ; Sat, 03 Aug 2019 02:39:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=railnova-eu.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=zOwPLMSZKAmdwHllC02PMozcSzKQIumvBxH3xMU3OlA=; b=CYQ6AWf1dsXbhXNEMB30cILktugfqYV8K1hNdgUK5DZR+dKxXASjbnjQDqnk82Vb1W Hlh4vIdPBNMiX5pin9zXZGdQExtDiQEI0n3MuJWJYwp1WBN84Aqgdz+33VGntwK4ksSO MFLMoqnOx9Q3VceIXu60myxbF/ALDAkKOg/BqnSSeSoj+EaymX24a91a+jX/ZXXt4a4C CCqWpycW6iyxUeQu5NbDL98fnPmNgJjOkioD7ZVjLgI8xXEV313T8Xa3eI3y6DLkxMRB kuLcTb6jungBUImbbvfvbq+BliM6koJj0JO4kAUnAb1aymJHn8sexLv6nXEVhoG0Tg61 EOZA== 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=zOwPLMSZKAmdwHllC02PMozcSzKQIumvBxH3xMU3OlA=; b=GHdEcBMxcWzou7gO0+fIAv7bN+xYLjdONodXoPYrqduwzzn+Z++mdAukLBM/tYAwbI NrtIc/YOYZyFvZVIuHt+DqZVZL/QbRBdVEW+GJTsifwiSuFo0ieknWKrqk7KguOJleGX vqFKN0jnZCkH2Z7QuizWXJuPqFZNU3fEV2/xignsslSNKa5fI39MbWOC6AIDIf7QIKw3 bmZJsdcArSAyWU7ISDoEYUJmiUUOX1cDrbJbcldawRzlpCa2WA8zGgkFqvyPz4hn9dkD yUjYExytWDfxyjxaZhknSLhklQcXGv4/jQrVpO7NmwqSDWnjQqPTeKzUQmlSg3D4Pui4 ou2Q== X-Gm-Message-State: APjAAAXcbe25FGpXfH1VqXo88aFTWviXkxUQUOJL2NGL0MW/GBYH7hdo FdyyFvkzzMwtbW9h830dI27YiSMiDAQ= X-Google-Smtp-Source: APXvYqwP4rgginE5HbkJCzGFUccVug0DsgCSg3Rf0ZRqc9Z9rawWAo4rRKYdf9fGTY581TZQhy0whA== X-Received: by 2002:a17:906:318e:: with SMTP id 14mr109605637ejy.85.1564825149547; Sat, 03 Aug 2019 02:39:09 -0700 (PDT) Received: from taurus.home ([2a02:a03f:3c47:f000:1730:e68d:f08a:7dbc]) by smtp.gmail.com with ESMTPSA id gz5sm13584374ejb.21.2019.08.03.02.39.08 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Sat, 03 Aug 2019 02:39:09 -0700 (PDT) From: Titouan Christophe To: buildroot@buildroot.org Date: Sat, 3 Aug 2019 11:38:56 +0200 Message-Id: <20190803093858.144555-2-titouan.christophe@railnova.eu> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190803093858.144555-1-titouan.christophe@railnova.eu> References: <20190803093858.144555-1-titouan.christophe@railnova.eu> MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/3] package/mosquitto: allow to build as static lib 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: Peter Korsgaard , Titouan Christophe Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Since version 1.5, it is possible to build mosquitto as a static lib. However, the broker still needs a toolchain with support for shared libraries, because it contains code to dynamically load modules at runtime. This code makes use of dlfcn.h, which is only available for dylib enabled systems. Signed-off-by: Titouan Christophe --- package/mosquitto/Config.in | 9 +++------ package/mosquitto/mosquitto.mk | 12 ++++++++++++ 2 files changed, 15 insertions(+), 6 deletions(-) diff --git a/package/mosquitto/Config.in b/package/mosquitto/Config.in index c7373d9a84..8f2561c2d8 100644 --- a/package/mosquitto/Config.in +++ b/package/mosquitto/Config.in @@ -1,6 +1,5 @@ config BR2_PACKAGE_MOSQUITTO bool "mosquitto" - depends on !BR2_STATIC_LIBS # builds .so help Mosquitto is an open source message broker that implements the MQ Telemetry Transport protocol versions 3.1 and @@ -16,12 +15,10 @@ config BR2_PACKAGE_MOSQUITTO_BROKER bool "install the mosquitto broker" default y depends on BR2_USE_MMU # fork() + depends on !BR2_STATIC_LIBS # include depends on BR2_PACKAGE_MOSQUITTO help Build and install the mosquitto broker onto target. -comment "mosquitto broker needs a system with MMU" - depends on BR2_PACKAGE_MOSQUITTO && !BR2_USE_MMU - -comment "mosquitto needs a toolchain w/ dynamic library" - depends on BR2_STATIC_LIBS +comment "mosquitto broker needs a system with MMU; toolchain w/ dynamic library" + depends on BR2_PACKAGE_MOSQUITTO && (!BR2_USE_MMU || BR2_STATIC_LIBS) diff --git a/package/mosquitto/mosquitto.mk b/package/mosquitto/mosquitto.mk index a172afcc53..eb39f0af6e 100644 --- a/package/mosquitto/mosquitto.mk +++ b/package/mosquitto/mosquitto.mk @@ -17,6 +17,18 @@ MOSQUITTO_MAKE_OPTS = \ WITH_WRAP=no \ WITH_DOCS=no +ifeq ($(BR2_SHARED_LIBS),y) +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=no +else +MOSQUITTO_MAKE_OPTS += WITH_STATIC_LIBRARIES=yes +endif + +ifeq ($(BR2_STATIC_LIBS),y) +MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=no +else +MOSQUITTO_MAKE_OPTS += WITH_SHARED_LIBRARIES=yes +endif + # adns uses getaddrinfo_a ifeq ($(BR2_TOOLCHAIN_USES_GLIBC),y) MOSQUITTO_MAKE_OPTS += WITH_ADNS=yes