Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d9afaaa4 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Herbert Xu
Browse files

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: 7375ae3a ("compiler-gcc.h: Introduce __nostackprotector function attribute")
Signed-off-by: default avatarGeert Uytterhoeven <geert@linux-m68k.org>
Signed-off-by: default avatarHerbert Xu <herbert@gondor.apana.org.au>
parent df5d45aa
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -167,8 +167,6 @@

#if GCC_VERSION >= 40100
# define __compiletime_object_size(obj) __builtin_object_size(obj, 0)

#define __nostackprotector	__attribute__((__optimize__("no-stack-protector")))
#endif

#if GCC_VERSION >= 40300
@@ -198,6 +196,7 @@

#if GCC_VERSION >= 40400
#define __optimize(level)	__attribute__((__optimize__(level)))
#define __nostackprotector	__optimize("no-stack-protector")
#endif /* GCC_VERSION >= 40400 */

#if GCC_VERSION >= 40500