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 A9A7E4D068 for <ffmpegdev@gitmailbox.com>; Mon, 17 Mar 2025 17:30:19 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 0DDFE687BA9; Mon, 17 Mar 2025 19:30:16 +0200 (EET) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [80.241.56.151]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 73D73687B5D for <ffmpeg-devel@ffmpeg.org>; Mon, 17 Mar 2025 19:30:09 +0200 (EET) Received: from smtp2.mailbox.org (smtp2.mailbox.org [10.196.197.2]) (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-101.mailbox.org (Postfix) with ESMTPS id 4ZGhnB38bnz9sWc for <ffmpeg-devel@ffmpeg.org>; Mon, 17 Mar 2025 18:30:06 +0100 (CET) Message-ID: <34ad06cb-4e8c-42bc-89bb-d3013d7e0cdd@gyani.pro> Date: Mon, 17 Mar 2025 23:00:01 +0530 MIME-Version: 1.0 To: ffmpeg-devel@ffmpeg.org References: <20250317151914.19384-1-ffmpeg@gyani.pro> <tencent_0E1CE84713EE936335C82901CEBDC547D305@qq.com> Content-Language: en-US From: Gyan Doshi <ffmpeg@gyani.pro> In-Reply-To: <tencent_0E1CE84713EE936335C82901CEBDC547D305@qq.com> Subject: Re: [FFmpeg-devel] [PATCH] ffbuild: use response files only if ar accepts them 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/34ad06cb-4e8c-42bc-89bb-d3013d7e0cdd@gyani.pro/> List-Archive: <https://master.gitmailbox.com/ffmpegdev/> List-Post: <mailto:ffmpegdev@gitmailbox.com> On 2025-03-17 09:44 pm, Zhao Zhili wrote: > >> On Mar 17, 2025, at 23:16, Gyan Doshi <ffmpeg@gyani.pro> wrote: >> >> This is to not break linking with toolchains that don't support reading >> args from a 'response file'. >> --- >> I've assumed that ld on a system will have same support as ar. >> >> configure | 7 +++++++ >> ffbuild/library.mak | 8 ++++++++ >> 2 files changed, 15 insertions(+) >> >> diff --git a/configure b/configure >> index f6964c4ee1..d84e32196d 100755 >> --- a/configure >> +++ b/configure >> @@ -5230,6 +5230,12 @@ else >> ar_o='$@' >> fi >> >> +if $ar 2>&1 | grep -qi "@.*file"; then >> + ar_objs="true" >> +else >> + ar_objs="" >> +fi > Works for me. Good. Let's wait for another report. Regards, Gyan > >> + >> add_cflags $extra_cflags >> add_cxxflags $extra_cxxflags >> add_objcflags $extra_objcflags >> @@ -8133,6 +8139,7 @@ DEPX86ASM=$x86asmexe >> DEPX86ASMFLAGS=\$(X86ASMFLAGS) >> AR=$ar >> ARFLAGS=$arflags >> +AR_OBJS=$ar_objs >> AR_O=$ar_o >> AR_CMD=$ar >> NM_CMD=$nm >> diff --git a/ffbuild/library.mak b/ffbuild/library.mak >> index 72e3872157..7e1871b74c 100644 >> --- a/ffbuild/library.mak >> +++ b/ffbuild/library.mak >> @@ -35,8 +35,12 @@ OBJS += $(SHLIBOBJS) >> endif >> $(SUBDIR)$(LIBNAME): $(OBJS) $(STLIBOBJS) >> $(RM) $@ >> +ifeq ($(AR_OBJS),true) >> $(Q)echo $^ > $@.objs >> $(AR) $(ARFLAGS) $(AR_O) @$@.objs >> +else >> + $(AR) $(ARFLAGS) $(AR_O) $^ >> +endif >> $(RANLIB) $@ >> -$(RM) $@.objs >> >> @@ -68,8 +72,12 @@ $(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) >> $(Q)echo $$(filter %.o,$$^) > $$@.objs >> $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) @$$@.objs $(FFEXTRALIBS) >> +else >> + $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) >> +endif >> $(SLIB_EXTRA_CMD) >> -$(RM) $$@.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-request@ffmpeg.org with subject "unsubscribe". > _______________________________________________ > 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". _______________________________________________ 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".