summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorIgor Melnikov <[email protected]>2024-11-28 23:15:02 +0100
committerAnup Patel <[email protected]>2024-12-01 12:32:18 +0530
commit40e725da031ccdcc76492a7677e418ee5f6ef013 (patch)
tree52f148eb7825090e26af49944b52d6b5b96e6859 /lib
parenta387a8dff05bd433c686b77dab13bab0221710e5 (diff)
Makefile: Fix POSIX grep for multiple patterns
grep -e "-mstrict-align\|-mno-unaligned-access" makes use of GNU grep's backslash-escaped alternation operator \| which is available in basic regular expression syntax (BRE) mode. However, in POSIX grep's BRE mode | is an ordinary character which, when backslash-escaped, matches itself. Therefore, the search pattern becomes a plain string '-mstrict-align|-mno-unaligned-access' which obviously never matches the expected error and CC_SUPPORT_STRICT_ALIGN is always set to y. When cross-compiling with LLVM on amd64-unknown-openbsd7.6 host for riscv64-unknown-elf target this results in a compilation error: clang: error: unsupported option '-mno-unaligned-access' for target 'riscv64-unknown-elf' Using multiple -e options for this case maintains consistent behaviour across different grep implementations and fixes the issue. Signed-off-by: Igor Melnikov <[email protected]> Reviewed-by: Anup Patel <[email protected]>
Diffstat (limited to 'lib')
0 files changed, 0 insertions, 0 deletions