Commit 1374a33c authored by Martin Storsjö's avatar Martin Storsjö

contrib: x264: Fix building for windows on arm

This includes a backport of one patch (from original git commit
7b13b31be60, included in the x264 master branch since Dec 24 2017),
and passing the necessary configure parameters for setting up
gas-preprocessor for this configuration.
parent 833d3e8f
From 064d3bbd30e3dc8d7096ee267de66b6d0a56cd02 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Martin=20Storsj=C3=B6?= <martin@martin.st>
Date: Mon, 16 Oct 2017 22:50:26 +0300
Subject: [PATCH] arm: Check for __ELF__ instead of !__APPLE__, for using
.arch/.fpu
For windows, when building with armasm, we already filtered these out
with gas-preprocessor.
By filtering them out already in the source, we can also build directly
with clang for windows (which also require wrapping the assembler in
gas-preprocessor for converting instructions to thumb form, but
gas-preprocessor doesn't and shouldn't filter out them in the clang
configuration).
---
common/arm/asm.S | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/common/arm/asm.S b/common/arm/asm.S
index 619a509..37a4229 100644
--- a/common/arm/asm.S
+++ b/common/arm/asm.S
@@ -28,7 +28,7 @@
.syntax unified
-#ifndef __APPLE__
+#ifdef __ELF__
.arch armv7-a
.fpu neon
#endif
--
2.7.4
......@@ -35,6 +35,9 @@ ifndef HAVE_WIN32
X264CONF += --enable-pic
else
X264CONF += --enable-win32thread
ifeq ($(ARCH), arm)
X264_AS = AS="./tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- $(CC) -mimplicit-it=always"
endif
endif
ifdef HAVE_CROSS_COMPILE
X264CONF += --cross-prefix="$(HOST)-"
......@@ -77,6 +80,7 @@ x264 x26410b: %: x264-git.tar.bz2 .sum-%
mkdir -p $*-git
tar xvjf "$<" --strip-components=1 -C $*-git
$(UPDATE_AUTOCONFIG)
$(APPLY) $(SRC)/x264/arm-asm-win.patch
mv $*-git $*
x262: x262-git.tar.gz .sum-x262
......@@ -89,7 +93,7 @@ x262: x262-git.tar.gz .sum-x262
.x264: x264
$(REQUIRE_GPL)
cd $< && $(HOSTVARS) ./configure $(X264CONF)
cd $< && $(HOSTVARS) $(X264_AS) ./configure $(X264CONF)
cd $< && $(MAKE) install
touch $@
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment