Commit e30dc03
committed
scripts/gensyms: Use real C++ preprocessor
So far we've skipped all the preprocessor directives and just used a
regular expression to check whether one of WRAP_SYM or EXPORT_SYM
occurs in one of the source files.
While this works fine if we're using a linker version script, it fails
when using PROVIDE-directives because the symbols actually need to
exist.
Some of our wrapped functions however are dependent on the
configuration, for example we only wrap the listen function if we have
systemd support enabled.
To fix this, we're now using the real preprocessor on all of the source
files while also ignoring "#include" directives. Of course, ignoring
them is also a bit limited, especially if we relocate the *_SYM macros,
but for very simple definitions like we have how it's sufficient.
This should fix building without systemd support.
Signed-off-by: aszlig <aszlig@nix.build>1 parent ccf783b commit e30dc03
2 files changed
+29
-15
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
68 | | - | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
69 | 71 | | |
70 | | - | |
| 72 | + | |
71 | 73 | | |
72 | | - | |
| 74 | + | |
73 | 75 | | |
74 | | - | |
| 76 | + | |
75 | 77 | | |
76 | 78 | | |
77 | 79 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
4 | 5 | | |
5 | 6 | | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
6 | 14 | | |
7 | | - | |
8 | | - | |
9 | | - | |
10 | 15 | | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
11 | 19 | | |
12 | | - | |
13 | | - | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
14 | 23 | | |
15 | | - | |
| 24 | + | |
16 | 25 | | |
17 | | - | |
18 | | - | |
19 | | - | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
20 | 32 | | |
21 | 33 | | |
22 | | - | |
| 34 | + | |
23 | 35 | | |
24 | 36 | | |
25 | 37 | | |
26 | | - | |
| 38 | + | |
27 | 39 | | |
28 | 40 | | |
29 | 41 | | |
0 commit comments