From patchwork Thu Oct 31 10:23:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1187328 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.b="O3bu88xc"; 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 473hGR2HH8z9sPJ for ; Thu, 31 Oct 2019 21:22:39 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 75F5822798; Thu, 31 Oct 2019 10:22:37 +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 moiBX3hzB54c; Thu, 31 Oct 2019 10:22:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 22C0F20451; Thu, 31 Oct 2019 10:22:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 68CDC1BF2BB for ; Thu, 31 Oct 2019 10:22:34 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 655A920451 for ; Thu, 31 Oct 2019 10:22:34 +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 K9bg0PKCPi-i for ; Thu, 31 Oct 2019 10:22:33 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f50.google.com (mail-wr1-f50.google.com [209.85.221.50]) by silver.osuosl.org (Postfix) with ESMTPS id 593F82010C for ; Thu, 31 Oct 2019 10:22:33 +0000 (UTC) Received: by mail-wr1-f50.google.com with SMTP id a11so5584643wra.6 for ; Thu, 31 Oct 2019 03:22:33 -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=Yi5SauqSz12RXhq90ZcqGyuvEWXVQKZJMCxSOhIIXjQ=; b=O3bu88xcB6A77JMeTpRhs1zqbyWMtgVA2XwO7g3jsZP6Q4T3JOfMayPaO/WUpnu1om Xi+s05bNhtimeQbsJSdxUqxGey5mWygAZhiAqEP7UWi/V1japN58RT6LwZoxY78m/qpp afLPj6L5dlBDFdBpJyu2IwFo3FmRlf+wG0zpwRXpHQWPrUd3nawYmULQzOwcT6r9yJGn z0uj+YzX4rd3Mrjudf3hXaGOesQY9MIJvgxlo0wveSN9/tJw0SFZGmwS5k3rHMKBoAzK RXk+sKYuj8kCvjNq+7hh7ZS2nlqLM385Rv7s18dd04S85fIxWCMxV67zs8oXf9/WlMqc G2sw== 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=Yi5SauqSz12RXhq90ZcqGyuvEWXVQKZJMCxSOhIIXjQ=; b=Wi0wXWZiognhplMNuOTW8wQctTLCM9GXe54Zxo37rXbkg0HWCVE8XS23ukObTNEJur CnfFEv8Dkq7NmM1H1oLidfjgUg5AlFaUkUs9N+i5/BaaS09LnVSi3cuSjgjk+OA1607h vTWqONLhrr15efk1JIDjW90veGD/HbOCHK+rGh4hd2S9Mfq3e7G3tI8GPcOIQvF4VYVm E+m4hCmX6s1X4vgxEZplxBCi7Au3ocSyKaXbAGIk7Yr4Xh0EfNIQ+syAKZ5zpilJN/Es vv/HxXpP5qk3GKpGQatBf7CaYU2gsFbUzKhOCK9zeQG7E9cykVcaYiCRZWrkWQcwAgWU UW0g== X-Gm-Message-State: APjAAAU2f5kmPd3viTNB7rLLta9mujM6nmFap4lwOFQog1JHc1PCk90I JI6jNmdKhs2MDma/pJ7f6CInNsAV X-Google-Smtp-Source: APXvYqzlUrS4Qf6bNgsweZDN/fuRyL7XhjUiw3CIS33scMf6QQdmusCmMrXG1IgzGbNdLhs/77goXQ== X-Received: by 2002:adf:fa4a:: with SMTP id y10mr1441627wrr.177.1572517351317; Thu, 31 Oct 2019 03:22:31 -0700 (PDT) Received: from kali.home (lfbn-1-3732-187.w86-229.abo.wanadoo.fr. [86.229.230.187]) by smtp.gmail.com with ESMTPSA id t133sm8868150wmb.1.2019.10.31.03.22.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 31 Oct 2019 03:22:30 -0700 (PDT) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Thu, 31 Oct 2019 11:23:06 +0100 Message-Id: <20191031102306.15433-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.23.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/domoticz: fix build with RELRO 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" Fixes: - http://autobuild.buildroot.org/results/5c1ca3083ad672401d1e050c6c3a07b8c33b851d Signed-off-by: Fabrice Fontaine --- ...xt-Add-USE_PRECOMPILED_HEADER-option.patch | 35 +++++++++++++++++++ package/domoticz/domoticz.mk | 3 ++ 2 files changed, 38 insertions(+) create mode 100644 package/domoticz/0003-CMakeLists.txt-Add-USE_PRECOMPILED_HEADER-option.patch diff --git a/package/domoticz/0003-CMakeLists.txt-Add-USE_PRECOMPILED_HEADER-option.patch b/package/domoticz/0003-CMakeLists.txt-Add-USE_PRECOMPILED_HEADER-option.patch new file mode 100644 index 0000000000..831e4816e1 --- /dev/null +++ b/package/domoticz/0003-CMakeLists.txt-Add-USE_PRECOMPILED_HEADER-option.patch @@ -0,0 +1,35 @@ +From e2dfb2ece19748ba99ec8199fc902c0c9daff325 Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Wed, 30 Oct 2019 18:55:48 +0100 +Subject: [PATCH] CMakeLists.txt: Add USE_PRECOMPILED_HEADER option + +Add USE_PRECOMPILED_HEADER to allow the user to disable precompiled +header feature. Thanks to this, domoticz will be able to be built with +RELRO on buildroot + +Fixes: + - http://autobuild.buildroot.org/results/5c1ca3083ad672401d1e050c6c3a07b8c33b851d + +Signed-off-by: Fabrice Fontaine +[Retrieved from: +https://github.com/domoticz/domoticz/commit/e2dfb2ece19748ba99ec8199fc902c0c9daff325] +--- + CMakeLists.txt | 5 ++++- + 1 file changed, 4 insertions(+), 1 deletion(-) + +diff --git a/CMakeLists.txt b/CMakeLists.txt +index cb6150ce4c..bd48872214 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -744,7 +744,10 @@ else() + target_link_libraries(domoticz -lrt -lresolv ${EXECINFO_LIBRARIES}) + ENDIF() + +-ADD_PRECOMPILED_HEADER(domoticz "main/stdafx.h") ++option(USE_PRECOMPILED_HEADER "Use precompiled header feature to speed up build time " YES) ++if(USE_PRECOMPILED_HEADER) ++ ADD_PRECOMPILED_HEADER(domoticz "main/stdafx.h") ++ENDIF(USE_PRECOMPILED_HEADER) + + IF(CMAKE_COMPILER_IS_GNUCXX) + option(USE_STATIC_LIBSTDCXX "Build with static libgcc/libstdc++ libraries" YES) diff --git a/package/domoticz/domoticz.mk b/package/domoticz/domoticz.mk index c0568c61c6..d8ccfeee5a 100644 --- a/package/domoticz/domoticz.mk +++ b/package/domoticz/domoticz.mk @@ -31,6 +31,9 @@ DOMOTICZ_CONF_OPTS += \ -DUSE_BUILTIN_SQLITE=OFF \ -DUSE_BUILTIN_MQTT=OFF +# Disable precompiled header feature to fix build with RELRO +DOMOTICZ_CONF_OPTS += -DUSE_PRECOMPILED_HEADER=OFF + ifeq ($(BR2_PACKAGE_LIBUSB),y) DOMOTICZ_DEPENDENCIES += libusb endif