From 2d5db193ee8675def3b683ed0f3c6df439a15486 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 4 Sep 2014 02:40:59 +0900 Subject: standalone: use GCC_VERSION defined in compiler-gcc.h Now GCC_VERSION is defined in include/linux/compiler-gcc.h (with a little different definition). Use it and delete the one in examples/standlone/stub.c. This should work on Clang too because __GNUC__, __GNUC_MINOR__, __GNUC_PATCHLEVEL__ are also defined on Clang. Signed-off-by: Masahiro Yamada Cc: Jeroen Hofstee --- examples/standalone/stubs.c | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'examples') diff --git a/examples/standalone/stubs.c b/examples/standalone/stubs.c index c5c025dab33..0bf690e73d1 100644 --- a/examples/standalone/stubs.c +++ b/examples/standalone/stubs.c @@ -1,9 +1,6 @@ #include #include - -#ifndef GCC_VERSION -#define GCC_VERSION (__GNUC__ * 1000 + __GNUC_MINOR__) -#endif /* GCC_VERSION */ +#include #if defined(CONFIG_X86) /* @@ -237,7 +234,7 @@ gd_t *global_data; * implementation. On the other hand, asm() statements with * arguments can be used only inside the functions (gcc limitation) */ -#if GCC_VERSION < 3004 +#if GCC_VERSION < 30400 static #endif /* GCC_VERSION */ void __attribute__((unused)) dummy(void) -- cgit v1.3.1 From 8e714432118c24b568c70a66cc9476f2502b4c4d Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Fri, 5 Sep 2014 01:56:52 +0900 Subject: kbuild: standalone: simplify clean-files Files added $(extra-) are removed by "make clean". Besides, wildcard "*.srec *.bin" is simpler. Signed-off-by: Masahiro Yamada --- examples/standalone/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'examples') diff --git a/examples/standalone/Makefile b/examples/standalone/Makefile index 2dacba2ebae..0863a8cda20 100644 --- a/examples/standalone/Makefile +++ b/examples/standalone/Makefile @@ -22,7 +22,7 @@ extra-$(CONFIG_PPC) += sched ELF := $(strip $(extra-y)) extra-y += $(addsuffix .srec,$(extra-y)) $(addsuffix .bin,$(extra-y)) -clean-files := $(extra-) $(addsuffix .srec,$(extra-)) $(addsuffix .bin,$(extra-)) +clean-files := *.srec *.bin COBJS := $(ELF:=.o) -- cgit v1.3.1