Commit 3550a516d07dda4786c63e86f64f4f440db58782

Authored by Sam Ravnborg
Committed by Sam Ravnborg
1 parent a3a6261a11

kbuild: __extension__ support in genksyms (fix unknown CRC warning)

Recently the __extension__ keyword has been introduced in the kernel.
Teach genksyms about this keyword so it can generate correct CRC for
exported symbols that uses a symbol marked __extension__.
For now only the typedef variant:

	__extension__ typedef ...

is supported.
Later we may add more variants as needed.

This patch contains the actual source file changes. The
following patch will hold modifications to the generated
files (*_shipped) and only after the second patch the fix
has effect.

Signed-off-by: Sam Ravnborg <sam@ravnborg.org>

Showing 2 changed files with 5 additions and 1 deletions Side-by-side Diff

scripts/genksyms/keywords.gperf
... ... @@ -11,6 +11,7 @@
11 11 __attribute__, ATTRIBUTE_KEYW
12 12 __const, CONST_KEYW
13 13 __const__, CONST_KEYW
  14 +__extension__, EXTENSION_KEYW
14 15 __inline, INLINE_KEYW
15 16 __inline__, INLINE_KEYW
16 17 __signed, SIGNED_KEYW
scripts/genksyms/parse.y
... ... @@ -61,6 +61,7 @@
61 61 %token DOUBLE_KEYW
62 62 %token ENUM_KEYW
63 63 %token EXTERN_KEYW
  64 +%token EXTENSION_KEYW
64 65 %token FLOAT_KEYW
65 66 %token INLINE_KEYW
66 67 %token INT_KEYW
... ... @@ -110,7 +111,9 @@
110 111 ;
111 112  
112 113 declaration1:
113   - TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
  114 + EXTENSION_KEYW TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
  115 + { $$ = $4; }
  116 + | TYPEDEF_KEYW { is_typedef = 1; } simple_declaration
114 117 { $$ = $3; }
115 118 | simple_declaration
116 119 | function_definition