symbols: Fix sdksyms.sh to cope with gcc5
Gcc5 adds additional lines stating line numbers before and after __attribute__() which need to be skipped. Signed-off-by: Egbert Eich <eich@freedesktop.org> Tested-by: Daniel Stone <daniels@collabora.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
This commit is contained in:
parent
7ea64fb437
commit
21b896939c
|
@ -350,13 +350,25 @@ BEGIN {
|
||||||
if (sdk) {
|
if (sdk) {
|
||||||
n = 3;
|
n = 3;
|
||||||
|
|
||||||
|
# skip line numbers GCC 5 adds before __attribute__
|
||||||
|
while ($n == "" || $0 ~ /^# [0-9]+ "/) {
|
||||||
|
getline;
|
||||||
|
n = 1;
|
||||||
|
}
|
||||||
|
|
||||||
# skip attribute, if any
|
# skip attribute, if any
|
||||||
while ($n ~ /^(__attribute__|__global)/ ||
|
while ($n ~ /^(__attribute__|__global)/ ||
|
||||||
# skip modifiers, if any
|
# skip modifiers, if any
|
||||||
$n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
|
$n ~ /^\*?(unsigned|const|volatile|struct|_X_EXPORT)$/ ||
|
||||||
# skip pointer
|
# skip pointer
|
||||||
$n ~ /^[a-zA-Z0-9_]*\*$/)
|
$n ~ /^[a-zA-Z0-9_]*\*$/) {
|
||||||
n++;
|
n++;
|
||||||
|
# skip line numbers GCC 5 adds after __attribute__
|
||||||
|
while ($n == "" || $0 ~ /^# [0-9]+ "/) {
|
||||||
|
getline;
|
||||||
|
n = 1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
# type specifier may not be set, as in
|
# type specifier may not be set, as in
|
||||||
# extern _X_EXPORT unsigned name(...)
|
# extern _X_EXPORT unsigned name(...)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user