-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
remove native nasm #6263
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
base: master
Are you sure you want to change the base?
remove native nasm #6263
Changes from 11 commits
7889de7
2c4a9cb
d880967
448c879
52b31b8
db7c4ba
e5b50fa
db9b00f
f7381e6
bffe33b
49d2ca7
f097206
72cdfb9
9344927
4361403
43eeb65
c9e6be1
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 |
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. 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.
no a kind of default optimization. my favorite for cross packages is gcc -O option flagSet the compiler's optimization level.
|
||||||||||||||||||||||||||||||||||||||||||||
|
||||||||||||||||||||||||||||||||||||||||||||
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? 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.
|
||
# 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: