package/x264: disable assembly code on x86 + musl + PIC/PIE
The x264 package uses large amounts of non-PIC assembly code (e.g. common/x86/dct-a.asm), which results in textrels, which aren't supported by musl-libc's dynamic linker. Disable x264's assembly code when compiling for x86 with PIC/PIE and musl-libc to avoid this particular incompatibility. Reported-by: Yann Morin <yann.morin@orange.com> Fixes: https://lore.kernel.org/buildroot/ZrsirnrvgsEIpAJI@tl-lnx-nyma7486-2/ Signed-off-by: J. Neuschäfer <j.neuschaefer@gmx.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> (cherry picked from commit 0196ec4198771e5fe83d6df02c7cd3b13c0ce05f) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
090dea2faa
commit
68e71cde30
@ -14,9 +14,15 @@ X264_INSTALL_STAGING = YES
|
||||
X264_CONF_OPTS = --disable-avs --disable-lavf --disable-swscale
|
||||
|
||||
ifeq ($(BR2_i386)$(BR2_x86_64),y)
|
||||
ifeq ($(BR2_TOOLCHAIN_USES_MUSL)$(BR2_PIC_PIE),yy)
|
||||
# libx264 uses large amounts of non-pic assembly code, resulting in text
|
||||
# section relocations, which are not supported on musl-libc's ld.so.
|
||||
X264_CONF_OPTS += --disable-asm
|
||||
else
|
||||
# nasm needed for assembly files
|
||||
X264_DEPENDENCIES += host-nasm
|
||||
X264_CONF_ENV += AS="$(HOST_DIR)/bin/nasm"
|
||||
endif
|
||||
else ifeq ($(BR2_ARM_CPU_ARMV7A)$(BR2_aarch64),y)
|
||||
# We need to pass gcc as AS, because the ARM assembly files have to be
|
||||
# preprocessed
|
||||
|
Loading…
Reference in New Issue
Block a user