-
-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
base: master
Are you sure you want to change the base?
remove native nasm #6263
Changes from all commits
7889de7
2c4a9cb
d880967
448c879
52b31b8
db7c4ba
e5b50fa
db9b00f
f7381e6
bffe33b
49d2ca7
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
|
@@ -59,10 +58,11 @@ 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 | ||
NASM_BINARY = $(shell which nasm) | ||
ifeq ($(NASM_BINARY),) | ||
$(error nasm not found. Please intall NASM assembler) | ||
endif | ||
ENV += AS=$(NASM_BINARY) | ||
Comment on lines
+61
to
+65
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is that test even needed? I did not bother with that for ffmpeg5-6-7, maybe worth either using it everywhere or I would suggest not at all. |
||
CONFIGURE_ARGS += --x86asmexe=nasm | ||
|
||
# Allow ASM on aarch64, disable on all others | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -7,7 +7,6 @@ PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) | |
PKG_DIR = $(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = | ||
OPTIONAL_DEPENDS = native/nasm | ||
|
||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) | ||
|
||
|
@@ -17,7 +16,10 @@ LICENSE = https://raw.githubusercontent.com/webmproject/libvpx/master/LICENSE | |
|
||
INSTALL_TARGET = libvpx_install | ||
|
||
CONFIGURE_ARGS += --disable-static --enable-shared --prefix=$(INSTALL_PREFIX) | ||
# configure does not work with GNU_CONFIGURE = 1 (Unknown option "--host=x86_64-pc-linux-gnu") | ||
CONFIGURE_ARGS = --prefix=$(INSTALL_PREFIX) | ||
|
||
CONFIGURE_ARGS += --disable-static --enable-shared | ||
CONFIGURE_ARGS += --enable-vp8 --enable-vp9 --disable-examples --disable-docs --disable-unit_tests | ||
CONFIGURE_ARGS += --enable-postproc --enable-vp9-postproc --enable-pic | ||
CONFIGURE_ARGS += --enable-vp9-highbitdepth --enable-better-hw-compatibility | ||
|
@@ -28,40 +30,33 @@ include ../../mk/spksrc.archs.mk | |
|
||
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=generic-gnu | ||
ADDITIONAL_CPPFLAGS = -std=c++0x | ||
ADDITIONAL_CXXFLAGS = -std=c++0x | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=armv7-linux-gcc | ||
CONFIGURE_ARGS += --disable-neon | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Disabling of neon was done in this PR #5620 So from the commit log it states disabling neon (i.e. which includes
|
||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=generic-gnu | ||
endif | ||
|
||
# neon_asm does not work under armv8/arm64 | ||
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=armv8-linux-gcc | ||
endif | ||
|
||
# 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 += --as=nasm | ||
CONFIGURE_ARGS += --disable-sse4_1 | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(i686_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=x86-linux-gcc | ||
# --as=auto: prefers yasm over nasm | ||
CONFIGURE_ARGS += --as=auto | ||
CONFIGURE_ARGS += --disable-sse4_1 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @th0ma7 can you remember why you disabled sse4_1 for intel archs? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change comes from this PR: #6148 But I haven't left any descriptions as to why I disabled it? Maybe it failed on DSM6, again using gcc <= 4.9.x for that specific libvpx version (i.e 1.14.1)? Looking a bit further this may have been a mistake from my part as SSE4.1 (Streaming SIMD Extensions 4.1) has nothing to do with newer AVX extensions and may have mixed them somehow. A bit more reading on it makes it that pretty much all "recent" intel based nas from synology (i.e. less than 10-12 years old) should support this extension... I believe it is safe to remove that. |
||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) | ||
CONFIGURE_ARGS += --target=x86_64-linux-gcc | ||
# --as=auto: prefers yasm over nasm | ||
CONFIGURE_ARGS += --as=auto | ||
CONFIGURE_ARGS += --disable-sse4_1 | ||
endif | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,12 @@ | ||
PKG_NAME = openh264 | ||
PKG_VERS = 2.4.1 | ||
PKG_EXT = tar.gz | ||
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIST_NAME = v$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIST_SITE = https://github.com/cisco/openh264/archive/refs/tags | ||
PKG_DIST_SITE = https://github.com/cisco/openh264/archive | ||
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_VERS).$(PKG_EXT) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_VERS) | ||
|
||
DEPENDS = | ||
DEPENDS = | ||
|
||
HOMEPAGE = http://www.openh264.org/ | ||
COMMENT = OpenH264 is a codec library which supports H.264 encoding and decoding. It is suitable for use in real time applications such as WebRTC. | ||
|
@@ -15,14 +15,10 @@ LICENSE = BSD | |
UNSUPPORTED_ARCHS = $(PPC_ARCHS) | ||
|
||
CONFIGURE_ARGS += -Dtests=disabled | ||
ADDITIONAL_CPPFLAGS = -O | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why? is it to diable optimizations (i.e. |
||
|
||
POST_INSTALL_TARGET = openh264-post_install | ||
|
||
BUILD_DEPENDS = native/nasm | ||
NASM_PATH = $(realpath $(WORK_DIR)/../../../native/nasm/work-native/install/usr/local/bin) | ||
ENV += PATH=$(NASM_PATH):$$PATH | ||
ENV += AS=$(NASM_PATH)/nasm | ||
|
||
include ../../mk/spksrc.cross-meson.mk | ||
|
||
.PHONY: openh264-post_install | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,56 +3,52 @@ PKG_VERS = 20240512-stable | |
PKG_EXT = tar.gz | ||
PKG_GIT_HASH = 4613ac3c15fd75cebc4b9f65b7fb95e70a3acce1 | ||
PKG_DIST_NAME = $(PKG_NAME)-master.$(PKG_EXT) | ||
PKG_DIST_FILE = $(PKG_NAME)-$(PKG_GIT_HASH).$(PKG_EXT) | ||
PKG_DIST_SITE = https://code.videolan.org/videolan/x264/-/archive/$(PKG_GIT_HASH) | ||
PKG_DIST_FILE = $(PKG_NAME)-git$(PKG_GIT_HASH).$(PKG_EXT) | ||
PKG_DIR = $(PKG_NAME)-$(PKG_GIT_HASH) | ||
|
||
DEPENDS = | ||
OPTIONAL_DEPENDS = native/nasm | ||
|
||
# configure fails in "endian test" | ||
UNSUPPORTED_ARCHS = $(OLD_PPC_ARCHS) | ||
|
||
HOMEPAGE = https://www.videolan.org/developers/x264.html | ||
COMMENT = x264 is a free software library and application for encoding video streams into the H.264/MPEG-4 AVC forma | ||
LICENSE = GPLv2 | ||
|
||
GNU_CONFIGURE = 1 | ||
|
||
CONFIGURE_ARGS = --enable-shared | ||
CONFIGURE_ARGS += --enable-pic | ||
# configure with "GNU_CONFIGURE = 1" complains: "Unknown option --build=i686-pc-linux, ignored" | ||
CONFIGURE_ARGS = --prefix=$(INSTALL_PREFIX) | ||
CONFIGURE_ARGS += --enable-shared | ||
CONFIGURE_ARGS += --disable-opencl | ||
CONFIGURE_ARGS += --prefix=$(INSTALL_PREFIX) | ||
CONFIGURE_ARGS += --cross-prefix=$(TC_PATH)$(TC_PREFIX) | ||
|
||
include ../../mk/spksrc.cross-cc.mk | ||
|
||
ifeq ($(findstring $(ARCH),$(ARMv5_ARCHS) $(ARMv7_ARCHS) $(ARMv7L_ARCHS)),$(ARCH)) | ||
ENV += x264_ARCH=ARM | ||
CONFIGURE_ARGS += --disable-asm | ||
endif | ||
CONFIGURE_ARGS += --host=$(TC_TARGET) | ||
|
||
ifeq ($(findstring $(ARCH),$(ARMv8_ARCHS)),$(ARCH)) | ||
ENV += x264_ARCH=ARM | ||
CONFIGURE_ARGS += --host=aarch64-linux | ||
# Define x86asm or use gcc as assembler | ||
ifeq ($(findstring $(ARCH),$(i686_ARCHS) $(x64_ARCHS)),$(ARCH)) | ||
NASM_BINARY = $(shell which nasm) | ||
ifeq ($(NASM_BINARY),) | ||
$(error nasm not found. Please install NASM assembler) | ||
endif | ||
ENV += AS=$(NASM_BINARY) | ||
else | ||
Comment on lines
+28
to
+35
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly to ffmpeg, isn't this too much as nasm is always installed? |
||
# Expects to be assembled with a C compiler as frontend | ||
# .s is raw assembly passed to as | ||
# .S is assembly which expects to be preprocessed by a cpp then fed to assembler | ||
# More info: https://code.videolan.org/videolan/x264/-/issues/61 | ||
ENV += AS=$(abspath $(PWD)/../../toolchain/syno-$(ARCH)-$(TCVERSION)/work/$(TC_TARGET)/bin/$(TC_PREFIX)gcc) | ||
ENV += AS=$(TC_PATH)$(TC_PREFIX)gcc | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(ARM_ARCHS)),$(ARCH)) | ||
ENV += x264_ARCH=ARM | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(PPC_ARCHS)),$(ARCH)) | ||
ENV += x264_ARCH=PPC | ||
CONFIGURE_ARGS += --disable-asm | ||
endif | ||
|
||
# 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 | ||
endif | ||
|
||
ifeq ($(findstring $(ARCH),$(x64_ARCHS)),$(ARCH)) | ||
ENV += x264_ARCH=X86_64 | ||
endif | ||
|
There was a problem hiding this comment.
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: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: