* [PATCH] ffmpeg: Disable asm optimizations on x86
@ 2024-10-13 19:17 Khem Raj
2024-10-13 19:37 ` [OE-core] " Alexander Kanavin
2024-10-14 11:02 ` Ross Burton
0 siblings, 2 replies; 5+ messages in thread
From: Khem Raj @ 2024-10-13 19:17 UTC (permalink / raw)
To: openembedded-core; +Cc: Khem Raj, Ross Burton
disable asm code if PIC is required, as the provided asm
decidedly is not PIC for x86.
Signed-off-by: Khem Raj <raj.khem@gmail.com>
Cc: Ross Burton <ross.burton@arm.com>
---
meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 2 ++
1 file changed, 2 insertions(+)
diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
index af66104ebf3..3c66851b8d2 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
@@ -129,6 +129,8 @@ EXTRA_OECONF = " \
"
EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
+# --enable-pic is used and x86 assembly is not PIC on x86
+EXTRA_OECONF:append:x86 = " --disable-asm"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] ffmpeg: Disable asm optimizations on x86
2024-10-13 19:17 [PATCH] ffmpeg: Disable asm optimizations on x86 Khem Raj
@ 2024-10-13 19:37 ` Alexander Kanavin
2024-10-13 20:24 ` Khem Raj
2024-10-14 11:02 ` Ross Burton
1 sibling, 1 reply; 5+ messages in thread
From: Alexander Kanavin @ 2024-10-13 19:37 UTC (permalink / raw)
To: raj.khem; +Cc: openembedded-core, Ross Burton
[-- Attachment #1: Type: text/plain, Size: 1688 bytes --]
Wouldn’t this be a build time error? Why is it not seen on the ab?
Alex
On Sun 13. Oct 2024 at 21.17, Khem Raj via lists.openembedded.org <raj.khem=
gmail.com@lists.openembedded.org> wrote:
> disable asm code if PIC is required, as the provided asm
> decidedly is not PIC for x86.
>
> Signed-off-by: Khem Raj <raj.khem@gmail.com>
> Cc: Ross Burton <ross.burton@arm.com>
> ---
> meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
> b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
> index af66104ebf3..3c66851b8d2 100644
> --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
> +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
> @@ -129,6 +129,8 @@ EXTRA_OECONF = " \
> "
>
> EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
> +# --enable-pic is used and x86 assembly is not PIC on x86
> +EXTRA_OECONF:append:x86 = " --disable-asm"
>
> EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6',
> '--disable-mips64r2 --disable-mips32r2', '', d)}"
> EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2',
> '--disable-mips64r6 --disable-mips32r6', '', d)}"
>
> -=-=-=-=-=-=-=-=-=-=-=-
> Links: You receive all messages sent to this group.
> View/Reply Online (#205724):
> https://lists.openembedded.org/g/openembedded-core/message/205724
> Mute This Topic: https://lists.openembedded.org/mt/108988536/1686489
> Group Owner: openembedded-core+owner@lists.openembedded.org
> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [
> alex.kanavin@gmail.com]
> -=-=-=-=-=-=-=-=-=-=-=-
>
>
[-- Attachment #2: Type: text/html, Size: 3224 bytes --]
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [OE-core] [PATCH] ffmpeg: Disable asm optimizations on x86
2024-10-13 19:37 ` [OE-core] " Alexander Kanavin
@ 2024-10-13 20:24 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2024-10-13 20:24 UTC (permalink / raw)
To: Alexander Kanavin; +Cc: openembedded-core, Ross Burton
On Sun, Oct 13, 2024 at 12:37 PM Alexander Kanavin
<alex.kanavin@gmail.com> wrote:
>
> Wouldn’t this be a build time error? Why is it not seen on the ab?
It is a build time error with lld linker for sure I am not sure why we
don't see it with GNU ld.
| i686-yoe-linux-ld.lld: error: relocation R_386_32 cannot be used
against local symbol; recompile with -fPIC
| >>> defined in libavutil/x86/tx_float.o
| >>> referenced by tx_float.asm:228 (src/libavutil/x86/tx_float.asm:228)
| >>> libavutil/x86/tx_float.o:(.text+0x668)
The files in question are compiled using nasm assembler for x86 and
x86_64 here is full log
https://gist.github.com/kraj/12d633834d032d19005cdbac281390b7
>
> Alex
>
> On Sun 13. Oct 2024 at 21.17, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote:
>>
>> disable asm code if PIC is required, as the provided asm
>> decidedly is not PIC for x86.
>>
>> Signed-off-by: Khem Raj <raj.khem@gmail.com>
>> Cc: Ross Burton <ross.burton@arm.com>
>> ---
>> meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb | 2 ++
>> 1 file changed, 2 insertions(+)
>>
>> diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
>> index af66104ebf3..3c66851b8d2 100644
>> --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
>> +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_7.0.2.bb
>> @@ -129,6 +129,8 @@ EXTRA_OECONF = " \
>> "
>>
>> EXTRA_OECONF:append:linux-gnux32 = " --disable-asm"
>> +# --enable-pic is used and x86 assembly is not PIC on x86
>> +EXTRA_OECONF:append:x86 = " --disable-asm"
>>
>> EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', '--disable-mips64r2 --disable-mips32r2', '', d)}"
>> EXTRA_OECONF += "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r2', '--disable-mips64r6 --disable-mips32r6', '', d)}"
>>
>> -=-=-=-=-=-=-=-=-=-=-=-
>> Links: You receive all messages sent to this group.
>> View/Reply Online (#205724): https://lists.openembedded.org/g/openembedded-core/message/205724
>> Mute This Topic: https://lists.openembedded.org/mt/108988536/1686489
>> Group Owner: openembedded-core+owner@lists.openembedded.org
>> Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub [alex.kanavin@gmail.com]
>> -=-=-=-=-=-=-=-=-=-=-=-
>>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ffmpeg: Disable asm optimizations on x86
2024-10-13 19:17 [PATCH] ffmpeg: Disable asm optimizations on x86 Khem Raj
2024-10-13 19:37 ` [OE-core] " Alexander Kanavin
@ 2024-10-14 11:02 ` Ross Burton
2024-10-14 17:47 ` Khem Raj
1 sibling, 1 reply; 5+ messages in thread
From: Ross Burton @ 2024-10-14 11:02 UTC (permalink / raw)
To: Khem Raj; +Cc: ,openembedded-core@lists.openembedded.org
On 13 Oct 2024, at 20:17, Khem Raj <raj.khem@gmail.com> wrote:
>
> disable asm code if PIC is required, as the provided asm
> decidedly is not PIC for x86.
I think I’d prefer to see a revert of the textrel change I sent, with a comment explaining how to trigger it. I tried, but didn’t considering trying ldd.
Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ffmpeg: Disable asm optimizations on x86
2024-10-14 11:02 ` Ross Burton
@ 2024-10-14 17:47 ` Khem Raj
0 siblings, 0 replies; 5+ messages in thread
From: Khem Raj @ 2024-10-14 17:47 UTC (permalink / raw)
To: Ross Burton; +Cc: ,openembedded-core@lists.openembedded.org
On Mon, Oct 14, 2024 at 4:02 AM Ross Burton <Ross.Burton@arm.com> wrote:
>
> On 13 Oct 2024, at 20:17, Khem Raj <raj.khem@gmail.com> wrote:
> >
> > disable asm code if PIC is required, as the provided asm
> > decidedly is not PIC for x86.
>
> I think I’d prefer to see a revert of the textrel change I sent, with a comment explaining how to trigger it. I tried, but didn’t considering trying ldd.
well, revert is not required we should just apply this patch since the problem
is only on x86/32bit + nasm assembler. For reproducer here is one
https://termbin.com/zbzg
I hope that should make it clear ?
>
> Ross
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2024-10-14 17:48 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-13 19:17 [PATCH] ffmpeg: Disable asm optimizations on x86 Khem Raj
2024-10-13 19:37 ` [OE-core] " Alexander Kanavin
2024-10-13 20:24 ` Khem Raj
2024-10-14 11:02 ` Ross Burton
2024-10-14 17:47 ` Khem Raj
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox