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 ESMTP id AD35B474CD for ; Fri, 8 Sep 2023 18:56:16 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 6AA5668C861; Fri, 8 Sep 2023 21:56:13 +0300 (EEST) Received: from mail-oa1-f50.google.com (mail-oa1-f50.google.com [209.85.160.50]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id CE75268C7FE for ; Fri, 8 Sep 2023 21:56:06 +0300 (EEST) Received: by mail-oa1-f50.google.com with SMTP id 586e51a60fabf-1d53ab187e8so1844634fac.1 for ; Fri, 08 Sep 2023 11:56:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694199365; x=1694804165; darn=ffmpeg.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=xTPHwpyxX+bjpIEGLpP09VDLmRdQkq2pKLibe62QDmc=; b=WOo6ElxR8LFKkb1N6dUBMalDmFuu5IqAlpz27r5cNIXihkpc7CLw1k1zlHZ7AAQkSP IwE2YR+2mILzLQDCcWmPh8qkZV3WkZE3oLmKLrlnAXtoa6WuN21OLQmlWWna6AYoxF4K McbcAcbAii43lQFWg3s0JWMIyLet1tMWDS/9yjEjLF3TSlLwDIKpPH7cM6/c4DBfD+xl FPOaD9epNrl3or1eDJHZUozqYiktHua5dXWaCp2y3o44iAjOE29p+HVQbDtiIh12jOx8 R2wpDHfCZfECOtl8X/3GZGIvcV2XX+3tH7YMkuJKBcW4ISNYWm9G3iJ192OiTjymtg+A PYqw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694199365; x=1694804165; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=xTPHwpyxX+bjpIEGLpP09VDLmRdQkq2pKLibe62QDmc=; b=S5YGJBKXEjIDzO/lRi3y+KfP3yH6RI7kgxHx9REqFVYqS1S1OrC6nBaRUTMEcXHoe+ OM92klg+bGcEaNSEgLuDV+/Uz/gFpnBzfx9BUDoKUmMlrCZg6raM6uTq54qYKZFmSuPu lJUoYj8J371TRDOby0ZM68o9PjPALvlJAh5UwxVA8/tTqiSKihim8JlROlCYaAlkiqSa LSF7zIc3/yW8LqIRcxrSHQLNMUqi4371fBtd6jsUq4a8PFliLTaKCumb3hC7XCfee2Np JVWyBGpLjKXThBgMkVaEtgocHJjFAA9IuU3EjyJ+ZhS+cYDo8EvRChzaiGO1tIVSm0rB Bb/w== X-Gm-Message-State: AOJu0YzU/qnIpZZciN+QQ2dq7t4XetMOj/skax9eiq8/5vxMa+3Zqp93 Zcn6FLmRj4229R99LPEezHC7Sd3v476eEL9h/VZZV2RhZbc= X-Google-Smtp-Source: AGHT+IF1o46Wr3O4CW1k0co+mmCA7jcDHBpRrwfuJ060oPpBAAOlgSRU80CUYq7r4mdbcEfHEvjOqQHHc2fVO25jgaw= X-Received: by 2002:a05:6870:2102:b0:1b8:5d9e:638b with SMTP id f2-20020a056870210200b001b85d9e638bmr3667994oae.43.1694199365250; Fri, 08 Sep 2023 11:56:05 -0700 (PDT) MIME-Version: 1.0 References: <20230905232630.2031-1-kasper93@gmail.com> <32b7a66e-1b20-6912-6a2b-993821cd470c@rothenpieler.org> <2f980e77-31cb-64ae-d172-28f5cc498b3d@rothenpieler.org> In-Reply-To: <2f980e77-31cb-64ae-d172-28f5cc498b3d@rothenpieler.org> From: Kacper Michajlow Date: Fri, 8 Sep 2023 20:55:39 +0200 Message-ID: To: FFmpeg development discussions and patches Subject: Re: [FFmpeg-devel] [PATCH v2 1/2] configure: don't force specific C++ standard library linking 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 Cc: Timo Rothenpieler Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Fri, 8 Sept 2023 at 01:35, Timo Rothenpieler via ffmpeg-devel wrote: > > On 07.09.2023 23:38, Kacper Michajlow wrote: > > On Thu, 7 Sept 2023 at 15:12, Derek Buitenhuis > > wrote: > >> > >> On 9/6/2023 6:31 PM, Kacper Michajlow wrote: > >>> What would be a downside of preferring CXX always if it exists? > >> > >> FFmpeg runs in a multitude of environments with a multitude of portability > >> requirements. Needlessly linking a C++ runtime is not OK. > > > > This does not answer my question. Let me rephrase. Do we know the case > > where using C++ compiler driver rather than C would degrade the > > quality of the resulting build? > > > > Using C++ driver would indeed append the (correct) runtime library to > > the linker command, but if nothing references any symbols from it it > > would not be linked. It is also why the current way of forcing > > `lstdc++` kinda works, because it is silently ignored when not needed. > > > > Implementing logic to use C++ only when necessary is possible, but I'm > > not a big fan of such automation. And in practice not sure how well it > > would work, because it would require trying to link twice every > > dependency in configure. > > > > Also the fact that "FFmpeg runs in a multitude of environment" is > > precisely why I really don't like the current unconditional including > > `-lstdc++`. > > Couldn't you just check if stdc++ is in the ldflags/extralibs, and if > so, remove it, and use g++ to link? Well, I'm lost now. Are you suggesting building on top of existing hacks is a better solution than the proposed patch? I refuse supporting any kind of random `-lstdc++` adding in configure and then removing it in the end. - Kacper _______________________________________________ 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".