Bug 70951

Summary: Build error due -fstack-protector-strong not supported by compiler
Product: Other Reporter: Juan Ledesma (jueleto)
Component: OtherAssignee: other_other
Status: RESOLVED WILL_NOT_FIX    
Severity: normal CC: alan, pietrushnic
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 3.14-rc3 Subsystem:
Regression: No Bisected commit-id:
Attachments: defconfig that triggered the build error

Description Juan Ledesma 2014-02-21 23:40:50 UTC
Created attachment 126961 [details]
defconfig that triggered the build error

When building latest Torvalds tree (HEAD d158fc7f) on a x86_64 machine using the attached defconfig I got the following build error:

/home/pc12/linux/arch/x86/Makefile:118: stack-protector enabled but compiler support broken
Makefile:614: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler

Makefile:614: Cannot use CONFIG_CC_STACKPROTECTOR_STRONG: -fstack-protector-strong not supported by compiler
make[1]: No se hace nada para «all».
make[1]: No se hace nada para «relocs».
  CHK     include/config/kernel.release
  CHK     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  CC      kernel/bounds.s
cc1: error: the command line option is not recognized ‘-fstack-protector-strong’
make[1]: *** [kernel/bounds.s] Error 1
make: *** [prepare0] Error 2

Biscecting this break was introduced on commit 19952a92 ("stackprotector: Unify the HAVE_CC_STACKPROTECTOR logic between architectures")

I don't know if this problem is with the above commit or with my compiler (gcc (Ubuntu/Linaro 4.6.3-1ubuntu5) 4.6.3)

Best regards,
Comment 1 Piotr Król 2014-02-22 13:58:33 UTC
According to https://lkml.org/lkml/2014/2/20/248 this is by design. In CC_STACKPROTECTOR_STRONG help we can read:

  This feature requires gcc version 4.9 or above, or a distribution
  gcc with the feature backported ("-fstack-protector-strong").