[vlc-commits] [Git][videolan/vlc][master] contrib: x264: Fix building for windows on arm after recent refactorings

Felix Paul Kühne (@fkuehne) gitlab at videolan.org
Sat Sep 24 11:20:53 UTC 2022



Felix Paul Kühne pushed to branch master at VideoLAN / VLC


Commits:
54587061 by Martin Storsjö at 2022-09-24T09:30:57+00:00
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 cfeea778135bf125ad2720a97199b7f1233b07af
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 697a2fcda3321c44f0ef2898b513851ba699ade7
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 d4c40209e85d51e1681a9aa8b7d38d0eb4caf39a
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.

- - - - -


1 changed file:

- contrib/src/x264/rules.mak


Changes:

=====================================
contrib/src/x264/rules.mak
=====================================
@@ -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 $@
 



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/54587061ce962bbb6936412ae991c8fd98460649

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/54587061ce962bbb6936412ae991c8fd98460649
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list