1 |
about this part: |
2 |
|
3 |
[22:58:31] <Zorry> blueness: the gcc-plugins fail |
4 |
[22:58:33] <blueness> 4.7 just hit the overlay, i can try after the meeting |
5 |
[22:58:37] <blueness> i figured |
6 |
[22:58:52] <blueness> do you know what the breakage is? |
7 |
[22:59:42] <Zorry> gcc-4.7 have change some of the plugins api |
8 |
|
9 |
the problem is that with gcc 4.7 they made the first step towards moving the |
10 |
gcc codebase to C++ in that 4.7 can be built both with a C and a C++ compiler |
11 |
(e.g., gcc/g++, see https://bugs.gentoo.org/show_bug.cgi?id=409315#c7). |
12 |
|
13 |
this affects the plugin API because of C++ name mangling so plugins have to be |
14 |
built with the same kind of compiler as gcc itself. C++ itself poses a problem |
15 |
as well in that certain C constructs such as designated initializers cannot be |
16 |
used (even though they are very useful for initializing some structures that all |
17 |
plugins need). |
18 |
|
19 |
in any case building plugins for gcc 4.7 requires two things: |
20 |
1. detect the compiler used to build gcc |
21 |
2. use that same compiler to build the plugin |
22 |
|
23 |
the first problem can be solved by checking whether ENABLE_BUILD_WITH_CXX is |
24 |
defined in auto-host.h, a header available to plugins. |
25 |
|
26 |
the second problem is harder because the kernel make system has very little |
27 |
support to build userland code (such as gcc plugins) with a C++ compiler. |
28 |
|
29 |
incidentally, while working with gcc trunk on LTO last year i'd already run |
30 |
across this C++ build issue but i have yet to finish the linux-side support |
31 |
infrastructure because in the meantime i figured i could just use the old C |
32 |
build mechanism for gcc (if you check the plugins, some of them already have |
33 |
4.7 dependent code in them so i know they all work fine with gcc 4.7 in fact). |
34 |
|
35 |
so in the short term, if you want gcc 4.7 and PaX plugin support, make sure |
36 |
you build gcc with a C compiler and maybe voice your opinion in the above |
37 |
mentioned bug ;). |