gcc fails to compile kernel

Bug #1605013 reported by Caleb Fujimori
12
This bug affects 1 person
Affects Status Importance Assigned to Milestone
gcc-defaults (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Compilation error messages after 'make': http://codepad.org/SDmemfEX

output of 'make V=1': http://codepad.org/MkDpZR1A

Output of 'gcc -m64 -mcmodel=kernel -c -v -o /tmp/empty.o scripts/mod/empty.c': http://codepad.org/rIuFRwkL

ProblemType: Bug
DistroRelease: Ubuntu 16.10
Package: gcc 4:5.3.1-1ubuntu1
ProcVersionSignature: Ubuntu 4.4.0-30.49-generic 4.4.13
Uname: Linux 4.4.0-30-generic x86_64
ApportVersion: 2.20.2-0ubuntu1
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Jul 20 19:21:33 2016
InstallationDate: Installed on 2016-07-11 (9 days ago)
InstallationMedia: Ubuntu 16.04 LTS "Xenial Xerus" - Release amd64 (20160420.1)
SourcePackage: gcc-defaults
UpgradeStatus: Upgraded to yakkety on 2016-07-12 (8 days ago)

Revision history for this message
Caleb Fujimori (chf2117) wrote :
Revision history for this message
Caleb Fujimori (chf2117) wrote :

Thanks to the help of nicst on the kernelnewbies irc channel:

The error seems to come from the --enable-default-pie option gcc was compiled with.

This can be overcome by appending KCFLAGS=-fno-PIE to the make command

Revision history for this message
Caleb Fujimori (chf2117) wrote :
Revision history for this message
Matthias Klose (doko) wrote :

yes, GCC on Ubuntu enables hardening flags by defauult, see
https://wiki.ubuntu.com/ToolChain/CompilerFlags

Changed in gcc-defaults (Ubuntu):
status: New → Invalid
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.