diff mbox series

[v2,11/28] vulkan-samples: Disable overriding-option as error

Message ID 20250520-clang-toolchain-v2-11-db97c2eb3756@gmail.com
State Accepted, archived
Commit 0fc79e9b7aea87de87f461eebaaa2c00c9ec4a77
Headers show
Series clang: Add clang C/C++ toolchain | expand

Commit Message

Khem Raj May 21, 2025, 6:19 a.m. UTC
Clang complains/warns about mixing -ffp-contract=fast and -ffp-model=precise
lower this to warning only, this does not impact code generation, we still
get the diagnostic messge but wont break the build

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/recipes-graphics/vulkan/vulkan-samples_git.bb | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Ross Burton May 22, 2025, 9:55 a.m. UTC | #1
> On 21 May 2025, at 07:19, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote:
> +# Clang is fussy about incompatible options on aarch64/x86_64
> +# x86_64-poky-linux-clang++: error: overriding '-ffp-model=precise' option with '-ffp-contract=fast' [-Werror,-Woverriding-option]
> +CXXFLAGS:append:toolchain-clang = " -Wno-error=overriding-option"

Where are these conflicting flags coming from? Feels like we should be fixing the upstream Makefiles instead?

Ross
Khem Raj May 22, 2025, 3:37 p.m. UTC | #2
On Thu, May 22, 2025 at 2:55 AM Ross Burton <Ross.Burton@arm.com> wrote:
>
>
>
> > On 21 May 2025, at 07:19, Khem Raj via lists.openembedded.org <raj.khem=gmail.com@lists.openembedded.org> wrote:
> > +# Clang is fussy about incompatible options on aarch64/x86_64
> > +# x86_64-poky-linux-clang++: error: overriding '-ffp-model=precise' option with '-ffp-contract=fast' [-Werror,-Woverriding-option]
> > +CXXFLAGS:append:toolchain-clang = " -Wno-error=overriding-option"
>
> Where are these conflicting flags coming from? Feels like we should be fixing the upstream Makefiles instead?

Maybe, the end effect is that the last option wins and that is correct
here so I did not see a need to fix it. If someone wants to
that is appreciated,

>
> Ross
diff mbox series

Patch

diff --git a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
index 554e6eb29022e763de755dd550464cbd986de61e..505b6ab2f2865fec26339c9f1c4aa10c6735355b 100644
--- a/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
+++ b/meta/recipes-graphics/vulkan/vulkan-samples_git.bb
@@ -33,4 +33,8 @@  EXTRA_OECMAKE += "-DCMAKE_DISABLE_PRECOMPILE_HEADERS=ON"
 # This needs to be specified explicitly to avoid xcb/xlib dependencies
 EXTRA_OECMAKE += "-DVKB_WSI_SELECTION=D2D"
 
+# Clang is fussy about incompatible options on aarch64/x86_64
+# x86_64-poky-linux-clang++: error: overriding '-ffp-model=precise' option with '-ffp-contract=fast' [-Werror,-Woverriding-option]
+CXXFLAGS:append:toolchain-clang = " -Wno-error=overriding-option"
+
 COMPATIBLE_HOST = "(aarch64|x86_64).*-linux"