diff options
author | Igor Melnikov <imel@purelymail.com> | 2024-11-28 23:15:02 +0100 |
---|---|---|
committer | Anup Patel <anup@brainfault.org> | 2024-12-01 12:32:18 +0530 |
commit | 40e725da031ccdcc76492a7677e418ee5f6ef013 (patch) | |
tree | 52f148eb7825090e26af49944b52d6b5b96e6859 /platform/generic/platform.c | |
parent | a387a8dff05bd433c686b77dab13bab0221710e5 (diff) | |
download | opensbi-40e725da031ccdcc76492a7677e418ee5f6ef013.zip opensbi-40e725da031ccdcc76492a7677e418ee5f6ef013.tar.gz opensbi-40e725da031ccdcc76492a7677e418ee5f6ef013.tar.bz2 |
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 <imel@purelymail.com>
Reviewed-by: Anup Patel <anup@brainfault.org>
Diffstat (limited to 'platform/generic/platform.c')
0 files changed, 0 insertions, 0 deletions