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 516A04E01D for ; Fri, 2 May 2025 13:40:09 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 132E768B264; Fri, 2 May 2025 16:40:06 +0300 (EEST) Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 9747A687D43 for ; Fri, 2 May 2025 16:39:59 +0300 (EEST) Received: by mail-ed1-f44.google.com with SMTP id 4fb4d7f45d1cf-5f6222c6c4cso3043447a12.1 for ; Fri, 02 May 2025 06:39:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1746193198; x=1746797998; 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=Lc0iOpHNcprmbawYOMQ5zw2FMksiftwzAss6ZraVZLY=; b=iOcg0cWpEnMOAsQA8c9oAnAf0OKMiZUduawHfWvEkMGEPbHxccvBN6m0UV1hWPmHn0 zzHdJGvRW3m24fgydaJ7fx5vP2rQSlS16lgmD4tDfbWMz4I6lnPVxij4/oYWAXcdrY/i 6gtrNru1qMSl4lBD4LAhy/L5OpVzuOoD98Pwag90n0yg14s7GQ5SM169moaDLUwCvUAe 7Ft+ySQYkJzuTcAxTdKSiAh+Re8ptqWWVr66EJnaRYNR6Fw13OS1Htr/PXa9gX5l+RXg OVx3qo5PcBYOj75ET+w9axR+jcqrgF9voxvXI5aJ2dXEMAIioc/+xR+lq8XR9yYrMwse UHpA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746193198; x=1746797998; 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=Lc0iOpHNcprmbawYOMQ5zw2FMksiftwzAss6ZraVZLY=; b=NVgf0uZg4ofgMAEDi+/d1VkhlV/+KKUrdvseMMoHV8S77fh0jmg+QikGWl/ZoADShf zTK8s2sQjah5o5X8Yk1YdUpWTp6tco1ubeyo2xiCVGNgPMIGUPWIUtom8uk1DX/fY8aG pWzMlTQvWYvFkK5pLjDYMl0ZYh+JwjYxsBLa81TyLxabAaXPe/oWvzeHXnhs+Gl1chjv t7o6AzUJBmZ3OAAkSnL41y5cN26N6hIXnU/Cu5IfvrDnTJLSTC0BByE7E92wa2++TtEE OYjo0WySAbg5Vkkda0Khl9Dphdh0XvouKXm2AbaEFONgRDNYG6pQt6DZSSqYeCY9jEzN T0KQ== X-Gm-Message-State: AOJu0YzpcKWRQlV1TO0pw61SGow4wH1MkEONqOM/EhoVewj44hHifcNF 6X6E+Hor52RzYYFLgZST2ko8m4dpoLnYcISpzwBwaPT6c9Xf60E89B63aoQEH9jC5pxvpw+ERFJ osw== X-Gm-Gg: ASbGncsnaPBVrEuePk38T5vEEbYkZblleEIymkbDOlGm4JEFq6CortG3xgtkVsYQqTx BUdbj5sdnMMM8aB8Vz0LGG/SgFbcEq+/GIeUaHr5x5TFJXlJHTLoFQqrbpA8sSdOLTSbp9M9db/ WvGqu2GQOr9eX4wlFA7EPHIVJ+ZlUuuTul0tL6nLo3eVrM6MrjW9HmoLVhw/G5wGpo0UolHXiLG DcOk4lVhALQ9eYCndZw5OhE2xRWZWyyRKJcJhR2ir5BYfFpC87Q7gH3vGdPMUUtTNEdlpDdTgSY YXSHRnIRSCOjWm/k2hjc87rs2xC8+h5fHu/cen60nBtjuQ1U1jIi3A9othMJP/IdiUGmt6bw2fj kuN61K6wW1F8p8l5EfNO6vGCkHOwbAKHwcs1M X-Google-Smtp-Source: AGHT+IEHeMZN416w1bAEBkrqZlXfOLthVH2PZ9KWCRU5oJfcQuLOGdvCCWsBSIOw7xXonXOBUHqaYw== X-Received: by 2002:a17:906:dc90:b0:acb:32c5:43ff with SMTP id a640c23a62f3a-ad17a862317mr287259266b.0.1746193198419; Fri, 02 May 2025 06:39:58 -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 a640c23a62f3a-ad189148b8csm52203666b.35.2025.05.02.06.39.58 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 02 May 2025 06:39:58 -0700 (PDT) Date: Fri, 2 May 2025 16:39:57 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <20250429074913.40779-1-martin@martin.st> Message-ID: <8ce95b5-5fb4-40b9-aa8b-979ed02179ad@martin.st> References: <20250429074913.40779-1-martin@martin.st> MIME-Version: 1.0 X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [PATCH] configure: Enable -fno-common for Darwin targets, avoid linker warnings 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: quoted-printable Content-Type: text/plain; charset="iso-8859-15"; Format="flowed" Errors-To: ffmpeg-devel-bounces@ffmpeg.org Sender: "ffmpeg-devel" Archived-At: List-Archive: List-Post: On Tue, 29 Apr 2025, Martin Storsj=F6 wrote: > Since GCC 10 and llvm.org Clang 11, -fno-common is the default. > However Apple's Xcode Clang hasn't followed suit yet, and still > defaults to -fcommon. > > Compiling with -fcommon causes uninitialized global variables to > be treated as "common" (which allows multiple object files to have > similar definitions). > > Common variables seem to have the issue that their intended alignment > isn't signaled, so the linker assumes that they may need alignment > according to their full size. > > With large global tables, this can lead to linker warnings like > this, with Xcode 16.3: > > ld: warning: reducing alignment of section __DATA,__common from 0x8000= to 0x4000 because it exceeds segment maximum alignment > > This can be reproduced with a small snippet like this: > > char table[16385]; > int main(int argc, char* argv[]) { return 0; } > > Compiling with -fno-common avoids this issue and warning, and > matches the default behaviour of other compilers. (Compiling with > -fno-common also avoids the risk of accidentally accepting > duplicate definitions of global variables, as long as they are > uninitialized.) > --- > configure | 7 +++++++ > 1 file changed, 7 insertions(+) Will push soon. // 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".