perf build: enable -fno-strict-aliasing
authorEric Biggers <ebiggers@kernel.org>
Wed, 25 Jun 2025 20:23:08 +0000 (13:23 -0700)
committerNamhyung Kim <namhyung@kernel.org>
Thu, 26 Jun 2025 17:51:40 +0000 (10:51 -0700)
commit55a18d2f3ff79c9082225f44e0abbaea6286bf99
treec58eec952c37037e17ccdff54361a864358247f8
parentc72bf82f96019216bb0a291d39c244977603661f
perf build: enable -fno-strict-aliasing

perf pulls in code from kernel headers that assumes it is being built
with -fno-strict-aliasing, namely put_unaligned_*() from
<linux/unaligned.h> which write the data using packed structs that lack
the may_alias attribute.  Enable -fno-strict-aliasing to prevent
miscompilations in sha1.c which would otherwise occur due to this issue.

Signed-off-by: Eric Biggers <ebiggers@kernel.org>
Reviewed-by: Ian Rogers <irogers@google.com>
Link: https://lore.kernel.org/r/20250625202311.23244-2-ebiggers@kernel.org
Signed-off-by: Namhyung Kim <namhyung@kernel.org>
tools/perf/Makefile.config