mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-13 19:52:20 +00:00
getconf detection: fix compiler error msg extraction (re: 3aa01a95
)
That patch didn't work for non-gcc, non-clang compilers -- at least Solaris Studio cc. It doesn't prefix error messages with "error:". As a result, it caused the build to fail on Solaris with native cc. src/lib/libast/comp/conf.sh: - Use a sed formula that should catch error messages prefixed by "line xx:" while still removing warnings and suggestions. This works on at least clang, gcc, Solaris Studio cc.
This commit is contained in:
parent
2f7918deec
commit
2e839d8775
1 changed files with 3 additions and 1 deletions
|
@ -833,7 +833,9 @@ unsigned int conf[] = {
|
||||||
[ -f $tmp.1.e ] || cp $tmp.e $tmp.1.e
|
[ -f $tmp.1.e ] || cp $tmp.e $tmp.1.e
|
||||||
snl='\
|
snl='\
|
||||||
'
|
'
|
||||||
grep 'error:' $tmp.e | sed "s/did you mean.*//" |
|
# Extract failing identifiers. Try to isolate compiler errors while eliminating suggestions.
|
||||||
|
# As of 2021, known to work on: gcc, clang, Solaris Studio cc
|
||||||
|
sed -n 's/[Dd]id you mean.*//; /[Ww]arning:/ d; /[Ee]rror:/ p; /[Ll]ine [0-9][0-9]*:/ p' $tmp.e |
|
||||||
sed "s/[^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*/${snl}/g" |
|
sed "s/[^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789][^_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*/${snl}/g" |
|
||||||
grep '^[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz][_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*$' |
|
grep '^[_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz][_ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789]*$' |
|
||||||
sort -u > $tmp.n
|
sort -u > $tmp.n
|
||||||
|
|
Loading…
Reference in a new issue