From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from ffbox0-bg.mplayerhq.hu (ffbox0-bg.ffmpeg.org [79.124.17.100]) by master.gitmailbox.com (Postfix) with ESMTPS id 790694E564 for ; Wed, 12 Mar 2025 07:59:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 649EF68E597; Wed, 12 Mar 2025 09:59:15 +0200 (EET) Received: from mail-lj1-f172.google.com (mail-lj1-f172.google.com [209.85.208.172]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 46D4B68B412 for ; Wed, 12 Mar 2025 09:59:09 +0200 (EET) Received: by mail-lj1-f172.google.com with SMTP id 38308e7fff4ca-30613802a6bso68298871fa.1 for ; Wed, 12 Mar 2025 00:59:09 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1741766348; x=1742371148; darn=ffmpeg.org; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :from:to:cc:subject:date:message-id:reply-to; bh=EYmquI0AWT346gB6NtaKSNqQojVGHo32Bo7lhmnDzio=; b=Z6SWXJIbWtRXiMON91OxmJCu+7jvmQufBsaSqS0SswBsvSHseci6yV4Oi3+BVbJJJS KQaZ1hL5/xa/As3ykbOcxiaRvORZUWw9X4rVIhPE1y2T6fjb7PVYa7L9wq6KqwSCAgQV VGglNNZV15Tmj/wWl82KxMBzY44+2srSeUezmO9YuZwnBiu2UhH2B9J9Ro9dZntKzswq e36TW0jTfLID0BDtrYSw5unRtT9V3o4NlTcM6ofSzwbp9w7+1wxWerV3opq3Oqu6J64T A5FlsElOIT7/AfMGFFFKxf8VsSgdaOrYoV1sIASi05HjFjB+ZKn6672Tixr//Jdr78T7 6bSg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1741766348; x=1742371148; h=mime-version:references:message-id:in-reply-to:subject:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=EYmquI0AWT346gB6NtaKSNqQojVGHo32Bo7lhmnDzio=; b=snL5IYU8qZVi5L50noLmGOrJ2KZw6gv/SoHBj8tNpIL8zkAgvoZxw0u0wRx14Xs3Qw s9+Bads+8dTA0jzpjEIAAywSqKNgUObBrixG+iYZIaQSUbzdQWQageC5vPIXpMWHNTxX Yd00m5Y/icjR9dZybiHRniCdU3OoM4DC5j5wtdf/9sZHQy8COD3ktAgGCALlWl15wZKk XWn8FImMT9nfG6E6GCf/nSXJaMOPsMheDZftfsZCJ8DhRyV9VFyFItJsVOMoAk87Rhwy yVPF3ix91QLYBzRfBRbp/4lc17+IyO4AM2qWP/y7VVRsnXIORcf8pO6Oa4FCmPdAyunf 6TCg== X-Gm-Message-State: AOJu0YwK2eNBL/+TvENFOU2SddfxgHu2ff1fAz0j39VjYgIxg7C8ia9g BK19ZuuS/M934uuLaK2JGdDkUYzPeqhDpduDJ4O+syViznaJsAXhrxc8ci1CEZg9zamS9VBiFEt zq7I+ X-Gm-Gg: ASbGncv6mrAY2phdOoOsU8fqFvYGb0feOBs3Vkr906OA+4zFpg5zAB0zzOIu/+W/IpI S5rr0XzFmaAP9g/8a//Xc6OIKErE/DXlMQ+JOf9WvrczcYpjoP0V7zgFEL+HikMyclci5/27HU8 k4rOzKKM3VCIVGqlGMTfDECbDQyRa/HvqqVMyedJFNZAKnEZxaEQ0ZatG5tU365Q0PnSOEblpAP Js8UwPtUIQgSmu2AexV7NSnfGmuKcZOwvxVAKHCdy4ng+IQJbFdbsS1Rrzqd3fL96wOtTD1xrQu OKR5pOkYsoodp8Dapi9xgrXiEMYV4V5eiA6W6K3wVwJ3e8vDqVJMdJnYZbOdFsZbwU0HLo/2Lui HmziPie4Gdo+H9vT2h3WcNg4KEFa59thz68bp/+Wj X-Google-Smtp-Source: AGHT+IGjA24XDMvlxhz+CfX2CK3eLLK/6Ny3+uqLsWjWP5oAo/pd87s7AGfz6MxcvqBVI/mOgscpcw== X-Received: by 2002:a2e:a278:0:b0:30b:f420:97d9 with SMTP id 38308e7fff4ca-30bf466dbdamr58941591fa.33.1741766346717; Wed, 12 Mar 2025 00:59:06 -0700 (PDT) Received: from tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net (tunnel335574-pt.tunnel.tserv24.sto1.ipv6.he.net. [2001:470:27:11::2]) by smtp.gmail.com with ESMTPSA id 38308e7fff4ca-30c2e113b4bsm2848311fa.91.2025.03.12.00.59.05 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 12 Mar 2025 00:59:06 -0700 (PDT) Date: Wed, 12 Mar 2025 09:59:05 +0200 (EET) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: FFmpeg development discussions and patches In-Reply-To: <20250312074216.4021-1-ffmpeg@gyani.pro> Message-ID: <1b60ed3-5c53-b3c9-25c-d7e47c77367@martin.st> References: <20250312074216.4021-1-ffmpeg@gyani.pro> MIME-Version: 1.0 Subject: Re: [FFmpeg-devel] [PATCH] ffbuild: read library linker objects from a file X-BeenThere: ffmpeg-devel@ffmpeg.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: FFmpeg development discussions and patches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: FFmpeg development discussions and patches Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset="us-ascii"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Wed, 12 Mar 2025, Gyan Doshi wrote: > The linker command can exceed the maximum argument limit on MinGW, > especially for libavcodec. > > The objects list is now stored in a file and passed to the linker. > --- > ffbuild/library.mak | 4 +++- > 1 file changed, 3 insertions(+), 1 deletion(-) > > diff --git a/ffbuild/library.mak b/ffbuild/library.mak > index 793e9d41fa..781b018e00 100644 > --- a/ffbuild/library.mak > +++ b/ffbuild/library.mak > @@ -66,8 +66,10 @@ $(SUBDIR)$(SLIBNAME): $(SUBDIR)$(SLIBNAME_WITH_MAJOR) > > $(SUBDIR)$(SLIBNAME_WITH_MAJOR): $(OBJS) $(SHLIBOBJS) $(SLIBOBJS) $(SUBDIR)lib$(NAME).ver > $(SLIB_CREATE_DEF_CMD) > - $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) $$(filter %.o,$$^) $(FFEXTRALIBS) > + $(Q)echo $$(filter %.o,$$^) > $$@.objs > + $$(LD) $(SHFLAGS) $(LDFLAGS) $(LDSOFLAGS) $$(LD_O) @$$@.objs $(FFEXTRALIBS) > $(SLIB_EXTRA_CMD) > + -$(RM) $$@.objs Don't we need do the same for static libraries too? On first glance, this looks quite reasonable... However, the limit that is an issue is the length of a command line. The .objs file is written with an "echo" command - doesn't that fundamentally also hit the same limit (just a little bit later, as there are fewer command line flags in this command)? Or do we assume that make executes it with a shell, where the shell handles "echo" as a shell builtin so that it doesn't actually spawn a subprocess for this? Can you test it, if you could extend the list of object files to the point where the .objs file is clearly over 32 KB, and verify that it did include all the files you intended? Secondly, less fundamental - even if we try to remove the .objs file here at the same time it's quite possible for it to be left behind (e.g. if the linking command fails) - so it would be good to make sure that it is removed on "make clean" too. Plus we probably should include it in .gitignore, if someone does in-tree builds. // Martin _______________________________________________ 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".