Skip to contentSkip to conversation

Fix DTC sub-module issues

PATCH Applied [email protected] 2 participants 4 messages Apr 22, 2013 – Apr 26, 2013 Kbuild

lore
Share & tools
lore
#0 lore raw

cover Fix DTC sub-module issues

From: Peter Crosthwaite <[email protected]>

Two issues reported by Blue for building the DTC submodule with clang and mingw.

Peter Crosthwaite (2):
Makefile: Don't build shared libfdt
Makefile: Use QEMU_FLAGS for DTC compilation

 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
#1 lore raw

PATCH 1/2 Makefile: Don't build shared libfdt

From: Peter Crosthwaite <[email protected]>

The submodule DTC should just build and use DTC as static (the whole motivation for using submod is lack of widespread distro support).

The .so causes build failures on some platforms, so adjust the make target to just build the static lib.

---

 Makefile |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
Makefile +1 -1
index 88375dc..c4847aa 100644
@@ -149,7 +149,7 @@ DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_src
 DTC_CFLAGS=$(CFLAGS) $(extra_cflags) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
 
 subdir-dtc:dtc/libfdt dtc/tests
-	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt,)
+	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
 
 dtc/%:
 	mkdir -p $@
Signature · 1 line
1.7.0.4
#2 lore raw

PATCH 2/2 Makefile: Use QEMU_FLAGS for DTC compilation

In reply to [email protected]

From: Peter Crosthwaite <[email protected]>

Build DTC as QEMU is built. Fixes the issue with mingw build which can't handles DTC's default CFLAGS.

---

 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
Makefile +2 -2
index c4847aa..385e314 100644
@@ -146,10 +146,10 @@ $(SRC_PATH)/pixman/configure:
 	(cd $(SRC_PATH)/pixman; autoreconf -v --install)
 
 DTC_MAKE_ARGS=-I$(SRC_PATH)/dtc VPATH=$(SRC_PATH)/dtc -C dtc V="$(V)" LIBFDT_srcdir=$(SRC_PATH)/dtc/libfdt
-DTC_CFLAGS=$(CFLAGS) $(extra_cflags) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
+DTC_CFLAGS=$(CFLAGS) $(QEMU_CFLAGS) -I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libfdt
 
 subdir-dtc:dtc/libfdt dtc/tests
-	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
+	$(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CFLAGS="$(DTC_CFLAGS)" LDFLAGS="$(LDFLAGS)" ARFLAGS="$(ARFLAGS)" CC="$(CC)" AR="$(AR)" LD="$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt.a,)
 
 dtc/%:
 	mkdir -p $@
Signature · 1 line
1.7.0.4
#3 lore raw
In reply to [email protected]
Quoted 4 lines · On Mon, Apr 22, 2013 at 02:40:09PM +1000, [email protected] wrote:

From: Peter Crosthwaite <[email protected]>

Two issues reported by Blue for building the DTC submodule with clang and mingw.

Applied

Fixes the mingw build on my setup, thanks.

Cheers,
Edgar

Quoted 10 lines

Peter Crosthwaite (2):
Makefile: Don't build shared libfdt
Makefile: Use QEMU_FLAGS for DTC compilation

 Makefile |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)