Patrick Williams | e69d235 | 2017-02-23 20:56:04 -0600 | [diff] [blame] | 1 | Upstream-Status: Inappropriate [embedded specific] |
| 2 | |
| 3 | This allows OpenEmbedded to pass in cross compiler configuration using |
| 4 | the default envirnment variables. It is required so that kvmtool can |
| 5 | be linked against the cross-compiled libfdt library. |
| 6 | |
| 7 | diff --git a/Makefile b/Makefile |
| 8 | index 1f0196f..8bfb068 100644 |
| 9 | --- a/Makefile |
| 10 | +++ b/Makefile |
| 11 | @@ -14,11 +14,6 @@ export E Q |
| 12 | include config/utilities.mak |
| 13 | include config/feature-tests.mak |
| 14 | |
| 15 | -CC := $(CROSS_COMPILE)gcc |
| 16 | -CFLAGS := |
| 17 | -LD := $(CROSS_COMPILE)ld |
| 18 | -LDFLAGS := |
| 19 | - |
| 20 | FIND := find |
| 21 | CSCOPE := cscope |
| 22 | TAGS := ctags |
| 23 | @@ -297,7 +292,7 @@ $(warning No static libc found. Skipping guest init) |
| 24 | endif |
| 25 | |
| 26 | ifeq (y,$(ARCH_WANT_LIBFDT)) |
| 27 | - ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CFLAGS),-lfdt),y) |
| 28 | + ifneq ($(call try-build,$(SOURCE_LIBFDT),$(CPPFLAGS) $(CFLAGS),-lfdt),y) |
| 29 | $(error No libfdt found. Please install libfdt-dev package) |
| 30 | else |
| 31 | CFLAGS_DYNOPT += -DCONFIG_HAS_LIBFDT |