* [Buildroot] [PATCH] ne10: bump version to 1.0.0
@ 2014-04-08 13:55 Baruch Siach
2014-04-08 20:53 ` Peter Korsgaard
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Baruch Siach @ 2014-04-08 13:55 UTC (permalink / raw)
To: buildroot
Switch to github helper while at it.
Fixes:
http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
---
...CMakeLists.txt-add-neon-support-to-CFLAGS.patch | 31 ++++++++++++++++++++++
package/ne10/ne10.mk | 10 +++----
2 files changed, 36 insertions(+), 5 deletions(-)
create mode 100644 package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
diff --git a/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
new file mode 100644
index 000000000000..1777de102328
--- /dev/null
+++ b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
@@ -0,0 +1,31 @@
+From 1ab64866615643d19a8e5c4f1a3f62f1baad6e83 Mon Sep 17 00:00:00 2001
+Message-Id: <1ab64866615643d19a8e5c4f1a3f62f1baad6e83.1396964788.git.baruch@tkos.co.il>
+From: Baruch Siach <baruch@tkos.co.il>
+Date: Tue, 8 Apr 2014 16:40:28 +0300
+Subject: [PATCH] CMakeLists.txt: add neon support to CFLAGS
+
+Fixed build failure:
+
+.../include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
+
+Signed-off-by: Baruch Siach <baruch@tkos.co.il>
+---
+ CMakeLists.txt | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/CMakeLists.txt b/CMakeLists.txt
+index e5a98af53c1f..22ce166650da 100644
+--- a/CMakeLists.txt
++++ b/CMakeLists.txt
+@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
+ add_subdirectory(android/NE10Demo/jni)
+ endif()
+ elseif(GNULINUX_PLATFORM)
+- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
+ set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
+ elseif(IOS_PLATFORM)
+ #set minimal target ios version.If not provided this option, Xcode
+--
+1.9.1
+
diff --git a/package/ne10/ne10.mk b/package/ne10/ne10.mk
index 79b53b809d16..24411482e0a5 100644
--- a/package/ne10/ne10.mk
+++ b/package/ne10/ne10.mk
@@ -4,15 +4,15 @@
#
################################################################################
-# We use a Git commit ID because the last tagged version is more than
-# one year old.
-NE10_VERSION = 88c18f02199947b2c8b57796f5a3ca53160aff96
-NE10_SITE = http://github.com/projectNe10/Ne10/tarball/$(NE10_VERSION)
+NE10_VERSION = v1.0.0
+NE10_SITE = $(call github,projectNe10,Ne10,$(NE10_VERSION))
NE10_LICENSE = BSD-3c or Apache-2.0
NE10_LICENSE_FILES = doc/LICENSE
+NE10_CONF_OPT = -DGNULINUX_PLATFORM=ON
+
ifeq ($(BR2_PREFER_STATIC_LIB),)
-NE10_CONF_OPT = \
+NE10_CONF_OPT += \
-DNE10_BUILD_SHARED=ON
endif
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-08 13:55 [Buildroot] [PATCH] ne10: bump version to 1.0.0 Baruch Siach
@ 2014-04-08 20:53 ` Peter Korsgaard
2014-04-13 8:41 ` Baruch Siach
2014-04-08 21:51 ` Thomas Petazzoni
2014-04-09 4:11 ` Samuel Martin
2 siblings, 1 reply; 10+ messages in thread
From: Peter Korsgaard @ 2014-04-08 20:53 UTC (permalink / raw)
To: buildroot
>>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
> Switch to github helper while at it.
> Fixes:
> http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
Hmm, something doesn't work here:
Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_detmat.neon.s.o
[ 95%] Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_transmat.neon.s.o
Linking C executable NE10_test_static
[ 95%] [ 96%] Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_identitymat.neon.s.o
Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_cfft.neon.s.o
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lm
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lc
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [samples/NE10_test_static] Error 1
make[3]: Leaving directory `/home/peko/source/buildroot/output/build/ne10-v1.0.0'
make[2]: *** [samples/CMakeFiles/NE10_test_static.dir/all] Error 2
make[2]: *** Waiting for unfinished jobs....
[ 96%] Linking C shared library libNE10.so
Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_float32.neon.s.o
[ 96%] Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_int32.neon.s.o
[ 97%] [ 97%] Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fir.neon.s.o
Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_int16.neon.s.o
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lm
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lc
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
/home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory
collect2: error: ld returned 1 exit status
make[3]: *** [modules/libNE10.so.10] Error 1
With a clean cortex A8 build (default codesourcery external toolchain).
Any ideas?
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-08 13:55 [Buildroot] [PATCH] ne10: bump version to 1.0.0 Baruch Siach
2014-04-08 20:53 ` Peter Korsgaard
@ 2014-04-08 21:51 ` Thomas Petazzoni
2014-04-10 6:38 ` Baruch Siach
2014-04-09 4:11 ` Samuel Martin
2 siblings, 1 reply; 10+ messages in thread
From: Thomas Petazzoni @ 2014-04-08 21:51 UTC (permalink / raw)
To: buildroot
Dear Baruch Siach,
On Tue, 8 Apr 2014 16:55:06 +0300, Baruch Siach wrote:
> +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
> ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
This will not work on hardfp toolchains.
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-08 13:55 [Buildroot] [PATCH] ne10: bump version to 1.0.0 Baruch Siach
2014-04-08 20:53 ` Peter Korsgaard
2014-04-08 21:51 ` Thomas Petazzoni
@ 2014-04-09 4:11 ` Samuel Martin
2014-04-09 4:44 ` Samuel Martin
2014-04-10 4:39 ` Baruch Siach
2 siblings, 2 replies; 10+ messages in thread
From: Samuel Martin @ 2014-04-09 4:11 UTC (permalink / raw)
To: buildroot
Hi Baruch, all,
On Tue, Apr 8, 2014 at 3:55 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> Switch to github helper while at it.
>
> Fixes:
> http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
>
> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> ---
> ...CMakeLists.txt-add-neon-support-to-CFLAGS.patch | 31 ++++++++++++++++++++++
> package/ne10/ne10.mk | 10 +++----
> 2 files changed, 36 insertions(+), 5 deletions(-)
> create mode 100644 package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
>
> diff --git a/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
> new file mode 100644
> index 000000000000..1777de102328
> --- /dev/null
> +++ b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
> @@ -0,0 +1,31 @@
> +From 1ab64866615643d19a8e5c4f1a3f62f1baad6e83 Mon Sep 17 00:00:00 2001
> +Message-Id: <1ab64866615643d19a8e5c4f1a3f62f1baad6e83.1396964788.git.baruch@tkos.co.il>
> +From: Baruch Siach <baruch@tkos.co.il>
> +Date: Tue, 8 Apr 2014 16:40:28 +0300
> +Subject: [PATCH] CMakeLists.txt: add neon support to CFLAGS
> +
> +Fixed build failure:
> +
> +.../include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
> +
> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> +---
> + CMakeLists.txt | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/CMakeLists.txt b/CMakeLists.txt
> +index e5a98af53c1f..22ce166650da 100644
> +--- a/CMakeLists.txt
> ++++ b/CMakeLists.txt
> +@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
> + add_subdirectory(android/NE10Demo/jni)
> + endif()
> + elseif(GNULINUX_PLATFORM)
> +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
> ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
> + set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
> + elseif(IOS_PLATFORM)
> + #set minimal target ios version.If not provided this option, Xcode
> +--
> +1.9.1
> +
I clearly don't like this patch, so I nack it.
> diff --git a/package/ne10/ne10.mk b/package/ne10/ne10.mk
> index 79b53b809d16..24411482e0a5 100644
> --- a/package/ne10/ne10.mk
> +++ b/package/ne10/ne10.mk
> @@ -4,15 +4,15 @@
> #
> ################################################################################
>
> -# We use a Git commit ID because the last tagged version is more than
> -# one year old.
> -NE10_VERSION = 88c18f02199947b2c8b57796f5a3ca53160aff96
> -NE10_SITE = http://github.com/projectNe10/Ne10/tarball/$(NE10_VERSION)
> +NE10_VERSION = v1.0.0
> +NE10_SITE = $(call github,projectNe10,Ne10,$(NE10_VERSION))
> NE10_LICENSE = BSD-3c or Apache-2.0
> NE10_LICENSE_FILES = doc/LICENSE
>
> +NE10_CONF_OPT = -DGNULINUX_PLATFORM=ON
> +
> ifeq ($(BR2_PREFER_STATIC_LIB),)
> -NE10_CONF_OPT = \
> +NE10_CONF_OPT += \
> -DNE10_BUILD_SHARED=ON
> endif
Instead of messing the CMAKE_C_FLAGS in the package build system
itself for something related to the target, I suggest to do this logic
in the Buildroot ne10.mk.
I mean, the toolchainfile.cmake allows you to pass some CFLAGS because it does:
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Os ... " CACHE STRING
"Buildroot CFLAGS" FORCE)
So you can add the logic adjusting the -mfloat-abi=... and -mfpu=...
in the ne10.mk:
NE10_CONF_OPT +=
-DCMAKE_C_FLAGS="-mfloat-abi=$(BR2_GCC_TARGET_FLOAT_ABI)
-mfpu=$(BR2_GCC_TARGET_FPU)"
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-09 4:11 ` Samuel Martin
@ 2014-04-09 4:44 ` Samuel Martin
2014-04-10 4:39 ` Baruch Siach
1 sibling, 0 replies; 10+ messages in thread
From: Samuel Martin @ 2014-04-09 4:44 UTC (permalink / raw)
To: buildroot
On Wed, Apr 9, 2014 at 6:11 AM, Samuel Martin <s.martin49@gmail.com> wrote:
> Hi Baruch, all,
>
> On Tue, Apr 8, 2014 at 3:55 PM, Baruch Siach <baruch@tkos.co.il> wrote:
>> Switch to github helper while at it.
>>
>> Fixes:
>> http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
>>
>> Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>> ---
>> ...CMakeLists.txt-add-neon-support-to-CFLAGS.patch | 31 ++++++++++++++++++++++
>> package/ne10/ne10.mk | 10 +++----
>> 2 files changed, 36 insertions(+), 5 deletions(-)
>> create mode 100644 package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
>>
>> diff --git a/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
>> new file mode 100644
>> index 000000000000..1777de102328
>> --- /dev/null
>> +++ b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
>> @@ -0,0 +1,31 @@
>> +From 1ab64866615643d19a8e5c4f1a3f62f1baad6e83 Mon Sep 17 00:00:00 2001
>> +Message-Id: <1ab64866615643d19a8e5c4f1a3f62f1baad6e83.1396964788.git.baruch@tkos.co.il>
>> +From: Baruch Siach <baruch@tkos.co.il>
>> +Date: Tue, 8 Apr 2014 16:40:28 +0300
>> +Subject: [PATCH] CMakeLists.txt: add neon support to CFLAGS
>> +
>> +Fixed build failure:
>> +
>> +.../include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
>> +
>> +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
>> +---
>> + CMakeLists.txt | 2 +-
>> + 1 file changed, 1 insertion(+), 1 deletion(-)
>> +
>> +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> +index e5a98af53c1f..22ce166650da 100644
>> +--- a/CMakeLists.txt
>> ++++ b/CMakeLists.txt
>> +@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
>> + add_subdirectory(android/NE10Demo/jni)
>> + endif()
>> + elseif(GNULINUX_PLATFORM)
>> +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
>> ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
>> + set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
>> + elseif(IOS_PLATFORM)
>> + #set minimal target ios version.If not provided this option, Xcode
>> +--
>> +1.9.1
>> +
>
> I clearly don't like this patch, so I nack it.
Just to be clear-crystal, the upstream CMake code is wrong: how could
it know what is the target?
So, the "set(CMAKE_C_FLAGS ...)" and "set(CMAKE_ASM_FLAGS ...)" should
be removed and set on the CMake command line by Buildroot.
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-09 4:11 ` Samuel Martin
2014-04-09 4:44 ` Samuel Martin
@ 2014-04-10 4:39 ` Baruch Siach
2014-04-10 5:26 ` Samuel Martin
1 sibling, 1 reply; 10+ messages in thread
From: Baruch Siach @ 2014-04-10 4:39 UTC (permalink / raw)
To: buildroot
Hi Samuel,
On Wed, Apr 09, 2014 at 06:11:43AM +0200, Samuel Martin wrote:
> On Tue, Apr 8, 2014 at 3:55 PM, Baruch Siach <baruch@tkos.co.il> wrote:
> > Switch to github helper while at it.
> >
> > Fixes:
> > http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
> >
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
> > ...CMakeLists.txt-add-neon-support-to-CFLAGS.patch | 31 ++++++++++++++++++++++
> > package/ne10/ne10.mk | 10 +++----
> > 2 files changed, 36 insertions(+), 5 deletions(-)
> > create mode 100644 package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
> >
> > diff --git a/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
> > new file mode 100644
> > index 000000000000..1777de102328
> > --- /dev/null
> > +++ b/package/ne10/ne10-01-CMakeLists.txt-add-neon-support-to-CFLAGS.patch
> > @@ -0,0 +1,31 @@
> > +From 1ab64866615643d19a8e5c4f1a3f62f1baad6e83 Mon Sep 17 00:00:00 2001
> > +Message-Id: <1ab64866615643d19a8e5c4f1a3f62f1baad6e83.1396964788.git.baruch@tkos.co.il>
> > +From: Baruch Siach <baruch@tkos.co.il>
> > +Date: Tue, 8 Apr 2014 16:40:28 +0300
> > +Subject: [PATCH] CMakeLists.txt: add neon support to CFLAGS
> > +
> > +Fixed build failure:
> > +
> > +.../include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
> > +
> > +Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > +---
> > + CMakeLists.txt | 2 +-
> > + 1 file changed, 1 insertion(+), 1 deletion(-)
> > +
> > +diff --git a/CMakeLists.txt b/CMakeLists.txt
> > +index e5a98af53c1f..22ce166650da 100644
> > +--- a/CMakeLists.txt
> > ++++ b/CMakeLists.txt
> > +@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
> > + add_subdirectory(android/NE10Demo/jni)
> > + endif()
> > + elseif(GNULINUX_PLATFORM)
> > +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
> > ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
> > + set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
> > + elseif(IOS_PLATFORM)
> > + #set minimal target ios version.If not provided this option, Xcode
>
> I clearly don't like this patch, so I nack it.
I don't like it either.
> [...]
>
> Instead of messing the CMAKE_C_FLAGS in the package build system
> itself for something related to the target, I suggest to do this logic
> in the Buildroot ne10.mk.
>
> I mean, the toolchainfile.cmake allows you to pass some CFLAGS because it does:
> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Os ... " CACHE STRING
> "Buildroot CFLAGS" FORCE)
But toolchainfile.cmake is a global file, it doesn't change per package.
> So you can add the logic adjusting the -mfloat-abi=... and -mfpu=...
> in the ne10.mk:
> NE10_CONF_OPT +=
> -DCMAKE_C_FLAGS="-mfloat-abi=$(BR2_GCC_TARGET_FLOAT_ABI)
> -mfpu=$(BR2_GCC_TARGET_FPU)"
A quick test shows that this solution doesn't work. Just added:
NE10_CONF_OPT += "-DCMAKE_C_FLAGS=-O2 -mthumb-interwork -mthumb \
-march=armv7-a -mfloat-abi=softfp -mfpu=neon"
instead of patching, and got the same failure.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-10 4:39 ` Baruch Siach
@ 2014-04-10 5:26 ` Samuel Martin
2014-04-10 6:28 ` Baruch Siach
0 siblings, 1 reply; 10+ messages in thread
From: Samuel Martin @ 2014-04-10 5:26 UTC (permalink / raw)
To: buildroot
Hi Baruch,
On Thu, Apr 10, 2014 at 6:39 AM, Baruch Siach <baruch@tkos.co.il> wrote:
[...]
>> > +diff --git a/CMakeLists.txt b/CMakeLists.txt
>> > +index e5a98af53c1f..22ce166650da 100644
>> > +--- a/CMakeLists.txt
>> > ++++ b/CMakeLists.txt
>> > +@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
>> > + add_subdirectory(android/NE10Demo/jni)
>> > + endif()
>> > + elseif(GNULINUX_PLATFORM)
>> > +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
>> > ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
>> > + set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
>> > + elseif(IOS_PLATFORM)
>> > + #set minimal target ios version.If not provided this option, Xcode
>>
>> I clearly don't like this patch, so I nack it.
>
> I don't like it either.
>
>> [...]
>>
>> Instead of messing the CMAKE_C_FLAGS in the package build system
>> itself for something related to the target, I suggest to do this logic
>> in the Buildroot ne10.mk.
>>
>> I mean, the toolchainfile.cmake allows you to pass some CFLAGS because it does:
>> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Os ... " CACHE STRING
>> "Buildroot CFLAGS" FORCE)
>
> But toolchainfile.cmake is a global file, it doesn't change per package.
>
>> So you can add the logic adjusting the -mfloat-abi=... and -mfpu=...
>> in the ne10.mk:
>> NE10_CONF_OPT +=
>> -DCMAKE_C_FLAGS="-mfloat-abi=$(BR2_GCC_TARGET_FLOAT_ABI)
>> -mfpu=$(BR2_GCC_TARGET_FPU)"
>
> A quick test shows that this solution doesn't work. Just added:
>
> NE10_CONF_OPT += "-DCMAKE_C_FLAGS=-O2 -mthumb-interwork -mthumb \
> -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
>
> instead of patching, and got the same failure.
Arf! Indeed, our CFLAGS got override by the default ones in the
toolchainfile.cmake.
Could you try this patch: http://code.bulix.org/w0j2qz-86015 ?
Regards,
--
Samuel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-10 5:26 ` Samuel Martin
@ 2014-04-10 6:28 ` Baruch Siach
0 siblings, 0 replies; 10+ messages in thread
From: Baruch Siach @ 2014-04-10 6:28 UTC (permalink / raw)
To: buildroot
Hi Samuel,
On Thu, Apr 10, 2014 at 07:26:04AM +0200, Samuel Martin wrote:
> On Thu, Apr 10, 2014 at 6:39 AM, Baruch Siach <baruch@tkos.co.il> wrote:
> [...]
> >> > +diff --git a/CMakeLists.txt b/CMakeLists.txt
> >> > +index e5a98af53c1f..22ce166650da 100644
> >> > +--- a/CMakeLists.txt
> >> > ++++ b/CMakeLists.txt
> >> > +@@ -78,7 +78,7 @@ if(ANDROID_PLATFORM)
> >> > + add_subdirectory(android/NE10Demo/jni)
> >> > + endif()
> >> > + elseif(GNULINUX_PLATFORM)
> >> > +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
> >> > ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
> >> > + set(CMAKE_ASM_FLAGS "-mthumb-interwork -mthumb -march=armv7-a -mfpu=neon")
> >> > + elseif(IOS_PLATFORM)
> >> > + #set minimal target ios version.If not provided this option, Xcode
> >>
> >> I clearly don't like this patch, so I nack it.
> >
> > I don't like it either.
> >
> >> [...]
> >>
> >> Instead of messing the CMAKE_C_FLAGS in the package build system
> >> itself for something related to the target, I suggest to do this logic
> >> in the Buildroot ne10.mk.
> >>
> >> I mean, the toolchainfile.cmake allows you to pass some CFLAGS because it does:
> >> set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -pipe -Os ... " CACHE STRING
> >> "Buildroot CFLAGS" FORCE)
> >
> > But toolchainfile.cmake is a global file, it doesn't change per package.
> >
> >> So you can add the logic adjusting the -mfloat-abi=... and -mfpu=...
> >> in the ne10.mk:
> >> NE10_CONF_OPT +=
> >> -DCMAKE_C_FLAGS="-mfloat-abi=$(BR2_GCC_TARGET_FLOAT_ABI)
> >> -mfpu=$(BR2_GCC_TARGET_FPU)"
> >
> > A quick test shows that this solution doesn't work. Just added:
> >
> > NE10_CONF_OPT += "-DCMAKE_C_FLAGS=-O2 -mthumb-interwork -mthumb \
> > -march=armv7-a -mfloat-abi=softfp -mfpu=neon"
> >
> > instead of patching, and got the same failure.
>
> Arf! Indeed, our CFLAGS got override by the default ones in the
> toolchainfile.cmake.
> Could you try this patch: http://code.bulix.org/w0j2qz-86015 ?
It turns out that this patch is not needed in this case. The -float-abi and
-mfpu parameters are set by the toolchain wrapper. ne10 just needs to depend
on the correct float/abi configuration.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-08 21:51 ` Thomas Petazzoni
@ 2014-04-10 6:38 ` Baruch Siach
0 siblings, 0 replies; 10+ messages in thread
From: Baruch Siach @ 2014-04-10 6:38 UTC (permalink / raw)
To: buildroot
Hi Thomas,
On Tue, Apr 08, 2014 at 11:51:52PM +0200, Thomas Petazzoni wrote:
> On Tue, 8 Apr 2014 16:55:06 +0300, Baruch Siach wrote:
>
> > +- set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfpu=vfp3")
> > ++ set(CMAKE_C_FLAGS "-O2 -mthumb-interwork -mthumb -march=armv7-a -mfloat-abi=softfp -mfpu=neon")
>
> This will not work on hardfp toolchains.
So would depending on BR2_ARM_FPU_NEON || BR2_ARM_FPU_NEON_VFPV4 be
sufficient? The toolchain wrappers handles -mfloat-abi/-mfpu, so this patch is
not needed actually.
BTW, what is BR2_ARM_ENABLE_NEON used for? I couldn't find any reference to
this configuration symbol in the code.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Buildroot] [PATCH] ne10: bump version to 1.0.0
2014-04-08 20:53 ` Peter Korsgaard
@ 2014-04-13 8:41 ` Baruch Siach
0 siblings, 0 replies; 10+ messages in thread
From: Baruch Siach @ 2014-04-13 8:41 UTC (permalink / raw)
To: buildroot
Hi Peter,
On Tue, Apr 08, 2014 at 10:53:36PM +0200, Peter Korsgaard wrote:
> >>>>> "Baruch" == Baruch Siach <baruch@tkos.co.il> writes:
>
> > Switch to github helper while at it.
> > Fixes:
> > http://autobuild.buildroot.net/results/a2c/a2ca3fe245e410a738f4b10631a1414696a0edea/
>
> > Signed-off-by: Baruch Siach <baruch@tkos.co.il>
> > ---
>
> Hmm, something doesn't work here:
>
> Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_detmat.neon.s.o
> [ 95%] Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_transmat.neon.s.o
> Linking C executable NE10_test_static
> [ 95%] [ 96%] Building C object modules/CMakeFiles/NE10_test.dir/math/NE10_identitymat.neon.s.o
> Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_cfft.neon.s.o
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crt1.o: No such file or directory
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lm
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lc
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory
> collect2: error: ld returned 1 exit status
> make[3]: *** [samples/NE10_test_static] Error 1
> make[3]: Leaving directory `/home/peko/source/buildroot/output/build/ne10-v1.0.0'
> make[2]: *** [samples/CMakeFiles/NE10_test_static.dir/all] Error 2
> make[2]: *** Waiting for unfinished jobs....
> [ 96%] Linking C shared library libNE10.so
> Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_float32.neon.s.o
> [ 96%] Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_int32.neon.s.o
> [ 97%] [ 97%] Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fir.neon.s.o
> Building C object modules/CMakeFiles/NE10_test.dir/dsp/NE10_fft_int16.neon.s.o
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crti.o: No such file or directory
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lm
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lc
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find -lgcc_s
> /home/peko/source/buildroot/output/host/opt/ext-toolchain/bin/../lib/gcc/arm-none-linux-gnueabi/4.8.1/../../../../arm-none-linux-gnueabi/bin/ld: cannot find crtn.o: No such file or directory
> collect2: error: ld returned 1 exit status
> make[3]: *** [modules/libNE10.so.10] Error 1
>
> With a clean cortex A8 build (default codesourcery external toolchain).
>
> Any ideas?
Thanks for testing. This is caused by the -mthumb that is hard coded in
CMakeLists.txt, which is incompatible with the default -marm. I added a
dependency on BR2_ARM_INSTRUCTIONS_THUMB || BR2_ARM_INSTRUCTIONS_THUMB2 to fix
this.
baruch
--
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-04-13 8:41 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-04-08 13:55 [Buildroot] [PATCH] ne10: bump version to 1.0.0 Baruch Siach
2014-04-08 20:53 ` Peter Korsgaard
2014-04-13 8:41 ` Baruch Siach
2014-04-08 21:51 ` Thomas Petazzoni
2014-04-10 6:38 ` Baruch Siach
2014-04-09 4:11 ` Samuel Martin
2014-04-09 4:44 ` Samuel Martin
2014-04-10 4:39 ` Baruch Siach
2014-04-10 5:26 ` Samuel Martin
2014-04-10 6:28 ` Baruch Siach
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox