From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <ffmpeg-devel-bounces@ffmpeg.org>
Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100])
	by master.gitmailbox.com (Postfix) with ESMTPS id 7BEDD476CA
	for <ffmpegdev@gitmailbox.com>; Sat, 29 Mar 2025 05:12:09 +0000 (UTC)
Received: from [127.0.1.1] (localhost [127.0.0.1])
	by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6BFA2687C46;
	Sat, 29 Mar 2025 07:12:07 +0200 (EET)
Received: from mout-p-202.mailbox.org (mout-p-202.mailbox.org [80.241.56.172])
 by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 0DC02687C36
 for <ffmpeg-devel@ffmpeg.org>; Sat, 29 Mar 2025 07:12:05 +0200 (EET)
Received: from smtp102.mailbox.org (smtp102.mailbox.org
 [IPv6:2001:67c:2050:b231:465::102])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256)
 (No client certificate requested)
 by mout-p-202.mailbox.org (Postfix) with ESMTPS id 4ZPlr33VlBz9sqs
 for <ffmpeg-devel@ffmpeg.org>; Sat, 29 Mar 2025 06:12:03 +0100 (CET)
Message-ID: <44f688eb-8069-4ecc-9f63-9a5505c21fce@gyani.pro>
Date: Sat, 29 Mar 2025 10:42:01 +0530
MIME-Version: 1.0
To: ffmpeg-devel@ffmpeg.org
References: <CALweWgDgxSRDvJY7dnu9zMJcCya131Hxxaw7o_HKyDyO=PZ9Fw@mail.gmail.com>
 <20250326141140.10249-1-ffmpeg@gyani.pro>
Content-Language: en-US
From: Gyan Doshi <ffmpeg@gyani.pro>
In-Reply-To: <20250326141140.10249-1-ffmpeg@gyani.pro>
X-Rspamd-Queue-Id: 4ZPlr33VlBz9sqs
Subject: Re: [FFmpeg-devel] [PATCH v2] configure: add option to select use
 of response files
X-BeenThere: ffmpeg-devel@ffmpeg.org
X-Mailman-Version: 2.1.29
Precedence: list
List-Id: FFmpeg development discussions and patches <ffmpeg-devel.ffmpeg.org>
List-Unsubscribe: <https://ffmpeg.org/mailman/options/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=unsubscribe>
List-Archive: <https://ffmpeg.org/pipermail/ffmpeg-devel>
List-Post: <mailto:ffmpeg-devel@ffmpeg.org>
List-Help: <mailto:ffmpeg-devel-request@ffmpeg.org?subject=help>
List-Subscribe: <https://ffmpeg.org/mailman/listinfo/ffmpeg-devel>,
 <mailto:ffmpeg-devel-request@ffmpeg.org?subject=subscribe>
Reply-To: FFmpeg development discussions and patches <ffmpeg-devel@ffmpeg.org>
Content-Transfer-Encoding: 7bit
Content-Type: text/plain; charset="us-ascii"; Format="flowed"
Errors-To: ffmpeg-devel-bounces@ffmpeg.org
Sender: "ffmpeg-devel" <ffmpeg-devel-bounces@ffmpeg.org>
Archived-At: <https://master.gitmailbox.com/ffmpegdev/44f688eb-8069-4ecc-9f63-9a5505c21fce@gyani.pro/>
List-Archive: <https://master.gitmailbox.com/ffmpegdev/>
List-Post: <mailto:ffmpegdev@gitmailbox.com>



On 2025-03-26 07:38 pm, Gyan Doshi wrote:
> ---
> v2:
>     *switched state and make var name to response_files
>     *changed option to standard action-optname format

Plan to push tomorrow.

Regards,
Gyan


>
>   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;)

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
https://ffmpeg.org/mailman/listinfo/ffmpeg-devel

To unsubscribe, visit link above, or email
ffmpeg-devel-request@ffmpeg.org with subject "unsubscribe".