From nobody Sun May 19 01:43:05 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) client-ip=209.51.188.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org ARC-Seal: i=1; a=rsa-sha256; t=1586329436; cv=none; d=zohomail.com; s=zohoarc; b=Upwi5mdYKeuOGFue203U+jBROvF3ieNZk2eiGujQsyjmOxZ/adczg/j1IqNFPoQ/W3vMYrtH4hRzG14vcj5h9tS+MOaVBTQLduiV2vk5NNh/AJ1ESqZCZCgQHmKhDyLkFAwn4zckR55viWLNw+aUw+Ikrjm1NfmRHvfaRpMIuIo= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1586329436; h=Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Archive:List-Help:List-Unsubscribe:Message-ID:Sender:Subject:To; bh=O329VCTJOpCeQ3fMq5vqbO6qf+lECub6egtHJ1A0wFM=; b=Zg0+yhP+nkTSYSH173B7+e2JIiCZ92W4RQpvHr80407ZR/YnH5p3ZBPyjuQ6E5dGlWtb3F1iuNk7pElJL8a4SEp2JXzx+x9vmzPi7VRU1L8r0+OYykjw9pkwC52NtSfzIhykRv2hyKmhuOPDxFtPPktOEgptrWLtecMp3ZXa8e8= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org Return-Path: Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mx.zohomail.com with SMTPS id 1586329436731690.4484720129894; Wed, 8 Apr 2020 00:03:56 -0700 (PDT) Received: from localhost ([::1]:56770 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM4kd-0005FI-4c for importer@patchew.org; Wed, 08 Apr 2020 03:03:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:35295) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jM4jb-0004V9-EE for qemu-devel@nongnu.org; Wed, 08 Apr 2020 03:02:52 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jM4jY-00030s-Up for qemu-devel@nongnu.org; Wed, 08 Apr 2020 03:02:50 -0400 Received: from mx2.suse.de ([195.135.220.15]:60970) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1jM4jY-000307-Lf for qemu-devel@nongnu.org; Wed, 08 Apr 2020 03:02:48 -0400 Received: from relay2.suse.de (unknown [195.135.220.254]) by mx2.suse.de (Postfix) with ESMTP id 2F66DAC6C; Wed, 8 Apr 2020 07:02:45 +0000 (UTC) X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Claudio Fontana To: Peter Maydell Subject: [PATCH] Makefile: libfdt: build only the strict necessary Date: Wed, 8 Apr 2020 09:02:31 +0200 Message-Id: <20200408070231.20265-1-cfontana@suse.de> X-Mailer: git-send-email 2.16.4 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x (no timestamps) [generic] X-Received-From: 195.135.220.15 X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: qemu-devel@nongnu.org, Laurent Vivier , Alex Bennee , Claudio Fontana , David Gibson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" when building dtc/libfdt, we were previously using dtc/Makefile, which tries to build some artifacts that are not needed, and can complain on stderr about the absence of tools that are not required to build just libfdt. Instead, build only the strict necessary to get libfdt.a . Remove the subdir-dtc "compatibility gunk" for recursion, since we are not recursing anymore. Signed-off-by: Claudio Fontana --- Makefile | 21 ++++++++++----------- configure | 6 +----- 2 files changed, 11 insertions(+), 16 deletions(-) diff --git a/Makefile b/Makefile index 84ef881600..8a461534d9 100644 --- a/Makefile +++ b/Makefile @@ -526,15 +526,16 @@ $(SOFTMMU_FUZZ_RULES): $(edk2-decompressed) $(TARGET_DIRS_RULES): $(call quiet-command,$(MAKE) $(SUBDIR_MAKEFLAGS) -C $(dir $@) V=3D"$(V)" = TARGET_DIR=3D"$(dir $@)" $(notdir $@),) =20 -DTC_MAKE_ARGS=3D-I$(SRC_PATH)/dtc VPATH=3D$(SRC_PATH)/dtc -C dtc V=3D"$(V)= " LIBFDT_srcdir=3D$(SRC_PATH)/dtc/libfdt -DTC_CFLAGS=3D$(CFLAGS) $(QEMU_CFLAGS) -DTC_CPPFLAGS=3D-I$(BUILD_DIR)/dtc -I$(SRC_PATH)/dtc -I$(SRC_PATH)/dtc/libf= dt - -.PHONY: dtc/all -dtc/all: .git-submodule-status dtc/libfdt dtc/tests - $(call quiet-command,$(MAKE) $(DTC_MAKE_ARGS) CPPFLAGS=3D"$(DTC_CPPFLAGS)= " CFLAGS=3D"$(DTC_CFLAGS)" LDFLAGS=3D"$(QEMU_LDFLAGS)" ARFLAGS=3D"$(ARFLAGS= )" CC=3D"$(CC)" AR=3D"$(AR)" LD=3D"$(LD)" $(SUBDIR_MAKEFLAGS) libfdt/libfdt= .a,) - -dtc/%: .git-submodule-status +LIBFDT_srcdir =3D $(SRC_PATH)/dtc/libfdt +LIBFDT_objdir =3D dtc/libfdt +LIBFDT_archive =3D $(LIBFDT_objdir)/libfdt.a +include $(LIBFDT_srcdir)/Makefile.libfdt +LIBFDT_objects =3D $(addprefix $(LIBFDT_objdir)/, $(LIBFDT_OBJS)) +.PHONY: libfdt +libfdt: .git-submodule-status $(LIBFDT_archive) +$(LIBFDT_archive): $(LIBFDT_objects) +$(LIBFDT_objects): | $(LIBFDT_objdir) +$(LIBFDT_objdir): .git-submodule-status @mkdir -p $@ =20 # Overriding CFLAGS causes us to lose defines added in the sub-makefile. @@ -563,7 +564,6 @@ slirp/all: .git-submodule-status =20 # Compatibility gunk to keep make working across the rename of targets # for recursion, to be removed some time after 4.1. -subdir-dtc: dtc/all subdir-capstone: capstone/all subdir-slirp: slirp/all =20 @@ -821,7 +821,6 @@ distclean: clean rm -rf $$d || exit 1 ; \ done rm -Rf .sdk - if test -f dtc/version_gen.h; then $(MAKE) $(DTC_MAKE_ARGS) clean; fi =20 KEYMAPS=3Dda en-gb et fr fr-ch is lt no pt-br sv \ ar de en-us fi fr-be hr it lv nl pl ru th \ diff --git a/configure b/configure index 22870f3867..eb50d50b0a 100755 --- a/configure +++ b/configure @@ -4278,10 +4278,6 @@ EOF if test -d "${source_path}/dtc/libfdt" || test -e "${source_path}/.g= it" ; then fdt=3Dgit mkdir -p dtc - if [ "$pwd_is_source_path" !=3D "y" ] ; then - symlink "$source_path/dtc/Makefile" "dtc/Makefile" - symlink "$source_path/dtc/scripts" "dtc/scripts" - fi fdt_cflags=3D"-I\$(SRC_PATH)/dtc/libfdt" fdt_ldflags=3D"-L\$(BUILD_DIR)/dtc/libfdt" fdt_libs=3D"$fdt_libs" @@ -8151,7 +8147,7 @@ echo "PIXMAN_CFLAGS=3D$pixman_cflags" >> $config_host= _mak echo "PIXMAN_LIBS=3D$pixman_libs" >> $config_host_mak =20 if [ "$fdt" =3D "git" ]; then - echo "config-host.h: dtc/all" >> $config_host_mak + echo "config-host.h: libfdt" >> $config_host_mak fi if [ "$capstone" =3D "git" -o "$capstone" =3D "internal" ]; then echo "config-host.h: capstone/all" >> $config_host_mak --=20 2.16.4