diff mbox series

[FFmpeg-devel,RESEND] configure: move ranlib -D test after setting defaults

Message ID 20220307141604.258466-1-adrian.ratiu@collabora.com
State New
Headers show
Series [FFmpeg-devel,RESEND] configure: move ranlib -D test after setting defaults | expand


Context Check Description
andriy/make_aarch64_jetson success Make finished
andriy/make_fate_aarch64_jetson success Make fate finished
andriy/make_armv7_RPi4 success Make finished
andriy/make_fate_armv7_RPi4 success Make fate finished

Commit Message

Adrian Ratiu March 7, 2022, 2:16 p.m. UTC
In Gentoo and ChromeOS we want to allow pure LLVM builds without
using GNU tools, so we block any unwanted mixed GNU/LLVM usages
(GNU tools are still kept around in our chroots for projects
like glibc which cannot yet be built otherwise).

The default ${cross_prefix}${ranlib_default} points to GNU and
fails, so move the test a bit later - after the defaults are
set and the proper values get overriden - such that ffmpeg
configure calls the llvm-ranlib we desire. [1]

[1] https://gitweb.gentoo.org/repo/gentoo.git/tree/media-video/ffmpeg/ffmpeg-4.4.1-r1.ebuild?id=7a34377e3277a6a0e2eedd40e90452a44c55f1e6#n477

Signed-off-by: Adrian Ratiu <adrian.ratiu@collabora.com>
 configure | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
diff mbox series


diff --git a/configure b/configure
index 650b52fcc5..98e29b49f9 100755
--- a/configure
+++ b/configure
@@ -4400,11 +4400,7 @@  cc_default="${cross_prefix}${cc_default}"
-if ${cross_prefix}${ranlib_default} 2>&1 | grep -q "\-D "; then
-    ranlib_default="${cross_prefix}${ranlib_default} -D"
-    ranlib_default="${cross_prefix}${ranlib_default}"
@@ -4437,6 +4433,10 @@  set_default arch cc cxx doxygen pkg_config ranlib strip sysinclude \
 enabled cross_compile || host_cc_default=$cc
 set_default host_cc
+if ${ranlib} 2>&1 | grep -q "\-D "; then
+    ranlib="${ranlib} -D"
 if ! $pkg_config --version >/dev/null 2>&1; then
     warn "$pkg_config not found, library detection may fail."