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 DD1EC43B51 for ; Sun, 13 Nov 2022 14:45:18 +0000 (UTC) Received: from [127.0.1.1] (localhost [127.0.0.1]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTP id 29FD168BA62; Sun, 13 Nov 2022 16:45:15 +0200 (EET) Received: from mail-ej1-f42.google.com (mail-ej1-f42.google.com [209.85.218.42]) by ffbox0-bg.mplayerhq.hu (Postfix) with ESMTPS id 2483D689B37 for ; Sun, 13 Nov 2022 16:45:09 +0200 (EET) Received: by mail-ej1-f42.google.com with SMTP id kt23so22677281ejc.7 for ; Sun, 13 Nov 2022 06:45:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=to:subject:message-id:date:from:in-reply-to:references:mime-version :from:to:cc:subject:date:message-id:reply-to; bh=rcX6Ymo4ygtxBzcqFMLMyhatKpo9n3Fn+w2a/ZZFC9U=; b=RTVrbbQgxRUnF5dCqAcJvwCXG+jjM4gJWqR1gTVYP4J/tc6SeC8gYQfRa+RKcJZ4vv mLImfq2mypTESpabDrSJ/YDJJT58JpXomTqHnQJTKx6QgKrO1LursSYxzwJ+tebvz2hb X35aM2Pso3g4wNn888zRLl8i/WJTghPiADInKXjk3RyJTH+7TmfNptMgXy7/c5l+9jjD EjAVlcaQfwijQynE+4zcUusKPqVIlChV1xdaQxDWsGaqS5jHCFexJpGYFd/tMHSBnc5p K3M+SmnJKLL7ipG0cZLHNvA/7sr7+HV8nly9u5ON2yp72CfGzrXbN/0QApfSqHupxwm0 nLHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=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=rcX6Ymo4ygtxBzcqFMLMyhatKpo9n3Fn+w2a/ZZFC9U=; b=CHTLjhnbm0Q30l6d9kuAKaJaWtpPTlHyoujyHZzbGXvWR27yXPZqx0hJ7i5nBW9zcq 4OxWm7Q+l2iOpZ48iIJvTyhh6AyO/ruzyXIU3H6y28kjjqUOwNJP0a5WtrjM/5fqA31Q OCF4Dw6wCvRGUScUhXxZcgRlTYv1IlZWgQIeDxiDDinXJXGdF6eneH9S3zWMQv0kQOoC dtSRJRTPIl4XWkLC8Hyz0N/czGUNsUlrbjLpgcbyqPMO9fB5I5hA9aVtvL1L8486Sfaj g5oJm3Nsn2lzdtvlk/hKVElpHpcctfUk0YYCGwewCERacayIgaR3Wt0D10AZh5NFdZKT xBww== X-Gm-Message-State: ANoB5pkrrmuigScWnoqWdSa+I1ChM8tF4NblG9SJxiS7vBz5jev0i2Xf YPm6KQH8K3kokinf/IfwoJ/7c0+hU6V9DY6enkKbkoGY2js= X-Google-Smtp-Source: AA0mqf7pSOBLzudxCtb8NZx0SeQdnpi5/5qjn6yYeRUi/t9f0gBeOey0GvP244LPGyHMs8DDoGIFYz7e4loArcZC/w0= X-Received: by 2002:a17:907:cb85:b0:7ad:b9a0:8a9b with SMTP id un5-20020a170907cb8500b007adb9a08a9bmr7950898ejc.509.1668350708079; Sun, 13 Nov 2022 06:45:08 -0800 (PST) MIME-Version: 1.0 References: <1ba17c0d-7a16-2fdb-1c85-74641994fff1@web.de> In-Reply-To: From: "Ronald S. Bultje" Date: Sun, 13 Nov 2022 09:44:56 -0500 Message-ID: To: FFmpeg development discussions and patches X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: [FFmpeg-devel] [Question] Technical reason why FFmpeg sets a mstack-alignment value on compile time? 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-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: Hi, On Sun, Nov 13, 2022 at 8:47 AM Nomis101 wrote: > Am 12.11.22 um 23:09 schrieb Ronald S. Bultje: > > Hi, > > > > On Sat, Nov 12, 2022 at 1:57 PM Nomis101 wrote: > > > >> Hi.If building FFmpeg, configure does set a value for mstack-alignment, > >> for example on macOS > >> -mstack-alignment=16. On HandBrake we found there is an issue with > current > >> Clang in Xcode about > >> conflicting 'override-stack-alignment' values if we build with ThinLTO. > >> > >> "ld: linking module flags 'override-stack-alignment': IDs have > conflicting > >> values" > >> > >> I found out why this is. x264 does set -mstack-alignment=64 in > configure, > >> FFmpeg does set > >> -mstack-alignment=16 and this seems to be a conflict when linking. If I > >> modify both configure files > >> and remove the mstack-alignment part, then the build does finish with no > >> error. > >> > >> And here comes my questions. I was wondering, about the technical reason > >> why FFmpeg does set > >> mstack-alignment? And if it would be safe to disable it in case FFmpeg > is > >> compiled with ThinLTO (for > >> HandBrake)? > >> > > > > It can safely be set to the higher of the two values, it has the same > > meaning. Alignment of 64 implies alignment of 16. > Thanks. I found out, that its enough to disable the mstack-alignment part > for x264 in case of > ThinLTO. This will also fix the error. > For people looking at this in the archives after a google search, trying this out and wondering why their x264 crashes, please see the following reference: https://mailman.videolan.org/pipermail/x264-devel/2022-November/012963.html (Summary: if you remove the stack alignment in x264, please also remove the assumption in x264's build that the stack *is* in fact aligned, and then everything will work fine (although a few instructions slower).) Ronald _______________________________________________ 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".