Skip to contentSkip to conversation

package/gnuradio: link with libatomic when needed

PATCH Superseded Bernd Kuhls 3 participants 3 messages Jun 25, 2017 – Jul 5, 2017

v2 of 3 Superseded Latest is v3 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 package/gnuradio: link with libatomic when needed

Fixes
http://autobuild.buildroot.net/results/528/52825918bf65b23241cd68d99513350703469294/

---
v2: fix typo CMAKE_CXX_FLAGS -> CMAKE_C_FLAGS (Thomas)

 package/gnuradio/gnuradio.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
package/gnuradio/gnuradio.mk +6 -1
index 6407dd4f8..60b0ce3d9 100644
@@ -22,6 +22,7 @@ GNURADIO_DEPENDENCIES += orc
 endif
 
 GNURADIO_CONF_OPTS = \
+	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(GNURADIO_CFLAGS)" \
 	-DENABLE_DEFAULT=OFF \
 	-DENABLE_VOLK=ON \
 	-DENABLE_GNURADIO_RUNTIME=ON
@@ -30,13 +31,17 @@ GNURADIO_CONF_OPTS = \
 # compile time.
 GNURADIO_INSTALL_STAGING = YES
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GNURADIO_CFLAGS += -latomic
+endif
+
 # Yes, this is silly, because -march is already known by the compiler
 # with the internal toolchain, and passed by the external wrapper for
 # external toolchains. Nonetheless, gnuradio does some matching on the
 # CFLAGS to decide whether to build the NEON functions or not, and
 # wants to see the string 'armv7' in the CFLAGS.
 ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy)
-GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS) -march=armv7-a"
+GNURADIO_CFLAGS += -march=armv7-a
 endif
 
 # As soon as -mfpu=neon is supported by the compiler, gnuradio will try
Signature · 1 line
2.11.0
#1 lore raw

PATCH v2 1/1 package/gnuradio: link with libatomic when needed

Quoted 4 lines · On Sun, 25 Jun 2017 10:48:06 +0200 Bernd Kuhls <[email protected]> wrote:

Fixes
http://autobuild.buildroot.net/results/528/52825918bf65b23241cd68d99513350703469294/

Regards,

Gwen

Quoted 44 lines

---
v2: fix typo CMAKE_CXX_FLAGS -> CMAKE_C_FLAGS (Thomas)

 package/gnuradio/gnuradio.mk | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
(quoted diff) +0 -0

b/package/gnuradio/gnuradio.mk index 6407dd4f8..60b0ce3d9 100644

package/gnuradio/gnuradio.mk +5 -0
@@ -22,6 +22,7 @@ GNURADIO_DEPENDENCIES += orc
 endif
 
 GNURADIO_CONF_OPTS = \
+	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(GNURADIO_CFLAGS)" \
 	-DENABLE_DEFAULT=OFF \
 	-DENABLE_VOLK=ON \
 	-DENABLE_GNURADIO_RUNTIME=ON
@@ -30,13 +31,17 @@ GNURADIO_CONF_OPTS = \
 # compile time.
 GNURADIO_INSTALL_STAGING = YES
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GNURADIO_CFLAGS += -latomic
+endif
+
 # Yes, this is silly, because -march is already known by the compiler
 # with the internal toolchain, and passed by the external wrapper for
 # external toolchains. Nonetheless, gnuradio does some matching on

the # CFLAGS to decide whether to build the NEON functions or not, and

 # wants to see the string 'armv7' in the CFLAGS.
 ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_ARM_CPU_HAS_NEON),yy)
package/gnuradio/gnuradio.mk +0 -2
-GNURADIO_CONF_OPTS += -DCMAKE_C_FLAGS="$(TARGET_CFLAGS)
-march=armv7-a" +GNURADIO_CFLAGS += -march=armv7-a
 endif
 
 # As soon as -mfpu=neon is supported by the compiler, gnuradio will

try --
2.11.0

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

#2 lore raw

PATCH v2 1/1 package/gnuradio: link with libatomic when needed

In reply to Bernd Kuhls

Hello,

package/gnuradio/gnuradio.mk GNURADIO_CONF_OPTS = \ · line 35

Quoted 11 lines · Bernd Kuhls

GNURADIO_CONF_OPTS = \

package/gnuradio/gnuradio.mk +3 -0
+	-DCMAKE_C_FLAGS="$(TARGET_CFLAGS) $(GNURADIO_CFLAGS)" \
 	-DENABLE_DEFAULT=OFF \
 	-DENABLE_VOLK=ON \
 	-DENABLE_GNURADIO_RUNTIME=ON
@@ -30,13 +31,17 @@ GNURADIO_CONF_OPTS = \
 # compile time.
 GNURADIO_INSTALL_STAGING = YES
 
+ifeq ($(BR2_TOOLCHAIN_HAS_LIBATOMIC),y)
+GNURADIO_CFLAGS += -latomic

Is there some CMAKE_LD_FLAGS, or linker flags, or something? This would be more appropriate for a linker flag.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com