Skip to contentSkip to conversation

mesa: Add define to indicate missing 64bit atomics on armv5

PATCH In review Khem Raj 2 participants 5 messages Jun 6, 2017

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mesa: Add define to indicate missing 64bit atomics on armv5

This is wrongly detected by configure since it only checks for __sync_add_and_fetch and not __atomic_fetch_add, it decides to let compiler emit references to atomic functions which it expects to be provided by libgcc, but thats not the case for armv5 arch

[YOCTO #11616]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 ++
 1 file changed, 2 insertions(+)
meta/recipes-graphics/mesa/mesa.inc +2 -0
index 67039a9962..014044f381 100644
@@ -79,6 +79,8 @@ PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
+CFLAGS_append_armv5 = " -DMISSING_64BIT_ATOMICS"
+
 # Multiple virtual/gl providers being built breaks staging
 EXCLUDE_FROM_WORLD = "1"
 
Signature · 1 line
2.13.0
#1 lore raw
Quoted 6 lines · Khem Raj

This is wrongly detected by configure since it only checks for __sync_add_and_fetch and not __atomic_fetch_add, it decides to let compiler emit references to atomic functions which it expects to be provided by libgcc, but thats not the case for armv5 arch

Is the true fix to adjust configure to look for the right operations?

Ross

author
#2 lore raw
Quoted 12 lines · Ross
Quoted 6 lines · Khem Raj

This is wrongly detected by configure since it only checks for __sync_add_and_fetch and not __atomic_fetch_add, it decides to let compiler emit references to atomic functions which it expects to be provided by libgcc, but thats not the case for armv5 arch

Is the true fix to adjust configure to look for the right operations?

yes. and there is such a patch proposed as well to mesa but it has got some feedback so I did not bring that in. This patch instead is surgical.

Quoted 1 line

Ross

#3 lore raw
Quoted 4 lines · Khem Raj

yes. and there is such a patch proposed as well to mesa but it has got some feedback so I did not bring that in. This patch instead is surgical.

Cool. Just got to remember to back this out when upstream is fixed.

Thanks,
Ross

author
#4 lore raw
Quoted 10 lines · Ross
Quoted 4 lines · Khem Raj

yes. and there is such a patch proposed as well to mesa but it has got some feedback so I did not bring that in. This patch instead is surgical.

Cool. Just got to remember to back this out when upstream is fixed.

yes, although effects will be same.

Quoted 2 lines

Thanks,
Ross