Skip to contentSkip to conversation

mesa: Disable asm on musl

PATCH Superseded Khem Raj 3 participants 6 messages Oct 2, 2018

v1 of 3 Superseded Latest is v3 →

lore
Share & tools
lore

Khem Raj

author
#0 lore raw

PATCH 1/1 mesa: Disable asm on musl

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -1
index 8d0e2cb67c..e6f3712706 100644
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
Signature · 1 line
2.19.0
#1 lore raw

Isn't this a bit overkill? Is the assembler actually broken?

Ross

Quoted 32 lines · Khem Raj

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -2
index 8d0e2cb67c..e6f3712706 100644
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
--

2.19.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#2 lore raw

I think it is. The way th calls are set for performance reasons seems to be causing this
Ideally we should ensure to use right dialect for tls calls I think musl is exposing a bug in Mesa
Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

So this is a workaround until then

Quoted 40 lines · Ross

Isn't this a bit overkill? Is the assembler actually broken?

Ross

Quoted 4 lines · Khem Raj

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

Review

Quoted 8 lines

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-graphics/mesa/mesa.inc

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[osmesa] =

Quoted 4 lines

index 8d0e2cb67c..e6f3712706 100644

meta/recipes-graphics/mesa/mesa.inc +0 -0
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] =

"--enable-${OSMESA},--disable-${OSMESA}"

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[osmesa] = · line 107

Quoted 1 line
meta/recipes-graphics/mesa/mesa.inc +0 -0
 PACKAGECONFIG[unwind] =

"--enable-libunwind,--disable-libunwind,libunwind"

Quoted 15 lines
meta/recipes-graphics/mesa/mesa.inc +1 -2
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
--

2.19.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#3 lore raw

Can you file a bug with mesa so we don't forget and Mesa knows?

Ross

Quoted 45 lines · Khem Raj

I think it is. The way th calls are set for performance reasons seems to be causing this Ideally we should ensure to use right dialect for tls calls I think musl is exposing a bug in Mesa Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

So this is a workaround until then

Quoted 37 lines · Ross

Isn't this a bit overkill? Is the assembler actually broken?

Ross

Quoted 32 lines · Khem Raj

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -2
index 8d0e2cb67c..e6f3712706 100644
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
--

2.19.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

author
#4 lore raw

Yes, will do. I think it will need some time since this needs to be well explained so mesa devs can see the reasoning behind it

Quoted 50 lines · Ross

Can you file a bug with mesa so we don't forget and Mesa knows?

Ross

Quoted 45 lines · Khem Raj

I think it is. The way th calls are set for performance reasons seems to be causing this Ideally we should ensure to use right dialect for tls calls I think musl is exposing a bug in Mesa Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

So this is a workaround until then

Quoted 37 lines · Ross

Isn't this a bit overkill? Is the assembler actually broken?

Ross

Quoted 32 lines · Khem Raj

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-graphics/mesa/mesa.inc +1 -2
index 8d0e2cb67c..e6f3712706 100644
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] = "--enable-${OSMESA},--disable-${OSMESA}"
 PACKAGECONFIG[unwind] = "--enable-libunwind,--disable-libunwind,libunwind"
 
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
--

2.19.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

#5 lore raw
In reply to Khem Raj

Can we have bit more detail in the commit message about what the issues are? We're not supposed to rely solely on a bug report reference to do that; also if it's considered a workaround and we're working with upstream to fix it, the commit message should state that as well.

Thanks
Paul

Quoted 52 lines · NZDT Khem Raj

I think it is. The way th calls are set for performance reasons seems to be causing this
Ideally we should ensure to use right dialect for tls calls I think musl is exposing a bug in Mesa
Which we covered by disabling tls in Glx once we disable that then this problem pops up so we disable ASM

So this is a workaround until then

Quoted 40 lines · Ross

Isn't this a bit overkill? Is the assembler actually broken?

Ross

Quoted 4 lines · Khem Raj

some unknown part of mesa's x86 assembly
code is broken by readonly text segments

Review

Quoted 8 lines

[ YOCTO #12918 ]

---
 meta/recipes-graphics/mesa/mesa.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
(quoted diff) +0 -0

b/meta/recipes-graphics/mesa/mesa.inc

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[osmesa] =

Quoted 4 lines

index 8d0e2cb67c..e6f3712706 100644

meta/recipes-graphics/mesa/mesa.inc +0 -0
@@ -107,7 +107,7 @@ PACKAGECONFIG[osmesa] =

"--enable-${OSMESA},--disable-${OSMESA}"

meta/recipes-graphics/mesa/mesa.inc PACKAGECONFIG[osmesa] = · line 107

Quoted 1 line
meta/recipes-graphics/mesa/mesa.inc +0 -0
 PACKAGECONFIG[unwind] =

"--enable-libunwind,--disable-libunwind,libunwind"

Quoted 15 lines
meta/recipes-graphics/mesa/mesa.inc +1 -2
 EXTRA_OECONF_remove_libc-musl = "--enable-glx-tls"
-EXTRA_OECONF_append_libc-musl = " --disable-glx-tls"
+EXTRA_OECONF_append_libc-musl = " --disable-asm --disable-glx-tls"
 # llvmpipe is slow if compiled with -fomit-frame-pointer (e.g. -O2)
 FULL_OPTIMIZATION_append = " -fno-omit-frame-pointer"
 
--

2.19.0

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre