compiler-gcc.h: __nostackprotector needs gcc-4.4 and up

"Linux Kernel Mailing List" <[email protected]> Mon, 12 Feb 2018 17:22:09 +0000 (UTC)
Newsgroups gmane.linux.kernel.commits.head
Message-ID <[email protected]>
Web:        https://git.kernel.org/torvalds/c/d9afaaa4ff7af8b87d4a205e48cb8a6f666d7f01
Commit:     d9afaaa4ff7af8b87d4a205e48cb8a6f666d7f01
Parent:     df5d45aa08f848b79caf395211b222790534ccc7
Refname:    refs/heads/master
Author:     Geert Uytterhoeven <[email protected]>
AuthorDate: Thu Feb 1 11:21:59 2018 +0100
Committer:  Herbert Xu <[email protected]>
CommitDate: Thu Feb 8 22:37:10 2018 +1100

    compiler-gcc.h: __nostackprotector needs gcc-4.4 and up
    
    Gcc versions before 4.4 do not recognize the __optimize__ compiler
    attribute:
    
        warning: ‘__optimize__’ attribute directive ignored
    
    Fixes: 7375ae3a0b79ea07 ("compiler-gcc.h: Introduce __nostackprotector function attribute")
    Signed-off-by: Geert Uytterhoeven <[email protected]>
    Signed-off-by: Herbert Xu <[email protected]>
---
 include/linux/compiler-gcc.h | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/include/linux/compiler-gcc.h b/include/linux/compiler-gcc.h
index 7bba8e28c529..bf09213895f7 100644
--- a/include/linux/compiler-gcc.h
+++ b/include/linux/compiler-gcc.h
@@ -167,8 +167,6 @@
 
 #if GCC_VERSION >= 40100
 # define __compiletime_object_size(obj) __builtin_object_size(obj, 0)