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 D382A4E290 for ; Mon, 5 May 2025 08:45:48 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 8BCB568B4D4; Mon, 5 May 2025 11:45:44 +0300 (EEST) Received: from mail-ed1-f43.google.com (mail-ed1-f43.google.com [209.85.208.43]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 15609687BB0 for ; Mon, 5 May 2025 11:45:38 +0300 (EEST) Received: by mail-ed1-f43.google.com with SMTP id 4fb4d7f45d1cf-5f4ca707e31so6427712a12.2 for ; Mon, 05 May 2025 01:45:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=martin-st.20230601.gappssmtp.com; s=20230601; t=1746434737; x=1747039537; 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=rq+8SPEgLuVaI8TQFEVdBBNZYAbvCdMnjHfHGU9aDuE=; b=YLM0QB4dY6iefMpmrWnLMkeb22g/RtbOyOI7xr/v3wI3WuNi5Q8Yu0rkKRZP1+YBRt 6AkENv1Fd3BlUvWtyHKb8g3qSbOs38VOKiIHdRK7FjzhDKBObltXNK0Spv7naBo5Fks1 vfBWNUS+ECy3r5Ceo9GNoZryAG1dxnZ0T4vas2HXFcaHPeiBpGA1Gi3yDw1RIMEMqcXc 6KrbkSdcJ21/Gp95NvKdLq5GUufj7Oi6vcm4QZ9lDpML5+ljFLcQQrs1u6DPzFJ35Jgz 9jl3+Bd155U5yFiCkBIWkbpahwEQjV2iXMvBP9pkgTf942c7pVT4Qy82oEaBrQP1HRYk 5ocQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1746434737; x=1747039537; 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=rq+8SPEgLuVaI8TQFEVdBBNZYAbvCdMnjHfHGU9aDuE=; b=bO8+FQjuZQC/Xkhq3KBvtU4Urj9ExfGSBKUk6+uG7FE9dpXsg27P+G0CGl9YaxQ/TS 5ZU3tui9FGWvJx5gCRQY4DZllykAI3Eqf8GyZoWLmI9FdWEmHR+I22NWJmnKVeRpGF/Z H8FCbgoviFEsVXzIOYjhxcmo+nD9Pm/0bkI+F4qzzT9gVO76JnL5zEJtI8MhXAim4SBe D8Qy1yOn8UcLD+oUMYLnq6po+jwgLizfqpUXSvM1sdguCSvi/bGtV0tx3WxapDEhS3Oc OlXBeWpNQgX4amRTIGuYgY5xXwPxHMNldRYZGoVPr6ZMiNMjev0hVs9evcbNUpZ+lOJY KGMA== X-Gm-Message-State: AOJu0Yyi0COT2lR2Or2nR7Bgh6lxuTELX3ow0ltfSZsNh+WKOzP/UCch hdariUbd0pNPhxr59PTPqDeowel5Zvb+UB6UhMknIRv1ZW4bp+/rSFF8YX2/ZLMdA/hZ28inFio 7bQ== X-Gm-Gg: ASbGnctuCXdgZ3LMGDy6tZuMT+jHEyNUN47r4kCtH3h5wYp3oEtiucQn1x2SByPfCBJ 0uMIYZNSbbwcndQMJD01oA0cCECJ327/3v0tMSbOdJhMYfe7HP8uWEmHoF/YJJcBzFfBjy/H8Fo X+j+6mgEQ2d+qYZWcxTZLGPaCs6YEs6/kfKOBP7r7v2bBl4ZJdN9aL+IhF+Z0zJjdqyWPsubUOu RA+NwLyybV5xc8eWmBcXd1kTuU60aqZoObGN5Hn4IsrGwwSuRqVaAB0MYGNzKJp0DnfbJf+dLKY 7pG++YWY0t0mcJwPzjgMvrx8TXQ0ohc0cZiy4mt8BtFqs7LzGE9psbd6dwloolbSGlryTROWqRq X3lyUc0CbqT6XP5e+OXpqgK8Q+4FnLvNWU/exbwzq2fzNl1c= X-Google-Smtp-Source: AGHT+IFrESoBxXRVc6l7Cx41SHnDcL9u/Z1DSPva4mbbFzVGl8E+/E09+L55uZm3vB9pjESd5YqGIw== X-Received: by 2002:a05:6402:510a:b0:5f8:d490:33c5 with SMTP id 4fb4d7f45d1cf-5fab05e3003mr5443217a12.33.1746434737000; Mon, 05 May 2025 01:45:37 -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 4fb4d7f45d1cf-5fa77bf289esm5183761a12.69.2025.05.05.01.45.36 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 05 May 2025 01:45:36 -0700 (PDT) Date: Mon, 5 May 2025 11:45:34 +0300 (EEST) From: =?ISO-8859-15?Q?Martin_Storsj=F6?= To: ffmpeg-devel@ffmpeg.org In-Reply-To: <8ce95b5-5fb4-40b9-aa8b-979ed02179ad@martin.st> Message-ID: <77906637-6166-dd36-92f-fffcfbe54366@martin.st> References: <20250429074913.40779-1-martin@martin.st> <8ce95b5-5fb4-40b9-aa8b-979ed02179ad@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 Fri, 2 May 2025, Martin Storsj=F6 wrote: > 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 0x800= 0 = >> 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. Pushed. I'll go ahead and backport this to a couple release branches as = well. // 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".