diff options
| author | Z. Liu <zhixu.liu@gmail.com> | 2025-12-23 19:49:10 +0800 |
|---|---|---|
| committer | Sam James <sam@gentoo.org> | 2025-12-24 16:33:57 +0000 |
| commit | 6b15667b8830964c37231fa5496a60a824dc85b6 (patch) | |
| tree | c68c72cf2dad279806e061b6cce54320a6e85add /dev-python/google-api-python-client/google-api-python-client-2.184.0.ebuild | |
| parent | 69b7e79c8dac103934616dad9fe035655daf0243 (diff) | |
| download | gentoo-6b15667b8830964c37231fa5496a60a824dc85b6.tar.gz gentoo-6b15667b8830964c37231fa5496a60a824dc85b6.tar.bz2 gentoo-6b15667b8830964c37231fa5496a60a824dc85b6.zip | |
toolchain-funcs.eclass: fix pattern for detecting ld.bfd
See the test case below:
> out=$(echo -e "abcdef\n123456"); [[ ${out} =~ .*^"123456".* ]] && echo "matched" || echo "not matched"
This prints "matched" when using glibc, but "not matched" when using musl.
The root cause is that using ^ in the middle of the regex is undefined behavior.
Replace it with (^|$'\n'), i.e. match either the beginning of the string or a
position immediately following a newline.
Signed-off-by: Z. Liu <zhixu.liu@gmail.com>
Part-of: https://github.com/gentoo/gentoo/pull/45136
Closes: https://github.com/gentoo/gentoo/pull/45136
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'dev-python/google-api-python-client/google-api-python-client-2.184.0.ebuild')
0 files changed, 0 insertions, 0 deletions
