--- v2: *switched state and make var name to response_files *changed option to standard action-optname format
configure | 25 +++++++++++++++++-------- ffbuild/library.mak | 4 ++-- 2 files changed, 19 insertions(+), 10 deletions(-) diff --git a/configure b/configure index 2fdbe8cbbe..eef7826788 100755 --- a/configure +++ b/configure @@ -427,6 +427,7 @@ Toolchain options: --enable-thumb compile for Thumb instruction set --enable-lto[=arg] use link-time optimization --env="ENV=override" override the environment variables + --disable-response-files Don't pass the list of objects to linker in a file [autodetect] Advanced options (experts only): --malloc-prefix=PREFIX prefix malloc and related names with PREFIX @@ -2669,6 +2670,7 @@ CMDLINE_SELECT=" extra_warnings logging optimizations + response_files rpath stripping version_tracking @@ -4143,6 +4145,7 @@ objformat="elf32" x86asmexe_default="nasm" windres_default="windres" striptype="direct" +response_files_default="auto" # OS target_os_default=$(tolower $(uname -s)) @@ -5188,7 +5191,7 @@ test -n "$cc_type" && enable $cc_type || : ${dep_cc_default:=$cc} : ${ld_default:=$cc} : ${host_ld_default:=$host_cc} -set_default ar as objcc dep_cc ld ln_s host_ld windres +set_default ar as objcc dep_cc ld ln_s host_ld windres response_files probe_cc as "$as" asflags_filter=$_flags_filter @@ -7754,12 +7757,18 @@ case $ld_type in ;; esac -{ -ar_out=${FFTMPDIR}/test$LIBSUF -respfile="@/dev/null" -out_arg="$(echo $ar_o | sed "s;\$@;$ar_out;g")" -test_cmd $ar $arflags $out_arg $respfile && ar_objs="true" || ar_objs="" -} +if [ "$response_files" != "no" ]; then + ar_out=${FFTMPDIR}/test$LIBSUF + respfile="@/dev/null" + out_arg="$(echo $ar_o | sed "s;\$@;$ar_out;g")" + if test_cmd $ar $arflags $out_arg $respfile; then + response_files="yes" + elif [ "$response_files" = "auto" ]; then + response_files="no" + else + die "Response files are not available with this toolchain. Exiting" + fi +fi enable frame_thread_encoder @@ -8141,7 +8150,7 @@ DEPX86ASM=$x86asmexe DEPX86ASMFLAGS=\$(X86ASMFLAGS) AR=$ar ARFLAGS=$arflags -AR_OBJS=$ar_objs +RESPONSE_FILES=$response_files AR_O=$ar_o AR_CMD=$ar NM_CMD=$nm diff --git a/ffbuild/library.mak b/ffbuild/library.mak index 15302852ec..3f7d604086 100644 --- a/ffbuild/library.mak +++ b/ffbuild/library.mak @@ -35,7 +35,7 @@ OBJS += $(SHLIBOBJS) endif $(SUBDIR)$(LIBNAME): $(OBJS) $(STLIBOBJS) $(RM) $@ -ifeq ($(AR_OBJS),true) +ifeq ($(RESPONSE_FILES),yes) -$(RM) $@.objs $(Q)$(foreach ARG,$^,echo -n "$(ARG) " >> $@.objs;) $(AR) $(ARFLAGS) $(AR_O) @$@.objs @@ -73,7 +73,7 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SHLIBOBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver $(SLIB_CREATE_DEF_CMD) -ifeq ($(AR_OBJS),true) +ifeq ($(RESPONSE_FILES),yes) -$(RM) $$@.objs $(Q)$(eval LDARGS=$$(filter %.o,$$^)) $(Q)$(foreach ARG,$$(LDARGS),echo -n "$(ARG) " >> $$@.objs;) -- 2.46.1 _______________________________________________ ffmpeg-devel mailing list ffmpeg-devel@ffmpeg.org https://ffmpeg.org/mailman/listinfo/ffmpeg-devel To unsubscribe, visit link above, or email ffmpeg-devel-requ...@ffmpeg.org with subject "unsubscribe".