[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#841368: gcc-6 6.2.0-7 breaks kernel build if stack protection is enabled



>> But does this generate the same output as without -enable-default-pie?
>> Some parts of the kernel do use -fpic or -fPIC. Which directive prevails?

If you call gcc with "-O3 -O0 -O1", only "-O1" option is make sence.
See attachments from recent build log (roughly speaking, Linux 4.8.4,
"make V=1" with gcc 6.2.0-9, but actually it's heavily customized
Debian src:linux with 3rd pty patches and custom configs).

>> I'm currently looking for correct way to do this trick.
Patch is available and (at least) works for me on amd64 and i386, ref msg #51

-- 
SY,
Konstantin Demin
gcc-6
-Wp,-MD,arch/x86/entry/vdso/.vdso-image-64.o.d
-nostdinc
-isystem
/usr/lib/gcc/x86_64-linux-gnu/6/include
-I/<<PKGBUILDDIR>>/arch/x86/include
-I./arch/x86/include/generated/uapi
-I./arch/x86/include/generated
-I/<<PKGBUILDDIR>>/include
-I./include
-I/<<PKGBUILDDIR>>/arch/x86/include/uapi
-I/<<PKGBUILDDIR>>/include/uapi
-I./include/generated/uapi
-include /<<PKGBUILDDIR>>/include/linux/kconfig.h
-I/<<PKGBUILDDIR>>/arch/x86/entry/vdso
-Iarch/x86/entry/vdso
-D__KERNEL__
-Wall
-Wundef
-Wstrict-prototypes
-Wno-trigraphs
-fno-strict-aliasing
-fno-common
-Werror-implicit-function-declaration
-Wno-format-security
-std=gnu89
-mno-sse
-mno-mmx
-mno-sse2
-mno-3dnow
-mno-avx
-m64
-falign-jumps=1
-falign-loops=1
-mno-80387
-mno-fp-ret-in-387
-mpreferred-stack-boundary=3
-mskip-rax-setup
-mtune=generic
-mno-red-zone
-mcmodel=kernel
-DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_SSSE3=1
-DCONFIG_AS_CRC32=1
-DCONFIG_AS_AVX=1
-DCONFIG_AS_AVX2=1
-DCONFIG_AS_SHA1_NI=1
-DCONFIG_AS_SHA256_NI=1
-pipe
-Wno-sign-compare
-fno-asynchronous-unwind-tables
-O2
-fplugin=./scripts/gcc-plugins/cyc_complexity_plugin.so
-fomit-frame-pointer
-DCC_HAVE_ASM_GOTO
-fno-PIC
-fno-PIE
-DKBUILD_BASENAME='"vdso_image_64"'
-DKBUILD_MODNAME='"vdso_image_64"'
-c
-o arch/x86/entry/vdso/.tmp_vdso-image-64.o
arch/x86/entry/vdso/vdso-image-64.c
gcc-6
-Wp,-MD,arch/x86/entry/vdso/.vclock_gettime.o.d
-nostdinc
-isystem
/usr/lib/gcc/x86_64-linux-gnu/6/include
-I/<<PKGBUILDDIR>>/arch/x86/include
-I./arch/x86/include/generated/uapi
-I./arch/x86/include/generated
-I/<<PKGBUILDDIR>>/include
-I./include
-I/<<PKGBUILDDIR>>/arch/x86/include/uapi
-I/<<PKGBUILDDIR>>/include/uapi
-I./include/generated/uapi
-include /<<PKGBUILDDIR>>/include/linux/kconfig.h
-I/<<PKGBUILDDIR>>/arch/x86/entry/vdso
-Iarch/x86/entry/vdso
-D__KERNEL__
-Wall
-Wundef
-Wstrict-prototypes
-Wno-trigraphs
-fno-strict-aliasing
-fno-common
-Werror-implicit-function-declaration
-Wno-format-security
-std=gnu89
-mno-sse
-mno-mmx
-mno-sse2
-mno-3dnow
-mno-avx
-m64
-falign-jumps=1
-falign-loops=1
-mno-80387
-mno-fp-ret-in-387
-mpreferred-stack-boundary=3
-mskip-rax-setup
-mtune=generic
-mno-red-zone
-mcmodel=kernel
-DCONFIG_X86_X32_ABI
-DCONFIG_AS_CFI=1
-DCONFIG_AS_CFI_SIGNAL_FRAME=1
-DCONFIG_AS_CFI_SECTIONS=1
-DCONFIG_AS_FXSAVEQ=1
-DCONFIG_AS_SSSE3=1
-DCONFIG_AS_CRC32=1
-DCONFIG_AS_AVX=1
-DCONFIG_AS_AVX2=1
-DCONFIG_AS_SHA1_NI=1
-DCONFIG_AS_SHA256_NI=1
-pipe
-Wno-sign-compare
-fno-asynchronous-unwind-tables
-O2
-fomit-frame-pointer
-DCC_HAVE_ASM_GOTO
-fno-PIC
-fno-PIE
-mcmodel=small
-fPIC
-O2
-fasynchronous-unwind-tables
-m64
-fno-stack-protector
-fno-omit-frame-pointer
-foptimize-sibling-calls
-DDISABLE_BRANCH_PROFILING
-DBUILD_VDSO
-DKBUILD_BASENAME='"vclock_gettime"'
-DKBUILD_MODNAME='"vclock_gettime"'
-c
-o arch/x86/entry/vdso/.tmp_vclock_gettime.o
/<<PKGBUILDDIR>>/arch/x86/entry/vdso/vclock_gettime.c

Reply to: