Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

remove native nasm #6263

Open
wants to merge 17 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 1 addition & 18 deletions cross/dav1d/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
PKG_NAME = dav1d
PKG_VERS = 1.4.2
PKG_VERS = 1.4.3
PKG_EXT = tar.xz
PKG_DIST_NAME = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT)
PKG_DIST_SITE = https://download.videolan.org/pub/videolan/dav1d/$(PKG_VERS)
Expand All @@ -18,21 +18,4 @@ CONFIGURE_ARGS += -Denable_examples=false
CONFIGURE_ARGS += -Denable_docs=false
ADDITIONAL_CFLAGS = -O

include ../../mk/spksrc.archs.mk

# Define x86asm
ifeq ($(findstring $(ARCH),$(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
BUILD_DEPENDS = native/nasm
NASM_PATH = $(abspath $(PWD)/../../native/nasm/work-native/install/usr/local/bin)
ENV += AS=$(NASM_PATH)/nasm
ENV += PATH=$(NASM_PATH):$$PATH
CONFIGURE_ARGS += -Denable_asm=true

# Allow ASM on aarch64, disable on all others
else ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
CONFIGURE_ARGS += -Denable_asm=true
else
CONFIGURE_ARGS += -Denable_asm=false
Comment on lines -29 to -35
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nasm is only used for x86/x86_64, while for aarch64 it uses the gcc assembler (as). Considering the code above, you should have kept something such as:

ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS) $(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
CONFIGURE_ARGS += -Denable_asm=true
else
CONFIGURE_ARGS += -Denable_asm=false
endif

While it probably builds ok, I recall code to fail on armv7 in multiple cases which led to enable assembly optimizations only on aarch64 and x86 archs. I would suggest keeping this ifeq else usecase (and maybe elsewhere, haven't looked at all the code changes).

EDIT: On another comment I realized that issues with as on armv7 related to gcc <= 4.9, rather suggesting:

include ../../mk/spksrc.common.mk

ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS) $(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
CONFIGURE_ARGS += -Denable_asm=true

# only enable `asm` on armv7 when using gcc > 4.9.* (i.e. DSM7+)
else if ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
ifeq ($(call version_lt, ${TC_GCC}, 5),1)
CONFIGURE_ARGS += -Denable_asm=true
endif
else
CONFIGURE_ARGS += -Denable_asm=false
endif

endif

include ../../mk/spksrc.cross-meson.mk
6 changes: 3 additions & 3 deletions cross/dav1d/digests
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
dav1d-1.4.2.tar.xz SHA1 6137672cb64714ab192fed167b852127eb45a2f8
dav1d-1.4.2.tar.xz SHA256 7392cf4c432734eebb383319b5e05e994bffdcdfe66f82287c38873601a4ef0b
dav1d-1.4.2.tar.xz MD5 cdfa07cb6641caad509ac8e46ae7aa2a
dav1d-1.4.3.tar.xz SHA1 daf40121d16d5f580c42b4e8374c91d34efd9835
dav1d-1.4.3.tar.xz SHA256 42fe524bcc82ea3a830057178faace22923a79bad3d819a4962d8cfc54c36f19
dav1d-1.4.3.tar.xz MD5 c84c685c76e51b98e998db0995bd365c
14 changes: 3 additions & 11 deletions cross/ffmpeg4/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ CONFIGURE_ARGS += --extra-cflags=-Wno-deprecated-declarations

include ../../mk/spksrc.common.mk

OPTIONAL_DEPENDS = native/nasm
OPTIONAL_DEPENDS += cross/chromaprint-fftw
OPTIONAL_DEPENDS = cross/chromaprint-fftw
OPTIONAL_DEPENDS += cross/dav1d
OPTIONAL_DEPENDS += cross/frei0r
OPTIONAL_DEPENDS += cross/libass
Expand All @@ -59,10 +58,6 @@ OPTIONAL_DEPENDS += cross/shine

# Define x86asm
ifeq ($(findstring $(ARCH),$(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
BUILD_DEPENDS = native/nasm
NASM_PATH = $(abspath $(PWD)/../../native/nasm/work-native/install/usr/local/bin)
ENV += AS=$(NASM_PATH)/nasm
ENV += PATH=$(NASM_PATH):$$PATH
CONFIGURE_ARGS += --x86asmexe=nasm

# Allow ASM on aarch64, disable on all others
Expand Down Expand Up @@ -186,13 +181,13 @@ endif
DEPENDS += cross/fdk-aac
CONFIGURE_ARGS += --enable-libfdk-aac --enable-nonfree

ifeq ($(findstring $(ARCH),alpine comcerto2k monaco $(ARMv8_ARCHS) $(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
ifeq ($(findstring $(ARCH),comcerto2k $(ARMv8_ARCHS) $(i686_ARCHS) $(x64_ARCHS)),$(ARCH))
DEPENDS += cross/libaom
CONFIGURE_ARGS += --enable-libaom
endif

# Add SVT-AV1 codec to supported ARCH
ifeq ($(findstring $(ARCH),alpine comcerto2k monaco $(ARMv8_ARCHS) $(x64_ARCHS)),$(ARCH))
ifeq ($(findstring $(ARCH),comcerto2k $(ARMv8_ARCHS) $(x64_ARCHS)),$(ARCH))
DEPENDS += cross/svt-av1
CONFIGURE_ARGS += --enable-libsvtav1
endif
Expand All @@ -215,9 +210,6 @@ endif

ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH))
CONFIGURE_ARGS += --arch=arm --enable-neon --enable-thumb --disable-armv6 --disable-armv6t2 --disable-vfp --disable-armv5te
ifneq ($(findstring $(ARCH),alpine),$(ARCH))
CONFIGURE_ARGS += --extra-cflags=-DSYNO_ALPINE_NEON
endif
endif

ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH))
Expand Down
Loading
Loading