From patchwork Thu Aug 27 15:49:03 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gwenhael Goavec-Merou X-Patchwork-Id: 1352681 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.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=trabucayre.com Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 4BcnGn1BzTz9sTj for ; Fri, 28 Aug 2020 01:49:36 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 9F61286A92; Thu, 27 Aug 2020 15:49:32 +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 CzGmyndmmksA; Thu, 27 Aug 2020 15:49:30 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 2981A8687B; Thu, 27 Aug 2020 15:49:30 +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 E40A41BF40B for ; Thu, 27 Aug 2020 15:49:28 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id E0E76884CA for ; Thu, 27 Aug 2020 15:49:28 +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 WajHpbcfPQ-T for ; Thu, 27 Aug 2020 15:49:27 +0000 (UTC) X-Greylist: whitelisted by SQLgrey-1.7.6 Received: from smtp3-g21.free.fr (smtp3-g21.free.fr [212.27.42.3]) by hemlock.osuosl.org (Postfix) with ESMTPS id 472B5884A2 for ; Thu, 27 Aug 2020 15:49:27 +0000 (UTC) Received: from localhost.localdomain (unknown [78.252.129.8]) by smtp3-g21.free.fr (Postfix) with ESMTP id DA10A13F8DC; Thu, 27 Aug 2020 17:49:23 +0200 (CEST) From: Gwenhael Goavec-Merou To: buildroot@buildroot.org Date: Thu, 27 Aug 2020 17:49:03 +0200 Message-Id: <20200827154903.1107968-1-gwenj@trabucayre.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] package/gnuradio: backport patch to fix INTERFACE_INCLUDE_DIRECTORIES 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: Gwenhael Goavec-Merou Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" From: Gwenhael Goavec-Merou gnuradio-runtimeTargets.cmake and gnuradio-pmtTargets.cmake are filled using CMAKE_INSTALL_PREFIX for INSTALL_INTERFACE. Since CMAKE_INSTALL_PREFIX, in buildroot, is set to /usr, these files contains path to host system. With BR2_COMPILER_PARANOID_UNSAFE_PATH package using gnuradio fails with: arm-linux-gnueabihf-g++: ERROR: unsafe header/library path used in cross-compilation: '-isystem' '/usr/include' By simply providing 'include', produced .cmake contains: INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" instead of INTERFACE_INCLUDE_DIRECTORIES "/usr/include" [Upstream status: https://github.com/gnuradio/gnuradio/pull/3737] Fix (many) gr-osmosdr build failure: - http://autobuild.buildroot.net/results/66b76c07f15bb3e6db697c47796ae3dd15ecf4b9/ Signed-off-by: Gwenhael Goavec-Merou --- ...rdcode-INTERFACE_INCLUDE_DIRECTORIES.patch | 57 +++++++++++++++++++ 1 file changed, 57 insertions(+) create mode 100644 package/gnuradio/0003-gnuradio-runtime_pmt-dont-hardcode-INTERFACE_INCLUDE_DIRECTORIES.patch diff --git a/package/gnuradio/0003-gnuradio-runtime_pmt-dont-hardcode-INTERFACE_INCLUDE_DIRECTORIES.patch b/package/gnuradio/0003-gnuradio-runtime_pmt-dont-hardcode-INTERFACE_INCLUDE_DIRECTORIES.patch new file mode 100644 index 0000000000..6b8987fa5f --- /dev/null +++ b/package/gnuradio/0003-gnuradio-runtime_pmt-dont-hardcode-INTERFACE_INCLUDE_DIRECTORIES.patch @@ -0,0 +1,57 @@ +From 84dea8284c521f08508bb2dcbc99db3b5d3438fd Mon Sep 17 00:00:00 2001 +From: Gwenhael Goavec-Merou +Date: Thu, 27 Aug 2020 17:32:09 +0200 +Subject: [PATCH] gnuradio-runtime_pmt: dont hardcode + INTERFACE_INCLUDE_DIRECTORIES + +gnuradio-runtimeTargets.cmake and gnuradio-pmtTargets.cmake are filled +using CMAKE_INSTALL_PREFIX for INSTALL_INTERFACE. + +Since CMAKE_INSTALL_PREFIX, in buildroot, is set to /usr, these files contains +path to host system. + +With BR2_COMPILER_PARANOID_UNSAFE_PATH package using gnuradio fails with: +arm-linux-gnueabihf-g++: ERROR: unsafe header/library path used in cross-compilation: '-isystem' '/usr/include' + +By simply providing 'include', produced .cmake contains: +INTERFACE_INCLUDE_DIRECTORIES "${_IMPORT_PREFIX}/include" +instead of +INTERFACE_INCLUDE_DIRECTORIES "/usr/include" + +[Upstream status: https://github.com/gnuradio/gnuradio/pull/3737] + +Signed-off-by: Gwenhael Goavec-Merou +--- + gnuradio-runtime/lib/CMakeLists.txt | 2 +- + gnuradio-runtime/lib/pmt/CMakeLists.txt | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/gnuradio-runtime/lib/CMakeLists.txt b/gnuradio-runtime/lib/CMakeLists.txt +index 5aa90a5e1..fc32f473b 100644 +--- a/gnuradio-runtime/lib/CMakeLists.txt ++++ b/gnuradio-runtime/lib/CMakeLists.txt +@@ -214,7 +214,7 @@ target_link_libraries(gnuradio-runtime PUBLIC + + target_include_directories(gnuradio-runtime + PUBLIC +- $ ++ $ + $ + $ + PRIVATE +diff --git a/gnuradio-runtime/lib/pmt/CMakeLists.txt b/gnuradio-runtime/lib/pmt/CMakeLists.txt +index 9fb98d0fc..6dfcd945c 100644 +--- a/gnuradio-runtime/lib/pmt/CMakeLists.txt ++++ b/gnuradio-runtime/lib/pmt/CMakeLists.txt +@@ -33,7 +33,7 @@ target_link_libraries(gnuradio-pmt + + target_include_directories(gnuradio-pmt + PUBLIC +- $ ++ $ + $ + PRIVATE ${CMAKE_CURRENT_SOURCE_DIR}/ + ) +-- +2.26.2 +