~alpine/devel

2 2

[alpine-devel] Probably a bug, maybe a feature in gcc-6.2.1-r0 in edge

Details
Message ID
<3d43350ead698d62cd76f022bbf71799@riseup.net>
Sender timestamp
1477394583
DKIM signature
missing
Download raw message
Hi,

After trying to compile a new kernel (4.4.27), I received an error from 
gcc-6.2.1:

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

I've found this:
https://mail-archive.com/debian-bugs-dist@lists.debian.org/msg1463141.html
TL;DR gcc-6.2.0-7 does the same thing in Debian

I pulled gcc-5.3.0-r0 from 3.4 and it does its job fine.
Any ideas?

Thanks,
Cág


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Natanael Copa <ncopa@alpinelinux.org>
Details
Message ID
<20161025140351.4255c0d3@ncopa-desktop.copa.dup.pw>
In-Reply-To
<3d43350ead698d62cd76f022bbf71799@riseup.net> (view parent)
Sender timestamp
1477397031
DKIM signature
missing
Download raw message
On Tue, 25 Oct 2016 12:23:03 +0100
Cág <caoc@riseup.net> wrote:

> Hi,
> 
> After trying to compile a new kernel (4.4.27), I received an error from 
> gcc-6.2.1:
> 
> -----------------
> kernel/bounds.c:1:0: error: code model kernel does not support PIC mode
> -----------------

We compile gcc with --enable-default-pie since gcc 6. This means that
kernel need to be built with -fno-pie:

  make KCFLAGS=-fno-pie ....

-nc



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Details
Message ID
<5834de068a1c46e02e5d73915f8d6da2@riseup.net>
In-Reply-To
<20161025140351.4255c0d3@ncopa-desktop.copa.dup.pw> (view parent)
Sender timestamp
1477402115
DKIM signature
missing
Download raw message
Natanael Copa wrote:

> We compile gcc with --enable-default-pie since gcc 6. This means that
> kernel need to be built with -fno-pie:
> 
>   make KCFLAGS=-fno-pie ....

Thanks.

Slightly inconvenient but okay. It skips through that error, chokes on
some warnings and notes and ends with (with no other flags applied):

--------------------------
init/built-in.o: In function `do_one_initcall':
(.text+0x21b): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `name_to_dev_t':
(.text+0x6a9): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `calibrate_delay':
(.text+0xc82): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `loglevel':
main.c:(.init.text+0x149): undefined reference to `__stack_chk_fail'
init/built-in.o: In function `start_kernel':
(.init.text+0x7d5): undefined reference to `__stack_chk_fail'
init/built-in.o:(.init.text+0xc2a): more undefined references to 
`__stack_chk_fail'
follow
make: *** [Makefile:945: vmlinux] Error 1
--------------------------


Cág


---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)