Skip to content
Snippets Groups Projects
Commit 54587061 authored by Martin Storsjö's avatar Martin Storsjö Committed by Felix Paul Kühne
Browse files

contrib: x264: Fix building for windows on arm after recent refactorings

The recent refactorings of the contribs broke the build of x264
for windows on arm.

The following commits require changes to this file:

commit cfeea778
Date:   Thu Sep 15 10:28:30 2022 +0200

    contrib: put variables after the configure call

    It should make no different where the variables are. They should be before the
    target name if there is one.

For regular autoconf scripts, it's possible to pass environment
variables as arguments to the configure script, however not all
scripts named "configure" are autoconf and support this. In
particular, x264 and ffmpeg's configure scripts don't support
this feature. Therefore, setting $(X264_AS) as argument doesn't
have any effect, and just makes configure print a warning about
an unrecognized option like this:

    Unknown option AS=./tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- armv7-w64-mingw32-gcc -mimplicit-it=always, ignored

commit 697a2fcd
Date:   Mon Sep 19 09:05:27 2022 +0200

    contrib: build autotools/make targets in a build directory

Since this change, when we set AS=./tools/gas-preprocessor.pl, we
now must set AS=../tools/gas-preprocessor.pl instead, to account
for the different build directory.

commit d4c40209
Date:   Thu Sep 15 09:58:03 2022 +0200

    contrib: factorize configure/make calls

Since this change, $(MAKECONFIGURE) expands to a series of
"cd $</_build && ../configure ..", so just setting AS="..." before
that doesn't work, as the AS variable only would get set for the cd
command. Instead change X264_AS to expand to "export AS=...;" so that
the variable has effect on all commands in the same subshell.
parent ee462c83
No related branches found
No related tags found
1 merge request!2586contrib: x264: Fix building for windows on arm after recent refactorings
Pipeline #265908 passed with stage
in 23 minutes and 40 seconds
......@@ -35,12 +35,14 @@ else
X264CONF += --disable-win32thread
endif
ifeq ($(ARCH), arm)
X264_AS = AS="./tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- $(CC) -mimplicit-it=always"
# This isn't required in newer x264 snapshots, see
# 3d90057e15abf257320c89bb7146fb0c92687fa6 in x264.
X264_AS = export AS="../tools/gas-preprocessor.pl -arch arm -as-type clang -force-thumb -- $(CC) -mimplicit-it=always";
endif
ifeq ($(ARCH),aarch64)
# Configure defaults to gas-preprocessor + armasm64 for this target,
# unless overridden.
X264_AS = AS="$(CC)"
# unless overridden. This isn't required in newer x264 snapshots.
X264_AS = export AS="$(CC)";
endif
endif
ifdef HAVE_CROSS_COMPILE
......@@ -81,7 +83,7 @@ x264 x26410b: %: $(X264_BASENAME) .sum-%
.x264: x264
$(REQUIRE_GPL)
$(MAKEBUILDDIR)
$(MAKECONFIGURE) $(X264_AS) $(X264CONF)
$(X264_AS) $(MAKECONFIGURE) $(X264CONF)
+$(MAKEBUILD) install
touch $@
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment