Skip to contentSkip to conversation

package/libatomic_ops - fix compilation fail on sparc

PATCH New Brendan Heading 2 participants 2 messages Aug 2, 2015 – Aug 3, 2015

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/libatomic_ops - fix compilation fail on sparc

Fixes http://autobuild.buildroot.net/results/6d8/6d83fa5d69572cec5c96be4b7651f9b113a1a19c/

libatomic_ops by default requires SPARC v9. buildroot's two supported sparc arches (SPARCv8, and leon3) are both SPARCv8-based. Unfortunately libatomic_ops's support for SPARCv8 is incomplete.

The library includes fallbacks but these must expressly be enabled by defining a macro, enabled by this patch. Note that I'm testing for the SPARC variants rather than BR2_sparc, in case someone implements SPARCv9 support in the future.

Discussion of this workaround described by the maintainer here :
https://github.com/ivmai/libatomic_ops/issues/9

---
 package/libatomic_ops/libatomic_ops.mk | 4 ++++
 1 file changed, 4 insertions(+)
package/libatomic_ops/libatomic_ops.mk +4 -0
index 5f698c4..fd45726 100644
@@ -19,5 +19,9 @@ LIBATOMIC_OPS_LICENSE_FILES = doc/LICENSING.txt COPYING
 
 LIBATOMIC_OPS_INSTALL_STAGING = YES
 
+ifeq ($(BR2_sparc_v8)$(BR2_sparc_leon3),y)
+LIBATOMIC_OPS_CONF_ENV = CFLAGS="$(TARGET_CFLAGS) -DAO_NO_SPARC_V9"
+endif
+
 $(eval $(autotools-package))
 $(eval $(host-autotools-package))
Signature · 1 line
2.4.3
#1 lore raw

PATCH 1/1 package/libatomic_ops - fix compilation fail on sparc

Dear Brendan Heading,

Quoted 11 lines · Brendan Heading

Fixes http://autobuild.buildroot.net/results/6d8/6d83fa5d69572cec5c96be4b7651f9b113a1a19c/

libatomic_ops by default requires SPARC v9. buildroot's two supported sparc arches (SPARCv8, and leon3) are both SPARCv8-based. Unfortunately libatomic_ops's support for SPARCv8 is incomplete.

The library includes fallbacks but these must expressly be enabled by defining a macro, enabled by this patch. Note that I'm testing for the SPARC variants rather than BR2_sparc, in case someone implements SPARCv9 support in the future.

Quoted 7 lines

Discussion of this workaround described by the maintainer here :
https://github.com/ivmai/libatomic_ops/issues/9

---
 package/libatomic_ops/libatomic_ops.mk | 4 ++++
 1 file changed, 4 insertions(+)

Applied, thanks.

Thomas

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