Bug#841420: --enable-default-pie breaks kernel builds

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

Bug#841420: --enable-default-pie breaks kernel builds

David Weinehall
Package: gcc-6
Severity: important
Version: 6.2.0-7

--enable-default-pie (first enabled in gcc-6 6.2.0-7) causes kernel
builds to fail.  If the kernel is configured with the stack protector
enabled it'll fail with a rather unhelpful error message claiming
that the compiler doesn't support -fstack-protector,
but the problem is in fact caused by:

kernel/bounds.c:1:0: error: code model kernel does not support PIC mode

(The kernel is built with -mcmodel=kernel)

I think it's fair to say that the kernel is kind of an important piece
of software and that it's imperative that we don't break kernel builds...


Kind regards, David Weinehall
--
 /) David Weinehall <[hidden email]> /) Rime on my window           (\
//  ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~   //  Diamond-white roses of fire //
\)                                 (/   Beautiful hoar-frost       (/