From mboxrd@z Thu Jan 1 00:00:00 1970 From: Baruch Siach Date: Thu, 2 Mar 2017 14:29:40 +0200 Subject: [Buildroot] [PATCH 1/5] core/pkg-cmake: provide our own platform description In-Reply-To: References: Message-ID: <20170302122940.xhkdgbz6sj3zfqsb@tarshish> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: buildroot@busybox.net Hi Yann, On Tue, Feb 28, 2017 at 07:07:22PM +0100, Yann E. MORIN wrote: > -set(CMAKE_SYSTEM_NAME Linux) > +set(CMAKE_SYSTEM_NAME Buildroot) > set(CMAKE_SYSTEM_PROCESSOR @@CMAKE_SYSTEM_PROCESSOR@@) This breaks libiio. http://autobuild.buildroot.net/results/281/2812b008a0ab6bab5fe4d45eb9ffe4e9496a8cb4/ /home/dawncrow/buildroot-test/scripts/instance-0/output/build/libiio-0.9/local.c: In function 'local_open': /home/dawncrow/buildroot-test/scripts/instance-0/output/build/libiio-0.9/local.c:856:33: error: 'O_CLOEXEC' undeclared (first use in this function) That is because the libiio CMakeLists.txt has the following code: IF(${CMAKE_SYSTEM_NAME} MATCHES "Linux") [...] set(CMAKE_REQUIRED_DEFINITIONS "-D_GNU_SOURCE=1") add_definitions(-D_GNU_SOURCE=1) endif() Now cmake skips this code, thus omitting _GNU_SOURCE which leads to the build failure. baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -