From patchwork Thu Oct 13 13:04:57 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005952 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5FD42C433FE for ; Thu, 13 Oct 2022 13:05:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422022.667834 (Exim 4.92) (envelope-from ) id 1oixu4-0002lI-Dm; Thu, 13 Oct 2022 13:05:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422022.667834; Thu, 13 Oct 2022 13:05:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu4-0002l6-AD; Thu, 13 Oct 2022 13:05:36 +0000 Received: by outflank-mailman (input) for mailman id 422022; Thu, 13 Oct 2022 13:05:34 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu2-0001tl-A9 for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:34 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id aaab2a2c-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:11 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: aaab2a2c-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666333; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=T3wLDMvbCGyUm6GzXD79EfIEyV5ODCruMFeaxkCe9VE=; b=WsZLPhToWjgrBCg3JpX+NIY3/fxBY3e5nr4mJlYZeT+/PF8aiYppnQiR npM4SszcL3ml5VouJ7Fqke1z/U6qpCd9YisulX+7FIorfclxJeHHz8VEx mdxogVyhP/0tpfK09uqN87QFk0JhzdXWjQ1IVwG02/Ds3J0cAmBnHEs/M w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760194 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:ObRFwqrMkzW0IdVUJtHsmJ3ByXxeBmI/ZRIvgKrLsJaIsI4StFCzt garIBnTaPnYZTf9eYgiYY2yoBhXv5LTnNcwTApo/iFkF3wW9JuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYGYpLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4ZwehBtC5gZkPKgS5weH/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m6 qYqFXMpNBm6ldmkm56qSNldhNozBZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0FxxnG/ juXowwVBDkFKtrE5SCB9Ui8j+3jlyHeZIEWJr2Ro6sCbFq7mTVIVUx+uUGAifS9h0i3Hc9RK kkI4ScwpIA17kWgStS7VBq9yFabujYMVtwWFPc1gCmdx6yR7wuHC2wsSj9adMdgpMIwXSYt1 FKCg5XuHzMHmLmIQnvb+L6Spj62PTU9JHUHIyQDSGM4D8LL+d9pyEiVF5A6TfDz3oad9SzML y6is3IMuvY318cyxZ6ppnzWgQKdpIbZZ1tgjunIZV6N4gR8bY+jQoWn71nH8PpNRLqkokm9U GsswJbHsr1XZX2ZvGnUGbhWQun1jxqQGGeE6WODCaXN4NhEF5SLWYlLqA9zK05yWirvUW+4O RSD0e+9CXI6AZdLUUOVS9jsYyjJ5fK6fTgAahwzRosmX3SJXFXblByCnGbJt4wXrGAikLskJ bCQetu2AHARBMxPlWToGrlFiedzmH9nnws/oKwXKDz+iNKjiIO9E+9ZYDNikMhjhE97nOkl2 4kGbJbbo/mueOb/fjPW4eYuELz+FlBiXMieliCiXrTcSuaQMD1+VqS5LHJIU9ANopm5Yc+Ro iHgBR4GlgCi7ZAFQC3TAk1ehHrUdc4XhRoG0eYEYz5EB1BLjV6T0Zoi IronPort-HdrOrdr: A9a23:rAEvH6zEZS6GO8WNncLpKrPwKr1zdoMgy1knxilNoRw8SKOlfq eV7ZMmPH7P+U8ssR4b+OxoVJPsfZqYz+8W3WBzB8bHYOCFgguVxehZhOOIqQEIWReOk9K1vZ 0QFZSWY+efMbEVt6rHCXGDYrUd/OU= X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760194" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Elena Ufimtseva , "Wei Liu" Subject: [XEN PATCH for-4.17 v5 01/17] tools/debugger/gdbsx: Fix and cleanup makefiles Date: Thu, 13 Oct 2022 14:04:57 +0100 Message-ID: <20221013130513.52440-2-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 gdbsx/: - Make use of subdir facility for the "clean" target. - No need to remove the *.a, they aren't in this dir. - Avoid calling "distclean" in subdirs as "distclean" targets do only call "clean", and the "clean" also runs "clean" in subdirs. - Avoid the need to make "gx_all.a" and "xg_all.a" in the "all" recipe by forcing make to check for update of "xg/xg_all.a" and "gx/gx_all.a" by having "FORCE" as prerequisite. Now, when making "gdbsx", make will recurse even when both *.a already exist. - List target in $(TARGETS). gdbsx/*/: - Fix dependency on *.h. - Remove some dead code. - List targets in $(TARGETS). - Remove "build" target. - Cleanup "clean" targets. - remove comments about the choice of "ar" instead of "ld" - Use "$(AR)" instead of plain "ar". Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu --- Notes: missing-ack: GDBSX DEBUGGER v2: - also replace plain "ar" by "$(AR)" tools/debugger/gdbsx/Makefile | 20 ++++++++++---------- tools/debugger/gdbsx/gx/Makefile | 15 +++++++-------- tools/debugger/gdbsx/xg/Makefile | 25 +++++++------------------ 3 files changed, 24 insertions(+), 36 deletions(-) diff --git a/tools/debugger/gdbsx/Makefile b/tools/debugger/gdbsx/Makefile index 5571450a89..4aaf427c45 100644 --- a/tools/debugger/gdbsx/Makefile +++ b/tools/debugger/gdbsx/Makefile @@ -1,20 +1,20 @@ XEN_ROOT = $(CURDIR)/../../.. include ./Rules.mk +SUBDIRS-y += gx +SUBDIRS-y += xg + +TARGETS := gdbsx + .PHONY: all -all: - $(MAKE) -C gx - $(MAKE) -C xg - $(MAKE) gdbsx +all: $(TARGETS) .PHONY: clean -clean: - rm -f xg_all.a gx_all.a gdbsx - set -e; for d in xg gx; do $(MAKE) -C $$d clean; done +clean: subdirs-clean + rm -f $(TARGETS) .PHONY: distclean distclean: clean - set -e; for d in xg gx; do $(MAKE) -C $$d distclean; done .PHONY: install install: all @@ -28,7 +28,7 @@ uninstall: gdbsx: gx/gx_all.a xg/xg_all.a $(CC) $(LDFLAGS) -o $@ $^ -xg/xg_all.a: +xg/xg_all.a: FORCE $(MAKE) -C xg -gx/gx_all.a: +gx/gx_all.a: FORCE $(MAKE) -C gx diff --git a/tools/debugger/gdbsx/gx/Makefile b/tools/debugger/gdbsx/gx/Makefile index 3b8467f799..e9859aea9c 100644 --- a/tools/debugger/gdbsx/gx/Makefile +++ b/tools/debugger/gdbsx/gx/Makefile @@ -2,21 +2,20 @@ XEN_ROOT = $(CURDIR)/../../../.. include ../Rules.mk GX_OBJS := gx_comm.o gx_main.o gx_utils.o gx_local.o -GX_HDRS := $(wildcard *.h) + +TARGETS := gx_all.a .PHONY: all -all: gx_all.a +all: $(TARGETS) .PHONY: clean clean: - rm -rf gx_all.a *.o .*.d + rm -f *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean -#%.o: %.c $(GX_HDRS) Makefile -# $(CC) -c $(CFLAGS) -o $@ $< - -gx_all.a: $(GX_OBJS) Makefile $(GX_HDRS) - ar cr $@ $(GX_OBJS) # problem with ld using -m32 +gx_all.a: $(GX_OBJS) Makefile + $(AR) cr $@ $(GX_OBJS) +-include $(DEPS_INCLUDE) diff --git a/tools/debugger/gdbsx/xg/Makefile b/tools/debugger/gdbsx/xg/Makefile index acdcddf0d5..05325d6d81 100644 --- a/tools/debugger/gdbsx/xg/Makefile +++ b/tools/debugger/gdbsx/xg/Makefile @@ -1,35 +1,24 @@ XEN_ROOT = $(CURDIR)/../../../.. include ../Rules.mk -XG_HDRS := xg_public.h XG_OBJS := xg_main.o CFLAGS += -D__XEN_TOOLS__ CFLAGS += $(CFLAGS_xeninclude) +TARGETS := xg_all.a .PHONY: all -all: build +all: $(TARGETS) -.PHONY: build -build: xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile -# build: mk-symlinks xg_all.a $(XG_HDRS) $(XG_OBJS) Makefile -# build: mk-symlinks xg_all.a - -xg_all.a: $(XG_OBJS) Makefile $(XG_HDRS) - ar cr $@ $(XG_OBJS) # problems using -m32 in ld -# $(LD) -b elf32-i386 $(LDFLAGS) -r -o $@ $^ -# $(CC) -m32 -c -o $@ $^ - -# xg_main.o: xg_main.c Makefile $(XG_HDRS) -#$(CC) -c $(CFLAGS) -o $@ $< - -# %.o: %.c $(XG_HDRS) Makefile -- doesn't work as it won't overwrite Rules.mk -#%.o: %.c -- doesn't recompile when .c changed +xg_all.a: $(XG_OBJS) Makefile + $(AR) cr $@ $(XG_OBJS) .PHONY: clean clean: - rm -rf xen xg_all.a $(XG_OBJS) .*.d + rm -f $(TARGETS) $(XG_OBJS) $(DEPS_RM) .PHONY: distclean distclean: clean + +-include $(DEPS_INCLUDE) From patchwork Thu Oct 13 13:04:58 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005953 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D7027C4332F for ; Thu, 13 Oct 2022 13:05:45 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422024.667848 (Exim 4.92) (envelope-from ) id 1oixu5-00032L-GI; Thu, 13 Oct 2022 13:05:37 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422024.667848; Thu, 13 Oct 2022 13:05:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu5-00030Z-BL; Thu, 13 Oct 2022 13:05:37 +0000 Received: by outflank-mailman (input) for mailman id 422024; Thu, 13 Oct 2022 13:05:35 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu3-0001tl-Ba for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:35 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id ac1cb305-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:12 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: ac1cb305-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666334; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=8abatJda7PXTHwPpPZRvwgJsTqH6k0O1FgQ7vtYYApo=; b=DHiU92MvGgVd4nu8bXooK/VdZlo511Arig3g7HFdTBMS+uEeet6ZwT22 tx1O0DWsNWxqeqcrsbDHDQoixLZAqc7XfN4rSxqOi9Wv4U2052YqpdHPS jJR9x4kvX5XvONtrM9VnhE+mqvsPaVegbyFE1ZoBuzXNv2wCLuXDV6VHR c=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760196 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Np5mHqssR2UEbPmMGTgT3ARxm+fnVDxeMUV32f8akzHdYApBsoF/q tZmKW+Fa/uJYjP8ft4kbI7ioUoC65OBnINrTlQ9+3tkFiwa+JbJXdiXEBz9bniYRiHhoOCLz O1FM4Wdc5pkJpP4jk3wWlQ0hSAkjclkfpKlVKiefHgZqTZMEE8JkQhkl/MynrlmiN24BxLlk d7pqojUNUTNNwRcawr40Ire7kIy1BjO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== X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760196" From: Anthony PERARD To: CC: Anthony PERARD , George Dunlap , Wei Liu Subject: [XEN PATCH for-4.17 v5 02/17] tools/xentrace: rework Makefile Date: Thu, 13 Oct 2022 14:04:58 +0100 Message-ID: <20221013130513.52440-3-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Remove "build" targets. Use "$(TARGETS)" to list binary to be built. Cleanup "clean" rule. Also drop conditional install of $(BIN) and $(LIBBIN) as those two variables are now always populated. Signed-off-by: Anthony PERARD --- Notes: missing-ack: XENTRACE v4: - also use := for BIN, SBIN, LIBBIN, SCRIPTS v2: - fix typo in title - drop conditional install of $(BIN) and $(LIBBIN) tools/xentrace/Makefile | 27 +++++++++++---------------- 1 file changed, 11 insertions(+), 16 deletions(-) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 9fb7fc96e7..63f2f6532d 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -9,41 +9,36 @@ LDLIBS += $(LDLIBS_libxenevtchn) LDLIBS += $(LDLIBS_libxenctrl) LDLIBS += $(ARGP_LDFLAGS) -BIN = xenalyze -SBIN = xentrace xentrace_setsize -LIBBIN = xenctx -SCRIPTS = xentrace_format +BIN := xenalyze +SBIN := xentrace xentrace_setsize +LIBBIN := xenctx +SCRIPTS := xentrace_format -.PHONY: all -all: build +TARGETS := $(BIN) $(SBIN) $(LIBBIN) -.PHONY: build -build: $(BIN) $(SBIN) $(LIBBIN) +.PHONY: all +all: $(TARGETS) .PHONY: install -install: build +install: all $(INSTALL_DIR) $(DESTDIR)$(bindir) $(INSTALL_DIR) $(DESTDIR)$(sbindir) - [ -z "$(LIBBIN)" ] || $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) -ifneq ($(BIN),) + $(INSTALL_DIR) $(DESTDIR)$(LIBEXEC_BIN) $(INSTALL_PROG) $(BIN) $(DESTDIR)$(bindir) -endif $(INSTALL_PROG) $(SBIN) $(DESTDIR)$(sbindir) $(INSTALL_PYTHON_PROG) $(SCRIPTS) $(DESTDIR)$(bindir) - [ -z "$(LIBBIN)" ] || $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) + $(INSTALL_PROG) $(LIBBIN) $(DESTDIR)$(LIBEXEC_BIN) .PHONY: uninstall uninstall: rm -f $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/, $(LIBBIN)) rm -f $(addprefix $(DESTDIR)$(bindir)/, $(SCRIPTS)) rm -f $(addprefix $(DESTDIR)$(sbindir)/, $(SBIN)) -ifneq ($(BIN),) rm -f $(addprefix $(DESTDIR)$(bindir)/, $(BIN)) -endif .PHONY: clean clean: - $(RM) *.a *.so *.o *.rpm $(BIN) $(SBIN) $(LIBBIN) $(DEPS_RM) + $(RM) *.o $(TARGETS) $(DEPS_RM) .PHONY: distclean distclean: clean From patchwork Thu Oct 13 13:04:59 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005950 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8A2F7C4332F for ; Thu, 13 Oct 2022 13:05:43 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422021.667823 (Exim 4.92) (envelope-from ) id 1oixu1-0002Rp-4Q; Thu, 13 Oct 2022 13:05:33 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422021.667823; Thu, 13 Oct 2022 13:05:33 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu1-0002Rh-0a; Thu, 13 Oct 2022 13:05:33 +0000 Received: by outflank-mailman (input) for mailman id 422021; Thu, 13 Oct 2022 13:05:31 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixtz-0001tl-Qt for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:31 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a8f303d8-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:08 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a8f303d8-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666330; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Z1eIfm9TeIHBAfveoFRjwLU6/76BD/iLNFWSVEzbNJ4=; b=Y5igjEucz41YXW/bLXIG7Y+mq/LMV+UeDdUYVKPpY8b99CrMN6DlylYx 0+DkEZghdQzWUeYlkdY9tOMN1uQ68gHxIWsGZ0jBi8UiHidEA4/UXxorp 1fIlpv9XY4ILsknrvBayq+WxN4QoJekbW165vg8mKId0DNtxfmfWONLcP 8=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82281609 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: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HONASlwGNrub/23hWciVgbX03wuQLHtO+zv1OQT1xVqCAn+17JuSIXc19z4/1w 510YWcAoHKXuJENAV/ihqxLAF83YatCkA== IronPort-HdrOrdr: A9a23:N6/a+qsMkMJW69gRaC2GH9T37skDcNV00zEX/kB9WHVpmszxra +TdZMgpHjJYVcqKQgdcL+7WZVoLUmwyXcx2/hyAV7AZniDhILLFuFfBOLZqlWKcREWtNQtsJ uIG5IObuEYZmIVsS+V2mWF+q4bsbq6zJw= X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="82281609" From: Anthony PERARD To: CC: Anthony PERARD , Henry Wang , Wei Liu , George Dunlap , Nick Rosbrook Subject: [XEN PATCH for-4.17 v5 03/17] tools: Introduce $(xenlibs-ldflags, ) macro Date: Thu, 13 Oct 2022 14:04:59 +0100 Message-ID: <20221013130513.52440-4-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 This avoid the need to open-coding the list of flags needed to link with an in-tree Xen library when using -lxen*. Signed-off-by: Anthony PERARD Reviewed-by: Henry Wang --- Notes: missing-ack: GOLANG BINDINGS tools/golang/xenlight/Makefile | 2 +- tools/Rules.mk | 8 ++++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index 64671f246c..00e6d17f2b 100644 --- a/tools/golang/xenlight/Makefile +++ b/tools/golang/xenlight/Makefile @@ -27,7 +27,7 @@ GOXL_GEN_FILES = types.gen.go helpers.gen.go # so that it can find the actual library. .PHONY: build build: xenlight.go $(GOXL_GEN_FILES) - CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) $(APPEND_CFLAGS)" CGO_LDFLAGS="$(LDLIBS_libxenlight) $(LDLIBS_libxentoollog) -L$(XEN_libxenlight) -L$(XEN_libxentoollog) $(APPEND_LDFLAGS)" $(GO) build -x + CGO_CFLAGS="$(CFLAGS_libxenlight) $(CFLAGS_libxentoollog) $(APPEND_CFLAGS)" CGO_LDFLAGS="$(call xenlibs-ldflags,light toollog) $(APPEND_LDFLAGS)" $(GO) build -x .PHONY: install install: build diff --git a/tools/Rules.mk b/tools/Rules.mk index ce77dd2eb1..26958b2948 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -105,6 +105,14 @@ define xenlibs-ldlibs $(foreach lib,$(1),$(xenlibs-ldlibs-$(lib))) endef +# Provide needed flags for linking an in-tree Xen library by an external +# project (or when it is necessary to link with "-lxen$(1)" instead of using +# the full path to the library). +define xenlibs-ldflags + $(call xenlibs-rpath,$(1)) \ + $(foreach lib,$(1),-L$(XEN_ROOT)/tools/libs/$(lib)) +endef + define LIB_defs FILENAME_$(1) ?= xen$(1) XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1) From patchwork Thu Oct 13 13:05:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005951 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 15F6DC43217 for ; Thu, 13 Oct 2022 13:05:44 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422020.667812 (Exim 4.92) (envelope-from ) id 1oixty-0002Aq-S1; Thu, 13 Oct 2022 13:05:30 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422020.667812; Thu, 13 Oct 2022 13:05:30 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixty-0002Aj-Ow; Thu, 13 Oct 2022 13:05:30 +0000 Received: by outflank-mailman (input) for mailman id 422020; Thu, 13 Oct 2022 13:05:29 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixtx-0001tl-1N for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:29 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id a7653bf6-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:06 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: a7653bf6-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666327; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=uMtbT9OvCCyn0S146BCICiBUUfTxeCiBwu/GDB4z7hw=; b=Lssi63DSGjkrj0ROCCgtI1fB7YmXSPxdlFhArEI47GMJ9O3jgn9t02sb 9sUTB2jAbJDhKtBxBFoD0/ineNElZk24qYITcOrLJbI8MWGSUa6ZYu0JE eicBxXlbB5G3OQ+QZTJdOHoqJkRmhvoIO9BAr3x7uFmuB00FXqDKwIrXm M=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82660695 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:LkY9Va7I9QmVYQHL/35oAAxR2vbMJQZQLiYv29bIXmNSXhzvzPLM5wBkF31ARqiwpsLx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7DjPHGjpLy+P18BJlT3DeJ7Ftjehd7bkHJREX/2bJz4PTYl1jj7ZiyvUOT1YorRBAKufACs5KHl2Z0iHuvFsAh0OvDQBc0vysTksHAzQDAxzZXKnOlzQIuZWVoNADkx/ZLiSKfTDcs1cYoFHB+qDJc/suMDJd5WRGqf2s9SM7DhiJFeCijT23Hj1xmwTFEhrM6qufmkqxOg+Chi377o4AkZhLWNVPyQ30RP69y8rp7+iBU3o+pW0vS0wxz65ikgWcCEV/AdqHu2dKlh//RCon8ctUwwQdAyWwD9QqluGFfhXQVNEzpcfnZYbd3rKqt9YCDPlt9kvfUJF1n3Y4/AOQox56pMw/oztc7s5PH6JYHEOMP2JdtdbHdDI3dAyYDWp0P/2AC6ITACnr4jyL0jGrEVGd1/R4afWietbBXED/VPUbRTrPDoRntDQ4lsTRL6BrWYD/Z+CnD0bZFoH5IBilnPMY+Q2mB9JKGznGY3 X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="82660695" From: Anthony PERARD To: CC: Anthony PERARD , Luca Fancellu , Wei Liu Subject: [XEN PATCH for-4.17 v5 04/17] tools: Add -Werror by default to all tools/ Date: Thu, 13 Oct 2022 14:05:00 +0100 Message-ID: <20221013130513.52440-5-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 And provide an option to ./configure to disable it. A follow-up patch will remove -Werror from every other Makefile in tools/. ("tools: Remove -Werror everywhere else") Signed-off-by: Anthony PERARD Reviewed-by: Luca Fancellu --- tools/configure.ac | 1 + tools/Rules.mk | 4 ++++ config/Tools.mk.in | 1 + tools/configure | 26 ++++++++++++++++++++++++++ 4 files changed, 32 insertions(+) diff --git a/tools/configure.ac b/tools/configure.ac index 32cbe6bd3c..09059bc569 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -81,6 +81,7 @@ m4_include([../m4/header.m4]) AX_XEN_EXPAND_CONFIG() # Enable/disable options +AX_ARG_DEFAULT_ENABLE([werror], [Build tools without -Werror]) AX_ARG_DEFAULT_DISABLE([rpath], [Build tools with -Wl,-rpath,LIBDIR]) AX_ARG_DEFAULT_DISABLE([githttp], [Download GIT repositories via HTTP]) AX_ARG_DEFAULT_ENABLE([monitors], [Disable xenstat and xentop monitoring tools]) diff --git a/tools/Rules.mk b/tools/Rules.mk index 26958b2948..a165dc4bda 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -133,6 +133,10 @@ endif CFLAGS_libxenlight += $(CFLAGS_libxenctrl) +ifeq ($(CONFIG_WERROR),y) +CFLAGS += -Werror +endif + ifeq ($(debug),y) # Use -Og if available, -O0 otherwise dbg_opt_level := $(call cc-option,$(CC),-Og,-O0) diff --git a/config/Tools.mk.in b/config/Tools.mk.in index 6c1a0a676f..d0d460f922 100644 --- a/config/Tools.mk.in +++ b/config/Tools.mk.in @@ -1,5 +1,6 @@ -include $(XEN_ROOT)/config/Paths.mk +CONFIG_WERROR := @werror@ CONFIG_RUMP := @CONFIG_RUMP@ ifeq ($(CONFIG_RUMP),y) XEN_OS := NetBSDRump diff --git a/tools/configure b/tools/configure index 41deb7fb96..acd9a04c3b 100755 --- a/tools/configure +++ b/tools/configure @@ -716,6 +716,7 @@ ocamltools monitors githttp rpath +werror DEBUG_DIR XEN_DUMP_DIR XEN_PAGING_DIR @@ -805,6 +806,7 @@ with_xen_scriptdir with_xen_dumpdir with_rundir with_debugdir +enable_werror enable_rpath enable_githttp enable_monitors @@ -1490,6 +1492,7 @@ Optional Features: --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] --disable-largefile omit support for large files + --disable-werror Build tools without -Werror (default is ENABLED) --enable-rpath Build tools with -Wl,-rpath,LIBDIR (default is DISABLED) --enable-githttp Download GIT repositories via HTTP (default is @@ -4111,6 +4114,29 @@ DEBUG_DIR=$debugdir_path # Enable/disable options +# Check whether --enable-werror was given. +if test "${enable_werror+set}" = set; then : + enableval=$enable_werror; +fi + + +if test "x$enable_werror" = "xno"; then : + + ax_cv_werror="n" + +elif test "x$enable_werror" = "xyes"; then : + + ax_cv_werror="y" + +elif test -z $ax_cv_werror; then : + + ax_cv_werror="y" + +fi +werror=$ax_cv_werror + + + # Check whether --enable-rpath was given. if test "${enable_rpath+set}" = set; then : enableval=$enable_rpath; From patchwork Thu Oct 13 13:05:01 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005957 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id A58C9C4332F for ; Thu, 13 Oct 2022 13:05:51 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422026.667873 (Exim 4.92) (envelope-from ) id 1oixu7-0003d7-LN; Thu, 13 Oct 2022 13:05:39 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422026.667873; Thu, 13 Oct 2022 13:05:39 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu7-0003bu-Bn; Thu, 13 Oct 2022 13:05:39 +0000 Received: by outflank-mailman (input) for mailman id 422026; Thu, 13 Oct 2022 13:05:37 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu5-0002ig-8s for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:37 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b86794fd-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:34 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b86794fd-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666334; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fByF2mcq28wVi1Amh4dLPZdKDXEHMuCNAEVl/F7+Z3I=; b=Qua84ySrGbww45o2pwJ0DJlISpKg0q09pA9vEmGO/HS7AlnGIAhYZxsF +qPjDwRuQ+f2HRk66ZU9wp82t2Fsg0iTaj/U8LzDRVB/ISdZ1GrWfmIkQ xP/1WHlhXFO2ICZAtP8bHgg0cduXbmHFgN++DR5bqUfhSlud2pSbePck4 o=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760216 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:XMomuaCm3E3qlhVW/9fjw5YqxClBgxIJ4kV8jS/XYbTApGwnhTdRy mFLUGCFPP2MNmv8L49wa4vlpBsDuJ7cx95iQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8pWo4ow/jb8kk25K2p4GpwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7v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2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760216" From: Anthony PERARD To: CC: Anthony PERARD , Christian Lindig , "Daniel P . Smith" , Jan Beulich , Wei Liu , Elena Ufimtseva , Tim Deegan , Andrew Cooper , =?utf-8?q?Roger_Pau_Monn=C3=A9?= , Juergen Gross , David Scott , Julien Grall , George Dunlap Subject: [XEN PATCH for-4.17 v5 05/17] tools: Remove -Werror everywhere else Date: Thu, 13 Oct 2022 14:05:01 +0100 Message-ID: <20221013130513.52440-6-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Patch "tools: Add -Werror by default to all tools/" have added "-Werror" to CFLAGS in tools/Rules.mk, remove it from every other makefiles as it is now duplicated. Signed-off-by: Anthony PERARD Acked-by: Christian Lindig Acked-by: Daniel P. Smith # tools/flask Acked-by: Jan Beulich # tools/*/cpu-policy --- Notes: missing-ack: - GDBSX DEBUGGER - KDD DEBUGGER - XENTRACE tools/console/client/Makefile | 1 - tools/console/daemon/Makefile | 1 - tools/debugger/kdd/Makefile | 1 - tools/flask/utils/Makefile | 1 - tools/fuzz/cpu-policy/Makefile | 2 +- tools/misc/Makefile | 1 - tools/tests/cpu-policy/Makefile | 2 +- tools/tests/depriv/Makefile | 2 +- tools/tests/resource/Makefile | 1 - tools/tests/tsx/Makefile | 1 - tools/tests/xenstore/Makefile | 1 - tools/xcutils/Makefile | 2 -- tools/xenmon/Makefile | 1 - tools/xenpaging/Makefile | 1 - tools/xenpmd/Makefile | 1 - tools/xentop/Makefile | 2 +- tools/xentrace/Makefile | 2 -- tools/xl/Makefile | 2 +- tools/debugger/gdbsx/Rules.mk | 2 +- tools/firmware/Rules.mk | 2 -- tools/libfsimage/common.mk | 2 +- tools/libs/libs.mk | 2 +- tools/ocaml/common.make | 2 +- tools/xenstore/Makefile.common | 1 - 24 files changed, 9 insertions(+), 27 deletions(-) diff --git a/tools/console/client/Makefile b/tools/console/client/Makefile index e2f2554f92..62d89fdeb9 100644 --- a/tools/console/client/Makefile +++ b/tools/console/client/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenstore) CFLAGS += -include $(XEN_ROOT)/tools/config.h diff --git a/tools/console/daemon/Makefile b/tools/console/daemon/Makefile index 99bb33b6a2..9fc3b6711f 100644 --- a/tools/console/daemon/Makefile +++ b/tools/console/daemon/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenstore) CFLAGS += $(CFLAGS_libxenevtchn) diff --git a/tools/debugger/kdd/Makefile b/tools/debugger/kdd/Makefile index 26116949d4..a72ad3b1e0 100644 --- a/tools/debugger/kdd/Makefile +++ b/tools/debugger/kdd/Makefile @@ -1,7 +1,6 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += -DXC_WANT_COMPAT_MAP_FOREIGN_API LDLIBS += $(LDLIBS_libxenctrl) diff --git a/tools/flask/utils/Makefile b/tools/flask/utils/Makefile index 6be134142a..88d7edb6b1 100644 --- a/tools/flask/utils/Makefile +++ b/tools/flask/utils/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenctrl) TARGETS := flask-loadpolicy flask-setenforce flask-getenforce flask-label-pci flask-get-bool flask-set-bool diff --git a/tools/fuzz/cpu-policy/Makefile b/tools/fuzz/cpu-policy/Makefile index 41a2230408..6e7743e0aa 100644 --- a/tools/fuzz/cpu-policy/Makefile +++ b/tools/fuzz/cpu-policy/Makefile @@ -17,7 +17,7 @@ install: all .PHONY: uninstall -CFLAGS += -Werror $(CFLAGS_xeninclude) -D__XEN_TOOLS__ +CFLAGS += $(CFLAGS_xeninclude) -D__XEN_TOOLS__ CFLAGS += $(APPEND_CFLAGS) -Og vpath %.c ../../../xen/lib/x86 diff --git a/tools/misc/Makefile b/tools/misc/Makefile index 0e02401227..1c6e1d6a04 100644 --- a/tools/misc/Makefile +++ b/tools/misc/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h CFLAGS += $(CFLAGS_libxenevtchn) diff --git a/tools/tests/cpu-policy/Makefile b/tools/tests/cpu-policy/Makefile index 93af9d76fa..c5b81afc71 100644 --- a/tools/tests/cpu-policy/Makefile +++ b/tools/tests/cpu-policy/Makefile @@ -36,7 +36,7 @@ install: all uninstall: $(RM) -- $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/,$(TARGETS)) -CFLAGS += -Werror -D__XEN_TOOLS__ +CFLAGS += -D__XEN_TOOLS__ CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/tests/depriv/Makefile b/tools/tests/depriv/Makefile index 3cba28da25..7d9e3b01bb 100644 --- a/tools/tests/depriv/Makefile +++ b/tools/tests/depriv/Makefile @@ -1,7 +1,7 @@ XEN_ROOT=$(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wno-declaration-after-statement +CFLAGS += -Wno-declaration-after-statement CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) diff --git a/tools/tests/resource/Makefile b/tools/tests/resource/Makefile index b3cd70c06d..a5856bf095 100644 --- a/tools/tests/resource/Makefile +++ b/tools/tests/resource/Makefile @@ -27,7 +27,6 @@ install: all uninstall: $(RM) -- $(DESTDIR)$(LIBEXEC_BIN)/$(TARGET) -CFLAGS += -Werror CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) CFLAGS += $(CFLAGS_libxenforeginmemory) diff --git a/tools/tests/tsx/Makefile b/tools/tests/tsx/Makefile index d7d2a5d95e..a4f516b725 100644 --- a/tools/tests/tsx/Makefile +++ b/tools/tests/tsx/Makefile @@ -26,7 +26,6 @@ uninstall: .PHONY: uninstall uninstall: -CFLAGS += -Werror CFLAGS += -I$(XEN_ROOT)/tools/libs/ctrl -I$(XEN_ROOT)/tools/libs/guest CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(CFLAGS_libxenctrl) diff --git a/tools/tests/xenstore/Makefile b/tools/tests/xenstore/Makefile index 239e1dce47..202dda0d3c 100644 --- a/tools/tests/xenstore/Makefile +++ b/tools/tests/xenstore/Makefile @@ -27,7 +27,6 @@ install: all uninstall: $(RM) -- $(addprefix $(DESTDIR)$(LIBEXEC_BIN)/,$(TARGETS)) -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenstore) CFLAGS += $(APPEND_CFLAGS) diff --git a/tools/xcutils/Makefile b/tools/xcutils/Makefile index e40a2c4bfa..3687f6cd8f 100644 --- a/tools/xcutils/Makefile +++ b/tools/xcutils/Makefile @@ -13,8 +13,6 @@ include $(XEN_ROOT)/tools/Rules.mk TARGETS := readnotes lsevtchn -CFLAGS += -Werror - CFLAGS_readnotes.o := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) $(CFLAGS_libxenguest) CFLAGS_lsevtchn.o := $(CFLAGS_libxenevtchn) $(CFLAGS_libxenctrl) diff --git a/tools/xenmon/Makefile b/tools/xenmon/Makefile index 3e150b0659..679c4b41a3 100644 --- a/tools/xenmon/Makefile +++ b/tools/xenmon/Makefile @@ -13,7 +13,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenevtchn) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenctrl) diff --git a/tools/xenpaging/Makefile b/tools/xenpaging/Makefile index e2ed9eaa3f..835cf2b965 100644 --- a/tools/xenpaging/Makefile +++ b/tools/xenpaging/Makefile @@ -12,7 +12,6 @@ OBJS-y += xenpaging.o OBJS-y += policy_$(POLICY).o OBJS-y += pagein.o -CFLAGS += -Werror CFLAGS += -Wno-unused TARGETS := xenpaging diff --git a/tools/xenpmd/Makefile b/tools/xenpmd/Makefile index e0d3f06ab2..8da20510b5 100644 --- a/tools/xenpmd/Makefile +++ b/tools/xenpmd/Makefile @@ -1,7 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror CFLAGS += $(CFLAGS_libxenstore) LDLIBS += $(LDLIBS_libxenstore) diff --git a/tools/xentop/Makefile b/tools/xentop/Makefile index 7bd96f34d5..70cc2211c5 100644 --- a/tools/xentop/Makefile +++ b/tools/xentop/Makefile @@ -13,7 +13,7 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -DGCC_PRINTF -Werror $(CFLAGS_libxenstat) +CFLAGS += -DGCC_PRINTF $(CFLAGS_libxenstat) LDLIBS += $(LDLIBS_libxenstat) $(CURSES_LIBS) $(TINFO_LIBS) $(SOCKET_LIBS) -lm CFLAGS += -DHOST_$(XEN_OS) diff --git a/tools/xentrace/Makefile b/tools/xentrace/Makefile index 63f2f6532d..d50d400472 100644 --- a/tools/xentrace/Makefile +++ b/tools/xentrace/Makefile @@ -1,8 +1,6 @@ XEN_ROOT=$(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror - CFLAGS += $(CFLAGS_libxenevtchn) CFLAGS += $(CFLAGS_libxenctrl) LDLIBS += $(LDLIBS_libxenevtchn) diff --git a/tools/xl/Makefile b/tools/xl/Makefile index b7f439121a..5f7aa5f46c 100644 --- a/tools/xl/Makefile +++ b/tools/xl/Makefile @@ -5,7 +5,7 @@ XEN_ROOT = $(CURDIR)/../.. include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wno-format-zero-length -Wmissing-declarations \ +CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ -Wno-declaration-after-statement -Wformat-nonliteral CFLAGS += -fPIC diff --git a/tools/debugger/gdbsx/Rules.mk b/tools/debugger/gdbsx/Rules.mk index 920f1c87fb..0610db873b 100644 --- a/tools/debugger/gdbsx/Rules.mk +++ b/tools/debugger/gdbsx/Rules.mk @@ -1,6 +1,6 @@ include $(XEN_ROOT)/tools/Rules.mk -CFLAGS += -Werror -Wmissing-prototypes +CFLAGS += -Wmissing-prototypes # (gcc 4.3x and later) -Wconversion -Wno-sign-conversion CFLAGS-$(clang) += -Wno-ignored-attributes diff --git a/tools/firmware/Rules.mk b/tools/firmware/Rules.mk index 278cca01e4..d3482c9ec4 100644 --- a/tools/firmware/Rules.mk +++ b/tools/firmware/Rules.mk @@ -11,8 +11,6 @@ ifneq ($(debug),y) CFLAGS += -DNDEBUG endif -CFLAGS += -Werror - $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS)) $(call cc-option-add,CFLAGS,CC,-fcf-protection=none) diff --git a/tools/libfsimage/common.mk b/tools/libfsimage/common.mk index 77bc957f27..4fc8c66795 100644 --- a/tools/libfsimage/common.mk +++ b/tools/libfsimage/common.mk @@ -2,7 +2,7 @@ include $(XEN_ROOT)/tools/Rules.mk FSDIR := $(libdir)/xenfsimage CFLAGS += -Wno-unknown-pragmas -I$(XEN_ROOT)/tools/libfsimage/common/ -DFSIMAGE_FSDIR=\"$(FSDIR)\" -CFLAGS += -Werror -D_GNU_SOURCE +CFLAGS += -D_GNU_SOURCE LDFLAGS += -L../common/ PIC_OBJS = $(patsubst %.c,%.opic,$(LIB_SRCS-y)) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 2b8e7a6128..e47fb30ed4 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -14,7 +14,7 @@ MINOR ?= 0 SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map -CFLAGS += -Werror -Wmissing-prototypes +CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) diff --git a/tools/ocaml/common.make b/tools/ocaml/common.make index d5478f626f..0c8a597d5b 100644 --- a/tools/ocaml/common.make +++ b/tools/ocaml/common.make @@ -9,7 +9,7 @@ OCAMLLEX ?= ocamllex OCAMLYACC ?= ocamlyacc OCAMLFIND ?= ocamlfind -CFLAGS += -fPIC -Werror -I$(shell ocamlc -where) +CFLAGS += -fPIC -I$(shell ocamlc -where) OCAMLOPTFLAG_G := $(shell $(OCAMLOPT) -h 2>&1 | sed -n 's/^ *\(-g\) .*/\1/p') OCAMLOPTFLAGS = $(OCAMLOPTFLAG_G) -ccopt "$(LDFLAGS)" -dtypes $(OCAMLINCLUDE) -cc $(CC) -w F -warn-error F diff --git a/tools/xenstore/Makefile.common b/tools/xenstore/Makefile.common index 21b78b0538..ddbac052ac 100644 --- a/tools/xenstore/Makefile.common +++ b/tools/xenstore/Makefile.common @@ -9,7 +9,6 @@ XENSTORED_OBJS-$(CONFIG_NetBSD) += xenstored_posix.o XENSTORED_OBJS-$(CONFIG_FreeBSD) += xenstored_posix.o XENSTORED_OBJS-$(CONFIG_MiniOS) += xenstored_minios.o -CFLAGS += -Werror # Include configure output (config.h) CFLAGS += -include $(XEN_ROOT)/tools/config.h CFLAGS += -I./include From patchwork Thu Oct 13 13:05:02 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005955 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 73A8AC4332F for ; Thu, 13 Oct 2022 13:05:48 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422023.667838 (Exim 4.92) (envelope-from ) id 1oixu4-0002ok-R3; Thu, 13 Oct 2022 13:05:36 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422023.667838; Thu, 13 Oct 2022 13:05:36 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu4-0002nt-Kr; Thu, 13 Oct 2022 13:05:36 +0000 Received: by outflank-mailman (input) for mailman id 422023; Thu, 13 Oct 2022 13:05:34 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu2-0002ig-Rg for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:34 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b7dd6bdc-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:33 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b7dd6bdc-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666333; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=WWgKKsGpMO0s5/MpdnydWA9yplEqj5PrJ/SuQ+hxLac=; b=IbDVdYonQ1rY086uNpaZFRLbchMY59nKYzA0B0/bmIVcyUla2H4rVXt1 JZNpz4+cV6jl0Ir200+sE5JktsFzVGx19vwrJualU1vMEmP+22KTUH3KC JWT9ute2duXzM/KIO7l1V5qjpNLTER0NZCJX3Y2REbmqpQR4gTaSQkpK0 w=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 83071509 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:fniIGqq1F94H0HWV26B5WFdV/DxeBmJyZRIvgKrLsJaIsI4StFCzt garIBmPaP6NYWL3eIp1YNyxoUsE7MPcndFjTgBtpC5jH3kRoJuZCYyVIHmrMnLJJKUvbq7FA +Y2MYCccZ9uHhcwgj/3b9ANeFEljfngqoLUUbKCYGYpLeNdYH9JoQp5nOIkiZJfj9G8Agec0 fv/uMSaM1K+s9JOGjt8B5mr9VU+4ZwehBtC5gZkPKgS5weH/5UoJMl3yZ+ZfiOQrrZ8RoZWd 86bpJml82XQ+QsaC9/Nut4XpWVTH9Y+lSDX4pZnc/DKbipq/0Te4Y5iXBYoUm9Fii3hojxE4 I4lWapc6+seFvakdOw1C3G0GszlVEFM0OevzXOX6aR/w6BaGpdFLjoH4EweZOUlFuhL7W5m0 +xIEQofYyG5heON6r+bEsBnu/YMFZy+VG8fkikIITDxCP8nRdbIQrnQ5M8e1zA17ixMNa+AP YxDM2MpNUmeJU0UUrsUIMtWcOOAj3/jczpeuRSNqLA++WT7xw1tyrn9dtHSf7RmQO0FxR7H/ z+ergwVBDkjE4C74jWO3EiwuerOsTPiBaMKH5uno6sCbFq7mTVIVUx+uUGAiea9ol6zXZRYM UN80jojq+0++VKmSvH5XgakuziUsxgEQd1SHuYmrgaXxcLpDx2xXzZeCGQbMZp/6ZFwFWdCO kK1c83BIyw/iYeHREOn9Lavhz6SYQEeEF0tXHpRJeca2OXLrIY2hxPJa99sFq+pk9H4cQ3NL yC2QDsW3OtK05NSv0mv1RWe2m/3+MCVJuIgzl+PNl9J+D+Vc2JMi2aAzVHApchNI4+CJrVql ChVwpPOhAzi4HzkqcBsfAnvNOv0jxpmGGeG6bKKI3XG32XFxpJbVdoMiAyS3W8wWir+RRfnY VXIpSRa74JJMX2hYMdfOtzvVppylfC4S4u8DJg4i+aihbAoLWe6ENxGPxbMjwgBbmB2+U3AB XtrWZn1VitLYUiW5DG3W/0cwdcW+8zK/kuKHMiT8vhS+eDBDJJjYetabQDmgyFQxP/snTg5B P4Ga5vXlEQBDrejCsQVmKZKRW03wbEALcieg6RqmiSreWKKxElJ5yft/I4c IronPort-HdrOrdr: A9a23:qMlW6a0MORSMniSv4TZrTQqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="83071509" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH for-4.17 v5 06/17] tools/hotplug: Generate "hotplugpath.sh" with configure Date: Thu, 13 Oct 2022 14:05:02 +0100 Message-ID: <20221013130513.52440-7-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/configure.ac | 1 + tools/hotplug/common/Makefile | 10 ++-------- tools/configure | 3 ++- tools/hotplug/common/hotplugpath.sh.in | 16 ++++++++++++++++ 4 files changed, 21 insertions(+), 9 deletions(-) create mode 100644 tools/hotplug/common/hotplugpath.sh.in diff --git a/tools/configure.ac b/tools/configure.ac index 09059bc569..18e481d77e 100644 --- a/tools/configure.ac +++ b/tools/configure.ac @@ -7,6 +7,7 @@ AC_INIT([Xen Hypervisor Tools], m4_esyscmd([../version.sh ../xen/Makefile]), AC_CONFIG_SRCDIR([libs/light/libxl.c]) AC_CONFIG_FILES([ ../config/Tools.mk +hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons diff --git a/tools/hotplug/common/Makefile b/tools/hotplug/common/Makefile index e8a8dbea6c..62afe1019e 100644 --- a/tools/hotplug/common/Makefile +++ b/tools/hotplug/common/Makefile @@ -1,19 +1,14 @@ XEN_ROOT = $(CURDIR)/../../.. include $(XEN_ROOT)/tools/Rules.mk -HOTPLUGPATH := hotplugpath.sh - # OS-independent hotplug scripts go in this directory # Xen scripts to go there. XEN_SCRIPTS := -XEN_SCRIPT_DATA := $(HOTPLUGPATH) - -genpath-target = $(call buildmakevars2file,$(HOTPLUGPATH)) -$(eval $(genpath-target)) +XEN_SCRIPT_DATA := hotplugpath.sh .PHONY: all -all: $(HOTPLUGPATH) +all: .PHONY: install install: install-scripts @@ -40,7 +35,6 @@ uninstall-scripts: .PHONY: clean clean: - rm -f $(HOTPLUGPATH) .PHONY: distclean distclean: clean diff --git a/tools/configure b/tools/configure index acd9a04c3b..6199823f5a 100755 --- a/tools/configure +++ b/tools/configure @@ -2456,7 +2456,7 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu -ac_config_files="$ac_config_files ../config/Tools.mk hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf" +ac_config_files="$ac_config_files ../config/Tools.mk hotplug/common/hotplugpath.sh hotplug/FreeBSD/rc.d/xencommons hotplug/FreeBSD/rc.d/xendriverdomain hotplug/Linux/init.d/sysconfig.xencommons hotplug/Linux/init.d/sysconfig.xendomains hotplug/Linux/init.d/xen-watchdog hotplug/Linux/init.d/xencommons hotplug/Linux/init.d/xendomains hotplug/Linux/init.d/xendriverdomain hotplug/Linux/launch-xenstore hotplug/Linux/vif-setup hotplug/Linux/xen-hotplug-common.sh hotplug/Linux/xendomains hotplug/NetBSD/rc.d/xencommons hotplug/NetBSD/rc.d/xendriverdomain ocaml/libs/xs/paths.ml ocaml/xenstored/paths.ml ocaml/xenstored/oxenstored.conf" ac_config_headers="$ac_config_headers config.h" @@ -10947,6 +10947,7 @@ for ac_config_target in $ac_config_targets do case $ac_config_target in "../config/Tools.mk") CONFIG_FILES="$CONFIG_FILES ../config/Tools.mk" ;; + "hotplug/common/hotplugpath.sh") CONFIG_FILES="$CONFIG_FILES hotplug/common/hotplugpath.sh" ;; "hotplug/FreeBSD/rc.d/xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xencommons" ;; "hotplug/FreeBSD/rc.d/xendriverdomain") CONFIG_FILES="$CONFIG_FILES hotplug/FreeBSD/rc.d/xendriverdomain" ;; "hotplug/Linux/init.d/sysconfig.xencommons") CONFIG_FILES="$CONFIG_FILES hotplug/Linux/init.d/sysconfig.xencommons" ;; diff --git a/tools/hotplug/common/hotplugpath.sh.in b/tools/hotplug/common/hotplugpath.sh.in new file mode 100644 index 0000000000..1036b884b8 --- /dev/null +++ b/tools/hotplug/common/hotplugpath.sh.in @@ -0,0 +1,16 @@ +sbindir="@sbindir@" +bindir="@bindir@" +LIBEXEC="@LIBEXEC@" +LIBEXEC_BIN="@LIBEXEC_BIN@" +libdir="@libdir@" +SHAREDIR="@SHAREDIR@" +XENFIRMWAREDIR="@XENFIRMWAREDIR@" +XEN_CONFIG_DIR="@XEN_CONFIG_DIR@" +XEN_SCRIPT_DIR="@XEN_SCRIPT_DIR@" +XEN_LOCK_DIR="@XEN_LOCK_DIR@" +XEN_RUN_DIR="@XEN_RUN_DIR@" +XEN_PAGING_DIR="@XEN_PAGING_DIR@" +XEN_DUMP_DIR="@XEN_DUMP_DIR@" +XEN_LOG_DIR="@XEN_LOG_DIR@" +XEN_LIB_DIR="@XEN_LIB_DIR@" +XEN_RUN_STORED="@XEN_RUN_STORED@" From patchwork Thu Oct 13 13:05:03 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005954 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 92972C43219 for ; Thu, 13 Oct 2022 13:05:47 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422025.667854 (Exim 4.92) (envelope-from ) id 1oixu6-00038o-1p; Thu, 13 Oct 2022 13:05:38 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422025.667854; Thu, 13 Oct 2022 13:05:37 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu5-00036z-Po; Thu, 13 Oct 2022 13:05:37 +0000 Received: by outflank-mailman (input) for mailman id 422025; Thu, 13 Oct 2022 13:05:35 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu3-0002ig-Oe for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:35 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b87e2103-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:34 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b87e2103-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666334; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=4HJ6zZu2n6v+FIEsm8kbGG2N7wL5T8JT/E4hq3TeoGM=; b=PGxxjbx5qpDybNK83Kf/YmGlUbwdBv2nbj4HLTmIRbcY2Nwzp+NZ5lhO wWhNAttnBwZdUcvOoOMLC7fi02Ke5Jy0pRXndYagw7MaKC8DX3bLqgBjw lpTBSdHjJVaryl24B+wOdd+i4C/FX243/vgjGIrzg0x7IT35ms2xvO0Zf E=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82635803 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:26+T5aOR6jYbhSnvrR2gl8FynXyQoLVcMsEvi/4bfWQNrUpw02MDz TYZCGrSOPeKZ2vwfNl1a9nj9B8Ou8CBz4JqGQto+SlhQUwRpJueD7x1DKtS0wC6dZSfER09v 63yTvGacajYm1eF/k/F3oDJ9CU6j+fQLlbFILasEjhrQgN5QzsWhxtmmuoo6qZlmtH8C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dmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="82635803" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 07/17] libs/light/gentypes.py: allow to generate headers in subdirectory Date: Thu, 13 Oct 2022 14:05:03 +0100 Message-ID: <20221013130513.52440-8-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 This doesn't matter yet but it will when for example the script will be run from tools/ to generate files tools/libs/light/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/gentypes.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/tools/libs/light/gentypes.py b/tools/libs/light/gentypes.py index 9a45e45acc..3fe3873242 100644 --- a/tools/libs/light/gentypes.py +++ b/tools/libs/light/gentypes.py @@ -584,6 +584,9 @@ def libxl_C_enum_from_string(ty, str, e, indent = " "): s = indent + s return s.replace("\n", "\n%s" % indent).rstrip(indent) +def clean_header_define(header_path): + return header_path.split('/')[-1].upper().replace('.','_') + if __name__ == '__main__': if len(sys.argv) != 6: @@ -598,7 +601,7 @@ if __name__ == '__main__': f = open(header, "w") - header_define = header.upper().replace('.','_') + header_define = clean_header_define(header) f.write("""#ifndef %s #define %s @@ -648,7 +651,7 @@ if __name__ == '__main__': f = open(header_json, "w") - header_json_define = header_json.upper().replace('.','_') + header_json_define = clean_header_define(header_json) f.write("""#ifndef %s #define %s @@ -672,7 +675,7 @@ if __name__ == '__main__': f = open(header_private, "w") - header_private_define = header_private.upper().replace('.','_') + header_private_define = clean_header_define(header_private) f.write("""#ifndef %s #define %s From patchwork Thu Oct 13 13:05:04 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005956 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 8FE43C433FE for ; Thu, 13 Oct 2022 13:05:49 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422027.667881 (Exim 4.92) (envelope-from ) id 1oixu8-0003nL-Fk; Thu, 13 Oct 2022 13:05:40 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422027.667881; Thu, 13 Oct 2022 13:05:40 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu7-0003kD-Vc; Thu, 13 Oct 2022 13:05:39 +0000 Received: by outflank-mailman (input) for mailman id 422027; Thu, 13 Oct 2022 13:05:38 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu5-0002ig-UJ for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:37 +0000 Received: from esa2.hc3370-68.iphmx.com (esa2.hc3370-68.iphmx.com [216.71.145.153]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id b9d1c306-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:36 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b9d1c306-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666336; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=W6vCbrh65CqtneFRPKerc/tF+uYF6bBQ+treqeycw4E=; b=SGWnzbWl795oZfchXHCSe88gPRYftZsJ87Kjp2lJaEvtAdXBscoiDmiq 5pbtffp1MIx0ZqujnKv93cpJtFWC62C9gjgNSCBVh0H+yK8TPQFXN2vnC N2hMxrEb5RxQDGHBpAnI4TokM5Fy3PLsPOOUZJQxd5WUFZKwmVAMuycMV c=; Authentication-Results: esa2.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82660726 X-Ironport-Server: esa2.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:O8z5oa6QIBiWaU9H14PguAxR2vbMJQxQLiYv2ybIWGNS2BzvzP5K+TjmH0vNjFa4fxt22/8FxV2p3KMkOC67Ar4lOsC3atGE9cPM/RmyDZ4Y+LPjuR6OhGYfSQBBz2fMjOQdUg4vbJtmBOWi4zEqUdqZzZT0izEmbOWWRMqKXEOmWI3X6JvEkroYIpUU1ZfAZJOWzzG+58wvmrF0hrUns2YH23FhWc6Uk73zQNc5mjFzKovuiuDsx9ZLhp5n3+HHlJqYYwvzSPZ/1NgS0foL4XD49D6moxF5Bi50IyxgqwRO082RQGfsqZGASANQ0GDzVJt0Yb59mgdSuZYaXeMmk5DwvGjS5qFrtyVJiDdjveR6CwAqOaK1Su1DJLTGNiVYkxvheQE7NLfg3py667s6287d6QE0OToROgWwpKIhvxouHLR/sRzY5zVLTpxu7TVCcPM0HX3E+DMkLWx+8fx/pT7kNReK4BCqOo0SazDT/ee1cqef4DtNM8Qx8iKBG4CaP72OMVO6iYBOAqpS1HOrBHx141T+g1yGGReGdTG95OF/kYB53fkvMt6wqJzskExbrYeG37O/4zQnw1elE+Rke2T7GNO44DrWGJo9xYWVqIwjKu/+wZcr/kmTyZvPZA2oS0qUkTPgWCVTvw6DbWn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Sophos;i="5.95,180,1661832000"; d="scan'208";a="82660726" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu Subject: [XEN PATCH for-4.17 v5 08/17] git-checkout.sh: handle running git-checkout from a different directory Date: Thu, 13 Oct 2022 14:05:04 +0100 Message-ID: <20221013130513.52440-9-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 "$DIR" might not be a full path and it might not have `pwd` as ".." directory. So use `cd -` to undo the first `cd` command. Also, use `basename` to make a symbolic link with a relative path. This doesn't matter yet but it will when for example the commands to clone OVMF is been run from tools/ rather than tools/firmware/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch scripts/git-checkout.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/git-checkout.sh b/scripts/git-checkout.sh index 20ae31ff23..fd4425ac4e 100755 --- a/scripts/git-checkout.sh +++ b/scripts/git-checkout.sh @@ -19,9 +19,9 @@ if test \! -d $DIR-remote; then cd $DIR-remote.tmp $GIT branch -D dummy >/dev/null 2>&1 ||: $GIT checkout -b dummy $TAG - cd .. + cd - fi mv $DIR-remote.tmp $DIR-remote fi rm -f $DIR -ln -sf $DIR-remote $DIR +ln -sf $(basename $DIR-remote) $DIR From patchwork Thu Oct 13 13:05:05 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005958 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id E76E7C433FE for ; Thu, 13 Oct 2022 13:05:52 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422029.667909 (Exim 4.92) (envelope-from ) id 1oixuC-0004pr-A0; Thu, 13 Oct 2022 13:05:44 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422029.667909; Thu, 13 Oct 2022 13:05:44 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuC-0004oj-3S; Thu, 13 Oct 2022 13:05:44 +0000 Received: by outflank-mailman (input) for mailman id 422029; Thu, 13 Oct 2022 13:05:42 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuA-0002ig-If for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:42 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bc557b41-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:41 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bc557b41-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666341; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=/gk/zrc7mUau8n7u3084orMZkSKyjao6ioLVB6VKyZU=; b=hSmZqwzn5ISahHFWLEg2zgH5M1Z7tuvlpzPbOR4n1zr6XunF8j/QK17d Amp4Y2uT2MUCkEfm0kfJ2l4/9H3CQKQqVvM8kYk+Ka6FEDggnNHVHmnvT daUg7eEFjolmTvb9ya1zoRC6leMotFLpY1H01/lrQcA5NDCXTqLvbyAna c=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 85173820 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:Q0ylEKB239wVMxVW/yzjw5YqxClBgxIJ4kV8jS/XYbTApD1z1j1Um DQYXmjQM/fcYGv3L9l+b463oUoAup7SmIM2QQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8pWo4ow/jb8kk25K2p4GpwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7vdkrc+dZk 72hvbToIesg0zaldO41C3G0GAkmVUFKFSOuzdFSfqV/wmWfG0YAzcmCA2kIYrY8otsqQl1Uy uQ0GSoxdxKOv+GflefTpulE3qzPLeHuNYIb/Hph0SvYHbAtRpWrr6fivIECmm1q34YXQKiYN 5FxhTlHNXwsZzVGPEsXD5Qv2v+lnHDlfxVTqU6PpLpx6G/WpOB0+OiwaYWOKobSLSlTtmG+t jzIon3LPhM1PtK8ljS5rXSxiNaayEsXX6pNTeblp5aGmma7xGMJDwYNfUCmuvT/gUm7M/pAL 2QE9yxoqrI9nGS7Q9+4UxCmrXqsuh8HR8EWA+A88BuKyKff/0CeHGdsc9JaQIV47olsH2Vsj wLX2YOybdByjFGLYUzCzZPMkG7xBTIqNUMzfxMdTwY94PC29enfkSnzZtpkFae0iPj8Fjfx3 y2GoUACulkDsSIY//7lpA6a2lpAsrCMF1dovVuPAgpJ+ysjPOaYi5qUBU83BBqqBKKQVRG/s XcNgKByB8heXMjWxERhrAjgdYxFBspp0hWG3DaD/LF7rVxBHkJPmqgBiAyS3G8zbq45lcbBO Sc/Qz956p5JJ2eNZqRqeY+3AMlC5fG+S4m7DqiMNoQRO8IZmOq7EMZGPBf44owQuBJ0zfFX1 WmzK65A8kr2+Yw4lWHrFo/xIJcgxzwkxHO7eK0XOy+PiOPGDEN5vJ9fbzNimMhls/7fyOgUm v4DX/a3J+J3CbGuP3aGr9BJcDjn7xETXPjLliCeTcbbSiIOJY3rI6O5LW8JE2C9o5loqw== IronPort-HdrOrdr: A9a23:uMMOjqOXaAcqjcBcTsejsMiBIKoaSvp037Eqv3ofdfUzSL3+qy nOpoVj6faaslcssR0b9OxofZPwI080lqQFhbX5X43DYOCOggLBR+tfBMnZsljd8kXFh4hgPM xbHZSWZuedMbEDt7eY3DWF X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="85173820" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 09/17] libs: Avoid exposing -Wl,--version-script to other built library Date: Thu, 13 Oct 2022 14:05:05 +0100 Message-ID: <20221013130513.52440-10-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 $(SHLIB_LDFLAGS) is used by more targets that the single targets that except it (libxenfoo.so.X.Y). There is also some dynamic libraries in stats/ that uses $(SHLIB_LDFLAGS) (even if those are never built), and there's libxenlight_test.so which doesn't needs a version script. Also, libxenlight_test.so might failed to build if the version script doesn't exist yet. For these reasons, avoid changing the generic $(SHLIB_LDFLAGS) flags, and add the flag directly on the command line. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/libs.mk | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index e47fb30ed4..3eb91fc8f3 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -12,8 +12,6 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) endif MINOR ?= 0 -SHLIB_LDFLAGS += -Wl,--version-script=libxen$(LIBNAME).map - CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) @@ -85,7 +83,7 @@ lib$(LIB_FILE_NAME).so.$(MAJOR): lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(SYMLINK_SHLIB) $< $@ lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxen$(LIBNAME).map - $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) -Wl,--version-script=libxen$(LIBNAME).map $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) # If abi-dumper is available, write out the ABI analysis ifneq ($(ABI_DUMPER),) From patchwork Thu Oct 13 13:05:06 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005959 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 43402C4332F for ; Thu, 13 Oct 2022 13:05:54 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422028.667900 (Exim 4.92) (envelope-from ) id 1oixuB-0004XQ-0A; Thu, 13 Oct 2022 13:05:43 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422028.667900; Thu, 13 Oct 2022 13:05:42 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuA-0004X3-QY; Thu, 13 Oct 2022 13:05:42 +0000 Received: by outflank-mailman (input) for mailman id 422028; Thu, 13 Oct 2022 13:05:41 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixu9-0002ig-7K for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:41 +0000 Received: from esa3.hc3370-68.iphmx.com (esa3.hc3370-68.iphmx.com [216.71.145.155]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id bc1fc814-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:39 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: bc1fc814-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666339; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=fSnLDaFN3eqPfaJnrSLExq/lPHWyHgAYLE/INZekA2E=; b=ZZBbk9BwfzBE5rAHq1K1Hz9isJTRYuJBCDEbu05tOaaSKBoGEbntYOKv zDJ3sFPlbZ5n9qk1U8hGnKkLVJ9lvuk2d/wgXXuouZqk+WgZpF0075A12 06J7EF0IgwQbS92J0d1WtUZ3piWcHpEQJLk127W/RQQ5SduKP1spD+omq A=; Authentication-Results: esa3.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82635816 X-Ironport-Server: esa3.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:xURsA61h2C0wsxFx8fbD5e1xkn2cJEfYwER7XKvMYLTBsI5bpzNVn GIZCzrUM/iMNmX9edFyYdnk9xkA65+DytZgGQtqpC1hF35El5HIVI+TRqvS04F+DeWYFR46s J9OAjXkBJppJpMJjk71atANlVEliefSAOKU5NfsYkhZXRVjRDoqlSVtkus4hp8AqdWiCkaGt MiaT/f3YTdJ4BYpdDNJg06/gEk35q6r4GpD5gVWic1j5zcyqVFEVPrzGonpR5fIatE8NvK3Q e/F0Ia48gvxl/v6Ior4+lpTWhRiro/6ZWBiuFIPM0SRqkEqShgJ+rQ6LJIhhXJ/0F1lqTzTJ OJl7vRcQS9xVkHFdX90vxNwS0mSNoUekFPLzOTWXWV+ACQqflO1q8iCAn3aMqUjqsdQJX9+6 sYmdjILcB/TobmP+uOCH7wEasQLdKEHPasas3BkizrYEewnUdbIRKCiCd1whWlqwJoURLCHO pRfOWEHgBfoOnWjPn8eDo4+m+G5wGHyaTRCpHqepLYt4niVxwt0uFToGIqPJIfXFZwL9qqej lLn417oMw06DdOk8zGM9iORo+LfujyuDer+E5Xnr6U30TV/3Fc7EwYKXFG2pf24jE+WWN9FL UEQvC00osAa60iDXtT7GRqirxasvBEGXMFLO/Yn8wzLwa3Riy6JC25BQjNfZdgOsM4tWSdsx lKPh8nuBzFkrPuSU3313rWeoC62OCMVBXQffiJCRgwAi/HhvYUygxTnXttlVqmvgbXI9SrYm m7Q6nJk3vNK0JBNh/7TEU37byyEncjoaSor1hrtYDyn6B12NKj+Xrb50A2OhRpfF7qxQl6Et XkCvsGR6uESEJ2A/BCwrPUx8KKBvKjcbmCF6bJ7N9x4rmn2pSb/FWxFyGsmTHqFJProbtMAj KX7nQpKrKFeM3KxBUOcS9LgUp96pUQM+DmMaxw1UjasSsIsHONk1Hs0DaJ144wKuBlErE3HE c3HGftA9F5DYUid8BK4Rv0GzZggzT0kyGXYSPjTlkr5jOTGPCbNF+hcajNii9zVC4vd+W3oH yt3bZPWm32zrsWkCsUozWLjBQ9TdiVqbXwHg8dWavSCMmJbJY3VMNeImOtJRmCQt/4K/gs+1 i3iBxQwJZuWrSGvFDhmnVg6NOOyAsch8yhmVcHuVH7xs0UejU+UxP93X/MKkXMProSPEdYco yE5Rvi9 IronPort-HdrOrdr: A9a23:Cib1kKoY5NRo6t2OBs0jWwcaV5oteYIsimQD101hICG8cqSj+P xG+85rsiMc6QxhIU3I9urgBEDtex7hHNtOkOss1NSZLW3bUQmTTL2KhLGKq1aLJ8S9zJ856U 4JSdkZNDSaNzZHZKjBjDVQa+xQo+W6zA== X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="82635816" From: Anthony PERARD To: CC: Anthony PERARD , Andrew Cooper , George Dunlap , "Jan Beulich" , Julien Grall , "Stefano Stabellini" , Wei Liu , Juergen Gross Subject: [XEN PATCH for-4.17 v5 10/17] libs: Fix auto-generation of version-script for unstable libs Date: Thu, 13 Oct 2022 14:05:06 +0100 Message-ID: <20221013130513.52440-11-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 When there isn't a version-script for a shared library (like for unstable libs), we create one based on the current Xen version. But that version-script became out-of-date as soon as Xen's version changes and make as no way to regenerate the version-script on rebuild. In order to allow regenerating the script, we'll have a different filename. In order to check if the content is up-to-date, we'll always generated it and compare. But we also need to know if there's already an existing version script or if we need to generate one, for that we introduce $(version-script) to be used to point to the path of the existing script. (Guessing if a version script exist for a stable library with for example $(wildcard) won't work as a file will exist when building the library without this patch.) We don't need the version-script unless we are making the shared library so it is removed from the "all" target. Signed-off-by: Anthony PERARD --- Alternatively, we could remove the need for to generate a version-script, but that would mean the exported symbols won't have a version anymore (like before, a few versions of Xen ago). Or, we could use --default-symver, but the symboled would be versionned with the soname (e.g. "libxenctrl.so.4.16.0") instead of "VERS_4.16.0". --- Notes: v4: - new patch tools/libs/call/Makefile | 1 + tools/libs/ctrl/Makefile | 3 --- tools/libs/devicemodel/Makefile | 1 + tools/libs/evtchn/Makefile | 1 + tools/libs/foreignmemory/Makefile | 1 + tools/libs/gnttab/Makefile | 1 + tools/libs/guest/Makefile | 3 --- tools/libs/hypfs/Makefile | 1 + tools/libs/light/Makefile | 1 - tools/libs/stat/Makefile | 2 +- tools/libs/store/Makefile | 1 + tools/libs/toolcore/Makefile | 1 + tools/libs/toollog/Makefile | 1 + tools/libs/util/Makefile | 3 --- tools/libs/vchan/Makefile | 3 --- tools/libs/libs.mk | 19 +++++++++++++------ .gitignore | 6 ------ 17 files changed, 23 insertions(+), 26 deletions(-) diff --git a/tools/libs/call/Makefile b/tools/libs/call/Makefile index 103f5ad360..56a964b517 100644 --- a/tools/libs/call/Makefile +++ b/tools/libs/call/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 3 +version-script := libxencall.map include Makefile.common diff --git a/tools/libs/ctrl/Makefile b/tools/libs/ctrl/Makefile index 93442ab389..094e84b8d8 100644 --- a/tools/libs/ctrl/Makefile +++ b/tools/libs/ctrl/Makefile @@ -10,6 +10,3 @@ PKG_CONFIG_NAME := Xencontrol NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk - -clean:: - rm -f libxenctrl.map diff --git a/tools/libs/devicemodel/Makefile b/tools/libs/devicemodel/Makefile index b70dd774e4..20d1d112e7 100644 --- a/tools/libs/devicemodel/Makefile +++ b/tools/libs/devicemodel/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 +version-script := libxendevicemodel.map include Makefile.common diff --git a/tools/libs/evtchn/Makefile b/tools/libs/evtchn/Makefile index 3dad3840c6..18cdaab89e 100644 --- a/tools/libs/evtchn/Makefile +++ b/tools/libs/evtchn/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 +version-script := libxenevtchn.map include Makefile.common diff --git a/tools/libs/foreignmemory/Makefile b/tools/libs/foreignmemory/Makefile index b70dd774e4..81398e88b1 100644 --- a/tools/libs/foreignmemory/Makefile +++ b/tools/libs/foreignmemory/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 4 +version-script := libxenforeignmemory.map include Makefile.common diff --git a/tools/libs/gnttab/Makefile b/tools/libs/gnttab/Makefile index 3dad3840c6..4528830bdc 100644 --- a/tools/libs/gnttab/Makefile +++ b/tools/libs/gnttab/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 2 +version-script := libxengnttab.map include Makefile.common diff --git a/tools/libs/guest/Makefile b/tools/libs/guest/Makefile index 19d3ff2fdb..93338a9301 100644 --- a/tools/libs/guest/Makefile +++ b/tools/libs/guest/Makefile @@ -14,6 +14,3 @@ NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk libxenguest.so.$(MAJOR).$(MINOR): LDLIBS += $(ZLIB_LIBS) -lz - -clean:: - rm -f libxenguest.map diff --git a/tools/libs/hypfs/Makefile b/tools/libs/hypfs/Makefile index 630e1e6f3e..7fae5c750d 100644 --- a/tools/libs/hypfs/Makefile +++ b/tools/libs/hypfs/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxenhypfs.map LDLIBS += -lz diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 13545654c2..1d5716dbba 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -252,6 +252,5 @@ clean:: $(RM) testidl.c.new testidl.c *.api-ok $(RM) $(TEST_PROGS) libxenlight_test.so libxl_test_*.opic $(RM) -r __pycache__ - $(RM) libxenlight.map $(RM) $(AUTOSRCS) $(AUTOINCS) $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean diff --git a/tools/libs/stat/Makefile b/tools/libs/stat/Makefile index 7eaf50e91e..ee5c42bf7b 100644 --- a/tools/libs/stat/Makefile +++ b/tools/libs/stat/Makefile @@ -134,4 +134,4 @@ uninstall:: uninstall-perl-bindings endif clean:: - $(RM) libxenstat.map $(BINDINGS) $(BINDINGSRC) + $(RM) $(BINDINGS) $(BINDINGSRC) diff --git a/tools/libs/store/Makefile b/tools/libs/store/Makefile index 2334c953bb..300c271eb0 100644 --- a/tools/libs/store/Makefile +++ b/tools/libs/store/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 4 MINOR = 0 +version-script := libxenstore.map ifeq ($(CONFIG_Linux),y) LDLIBS += -ldl diff --git a/tools/libs/toolcore/Makefile b/tools/libs/toolcore/Makefile index 0d92b68b3b..20671dadd0 100644 --- a/tools/libs/toolcore/Makefile +++ b/tools/libs/toolcore/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxentoolcore.map LIBHEADER := xentoolcore.h diff --git a/tools/libs/toollog/Makefile b/tools/libs/toollog/Makefile index 2361b8cbf1..d612227c85 100644 --- a/tools/libs/toollog/Makefile +++ b/tools/libs/toollog/Makefile @@ -3,6 +3,7 @@ include $(XEN_ROOT)/tools/Rules.mk MAJOR = 1 MINOR = 0 +version-script := libxentoollog.map include Makefile.common diff --git a/tools/libs/util/Makefile b/tools/libs/util/Makefile index 493d2e00be..e016baf888 100644 --- a/tools/libs/util/Makefile +++ b/tools/libs/util/Makefile @@ -47,6 +47,3 @@ $(OBJS-y) $(PIC_OBJS): $(AUTOINCS) %.c %.h:: %.l @rm -f $*.[ch] $(FLEX) --header-file=$*.h --outfile=$*.c $< - -clean:: - $(RM) libxenutil.map diff --git a/tools/libs/vchan/Makefile b/tools/libs/vchan/Makefile index ac2bff66f5..a1ef60ac8e 100644 --- a/tools/libs/vchan/Makefile +++ b/tools/libs/vchan/Makefile @@ -11,6 +11,3 @@ OBJS-y += io.o NO_HEADERS_CHK := y include $(XEN_ROOT)/tools/libs/libs.mk - -clean:: - rm -f libxenvchan.map diff --git a/tools/libs/libs.mk b/tools/libs/libs.mk index 3eb91fc8f3..cab8e9704a 100644 --- a/tools/libs/libs.mk +++ b/tools/libs/libs.mk @@ -4,6 +4,8 @@ # PKG_CONFIG: name of pkg-config file (xen$(LIBNAME).pc if empty) # MAJOR: major version of lib (Xen version if empty) # MINOR: minor version of lib (0 if empty) +# version-script: Specify the name of a version script to the linker. +# (If empty, a temporary one for unstable library is created) LIBNAME := $(notdir $(CURDIR)) @@ -12,6 +14,10 @@ MAJOR := $(shell $(XEN_ROOT)/version.sh $(XEN_ROOT)/xen/Makefile) endif MINOR ?= 0 +ifeq ($(origin version-script), undefined) +version-script := libxen$(LIBNAME).map.tmp +endif + CFLAGS += -Wmissing-prototypes CFLAGS += $(CFLAGS_xeninclude) CFLAGS += $(foreach lib, $(USELIBS_$(LIBNAME)), $(CFLAGS_libxen$(lib))) @@ -53,7 +59,7 @@ $(PKG_CONFIG_LOCAL): PKG_CONFIG_INCDIR = $(XEN_INCLUDE) $(PKG_CONFIG_LOCAL): PKG_CONFIG_LIBDIR = $(CURDIR) .PHONY: all -all: $(TARGETS) $(PKG_CONFIG_LOCAL) libxen$(LIBNAME).map $(LIBHEADERS) +all: $(TARGETS) $(PKG_CONFIG_LOCAL) $(LIBHEADERS) ifneq ($(NO_HEADERS_CHK),y) all: headers.chk @@ -71,8 +77,9 @@ headers.lst: FORCE @{ set -e; $(foreach h,$(LIBHEADERS),echo $(h);) } > $@.tmp @$(call move-if-changed,$@.tmp,$@) -libxen$(LIBNAME).map: - echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >$@ +libxen$(LIBNAME).map.tmp: FORCE + echo 'VERS_$(MAJOR).$(MINOR) { global: *; };' >.$@.tmp + $(call move-if-changed,.$@.tmp,$@) lib$(LIB_FILE_NAME).a: $(OBJS-y) $(AR) rc $@ $^ @@ -82,8 +89,8 @@ lib$(LIB_FILE_NAME).so: lib$(LIB_FILE_NAME).so.$(MAJOR) lib$(LIB_FILE_NAME).so.$(MAJOR): lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) $(SYMLINK_SHLIB) $< $@ -lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) libxen$(LIBNAME).map - $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) -Wl,--version-script=libxen$(LIBNAME).map $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) +lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR): $(PIC_OBJS) $(version-script) + $(CC) $(LDFLAGS) $(PTHREAD_LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,lib$(LIB_FILE_NAME).so.$(MAJOR) -Wl,--version-script=$(version-script) $(SHLIB_LDFLAGS) -o $@ $(PIC_OBJS) $(LDLIBS) $(APPEND_LDFLAGS) # If abi-dumper is available, write out the ABI analysis ifneq ($(ABI_DUMPER),) @@ -122,7 +129,7 @@ TAGS: clean:: rm -rf $(TARGETS) *~ $(DEPS_RM) $(OBJS-y) $(PIC_OBJS) rm -f lib$(LIB_FILE_NAME).so.$(MAJOR).$(MINOR) lib$(LIB_FILE_NAME).so.$(MAJOR) - rm -f headers.chk headers.lst + rm -f headers.chk headers.lst libxen*.map.tmp .PHONY: distclean distclean: clean diff --git a/.gitignore b/.gitignore index 418bdfaebf..7febfc224d 100644 --- a/.gitignore +++ b/.gitignore @@ -106,8 +106,6 @@ tools/config.cache config/Tools.mk config/Stubdom.mk config/Docs.mk -tools/libs/ctrl/libxenctrl.map -tools/libs/guest/libxenguest.map tools/libs/guest/xc_bitops.h tools/libs/guest/xc_core.h tools/libs/guest/xc_core_arm.h @@ -117,7 +115,6 @@ tools/libs/light/_*.[ch] tools/libs/light/*.pyc tools/libs/light/_libxl.api-for-check tools/libs/light/*.api-ok -tools/libs/light/libxenlight.map tools/libs/light/libxl-save-helper tools/libs/light/dsdt* tools/libs/light/mk_dsdt @@ -127,13 +124,10 @@ tools/libs/light/testidl.c tools/libs/light/test_timedereg tools/libs/light/test_fdderegrace tools/libs/light/tmp.* -tools/libs/stat/libxenstat.map tools/libs/store/list.h tools/libs/store/utils.h tools/libs/store/xs_lib.c tools/libs/util/libxlu_cfg_y.output -tools/libs/util/libxenutil.map -tools/libs/vchan/libxenvchan.map tools/debugger/gdb/gdb-6.2.1-linux-i386-xen/* tools/debugger/gdb/gdb-6.2.1/* tools/debugger/gdb/gdb-6.2.1.tar.bz2 From patchwork Thu Oct 13 13:05:07 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005960 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 16F60C433FE for ; Thu, 13 Oct 2022 13:05:56 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422032.667922 (Exim 4.92) (envelope-from ) id 1oixuE-0005M3-OU; Thu, 13 Oct 2022 13:05:46 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422032.667922; Thu, 13 Oct 2022 13:05:46 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuE-0005K5-Is; Thu, 13 Oct 2022 13:05:46 +0000 Received: by outflank-mailman (input) for mailman id 422032; Thu, 13 Oct 2022 13:05:45 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuD-0001tl-Fc for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:45 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b1636fcd-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:22 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b1636fcd-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666344; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=6Ciqslkc0BK3uoE16/zRFo3axUefMUHAjqrqHVfnJXw=; b=MTvL7uj/wFBa+386lbsujouHQzSdDt+Wm4DJ0WPvix6VdNHGDSgxbS5G WamdMXjn0KBO3esfgYYime52EgbrIOmLzaIevM2b04nEpz7bcUfvLZ2xB eIdb9YK/zpFNjp8fJDiA1dX3vcUHCa0r1xje9Q+WIq7yrXbwq3WHER5sZ w=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760248 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:uZqzra9OpmoW5If2WxCVDrUD6n6TJUtcM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w8g5c/mjKrSua+JFwcNg== IronPort-HdrOrdr: A9a23:D/M2zaDHodxA2pflHemU55DYdb4zR+YMi2TC1yhKJyC9Ffbo8f xG/c5rrSMc5wxwZJhNo7y90ey7MBbhHP1OkO4s1NWZLWrbUQKTRekIh+bfKn/baknDH4ZmpN 5dmsNFaeEYY2IUsS+D2njbL+od X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760248" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu Subject: [XEN PATCH for-4.17 v5 11/17] tools/include: Rework Makefile Date: Thu, 13 Oct 2022 14:05:07 +0100 Message-ID: <20221013130513.52440-12-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rework "xen-xsm" rules to not have to change directory to run mkflask.sh, and store mkflask.sh path in a var, and use a full path for FLASK_H_DEPEND, and output directory is made relative. Rename "all-y" target to a more descriptive "xen/lib/x86/all". Removed the "dist" target which was the only one existing in tools/. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/include/Makefile | 28 +++++++++++++++------------- 1 file changed, 15 insertions(+), 13 deletions(-) diff --git a/tools/include/Makefile b/tools/include/Makefile index b488f7ca9f..81c3d09039 100644 --- a/tools/include/Makefile +++ b/tools/include/Makefile @@ -7,17 +7,20 @@ include $(XEN_ROOT)/tools/Rules.mk # taken into account, i.e. there should be no rules added here for generating # any tools/include/*.h files. -# Relative to $(XEN_ROOT)/xen/xsm/flask -FLASK_H_DEPEND := policy/initial_sids +.PHONY: all +all: xen-foreign xen-dir xen-xsm/.dir +ifeq ($(CONFIG_X86),y) +all: xen/lib/x86/all +endif -.PHONY: all all-y build xen-dir -all build: all-y xen-foreign xen-dir xen-xsm/.dir -all-y: +.PHONY: build +build: all .PHONY: xen-foreign xen-foreign: $(MAKE) -C xen-foreign +.PHONY: xen-dir xen-dir: mkdir -p xen/libelf acpi find xen/ acpi/ -type l -exec rm '{}' + @@ -36,16 +39,18 @@ ifeq ($(CONFIG_X86),y) ln -s $(XEN_ROOT)/xen/include/xen/lib/x86/Makefile xen/lib/x86/ endif -all-$(CONFIG_X86): xen-dir +.PHONY: xen/lib/x86/all +xen/lib/x86/all: xen-dir $(MAKE) -C xen/lib/x86 all XEN_ROOT=$(XEN_ROOT) PYTHON=$(PYTHON) +MKFLASK := $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh +FLASK_H_DEPEND := $(XEN_ROOT)/xen/xsm/flask/policy/initial_sids + # Not xen/xsm as that clashes with link to # $(XEN_ROOT)/xen/include/public/xsm above. -xen-xsm/.dir: $(XEN_ROOT)/xen/xsm/flask/policy/mkflask.sh \ - $(patsubst %,$(XEN_ROOT)/xen/xsm/flask/%,$(FLASK_H_DEPEND)) +xen-xsm/.dir: $(MKFLASK) $(FLASK_H_DEPEND) mkdir -p xen-xsm/flask - cd $(XEN_ROOT)/xen/xsm/flask/ && \ - $(SHELL) policy/mkflask.sh $(AWK) $(CURDIR)/xen-xsm/flask $(FLASK_H_DEPEND) + $(SHELL) $(MKFLASK) $(AWK) xen-xsm/flask $(FLASK_H_DEPEND) touch $@ .PHONY: install @@ -84,8 +89,5 @@ clean: $(MAKE) -C xen-foreign clean rm -f _*.h -.PHONY: dist -dist: install - .PHONY: distclean distclean: clean From patchwork Thu Oct 13 13:05:08 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005961 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 1885DC4332F for ; Thu, 13 Oct 2022 13:05:57 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422033.667928 (Exim 4.92) (envelope-from ) id 1oixuG-0005XN-0K; Thu, 13 Oct 2022 13:05:48 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422033.667928; Thu, 13 Oct 2022 13:05:47 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuF-0005Un-Jw; Thu, 13 Oct 2022 13:05:47 +0000 Received: by outflank-mailman (input) for mailman id 422033; Thu, 13 Oct 2022 13:05:46 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuE-0001tl-JP for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:46 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b2c51c1a-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:23 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b2c51c1a-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666345; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=V8jWdBRJCxUnfV5R+IMYSD99LmO4hxLhQr7j9mADfWE=; b=OM9y8d0OBk7TTNawTP7yIOZ31y9bU8yDWHKaiLLiAPHVflwxTXjVYuBI 96ewqlCHTONaqnXrlL0biyzN1PuwuR7vBaAePBN95HfPifa5QnwlLdcl1 PDpR3RuZQGyaGJfyZw1yGi4cvH9qfrUyd/RF+68l7WKxHZtl8lalxSGM3 E=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760249 X-Ironport-Server: esa5.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:X7LWxKAgQqGLDRVW/yzjw5YqxClBgxIJ4kV8jS/XYbTApGxw0DQEn WRKCG2EM//ZZGSkeYt0Ptm09xkAsJKDzdFhQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8pWo4ow/jb8kk25K2p4GpwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8O105wYj8Nuu+TnnwiGtY+DyDX4pZlc/HKbix5jj4zys4G2M80Mi+7vdkrc+dZk 72hvbToIesg0zaldO41C3G0GAkmVUFKFSOuzdFSfqV/wmWfG0YAzcmCA2kHBNcJy9dTAVpu9 NgFOjw9RR6+v9O5lefTpulE3qzPLeHuNYIb/Hph0SvYHbAtRpWrr6fivIECmm1q34YXQKiYN 5FxhTlHNXwsZzVGPEsXD5Qv2v+lnHDlfxVTqU6PpLpx6G/WpOB0+Oi0b4SNIIDbLSlTtku9n j7jxn7+OxglZdal5yClySqhmcaayEsXX6pNTeblp5aGmma7xGMJDwYNfUCmuvT/gUm7M/pAL 2QE9yxoqrI9nGS7Q9+4UxCmrXqsuh8HR8EWA+A88BuKyKff/0CeHGdsc9JaQIV47olsH2Vsj wLX2YOybdByjFGLYUOkrKalnBeyAggUCXIQaR8vQzY90ta29enfkSnzZtpkFae0iPj8Fjfx3 y2GoUACulkDsSIY//7lpA6a2lpAsrCMF1dovVuPAgpJ+ysjPOaYi5qUBU83BBqqBKKQVRG/s XcNgKByB8heXMjWxERhrAjgdYxFBspp0hWG3DaD/LF7rVxBHkJPmqgBiAyS3G8zbq45lcbBO Sc/Qz956p5JJ2eNZqRqeY+3AMlC5fG+S4m7DqiMNoQRO8IZmOq7EMZGPBf44owQuBJ0zfFX1 WmzK65A8kr2+Yw4lWHrFo/xIJcgxzwkxHO7eK0XOy+PiOPGDEN5vJ9fbzNimMhls/7fyOgUm v4DX/a3J+J3CbGuP3aGr9BJcDjn7xETXPjLliCeTcbbSiIOJY3rI6S5LW8JE2C9o5loqw== IronPort-HdrOrdr: A9a23:YXhOc63UzmCPpIYOzKXWMQqjBIokLtp133Aq2lEZdPRUGvb3qy nIpoV86faUskdoZJhOo7C90cW7LU80sKQFhLX5Xo3SOzUO2lHYT72KhLGKq1aLdhEWtNQtsZ uIG5IOceEYZmIasS+V2maF+q4bsbu6zJw= X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760249" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 12/17] libs/light: Rework acpi table build targets Date: Thu, 13 Oct 2022 14:05:08 +0100 Message-ID: <20221013130513.52440-13-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Currently, a rebuild of libxl will always rebuild for example "build.o". This is because the target depends on "acpi" which never exist. So instead we will have "build.o" have as prerequisites targets that are actually generated by "acpi", that is $(DSDT_FILES-y). While "dsdt_*.c" isn't really a dependency for "build.o", a side effect of building that dsdt_*.c is to also generate the "ssdt_*.h" that "build.o" needs, but I don't want to list all the headers needed by "build.o" and duplicate the information available in "libacpi/Makefile" at this time. Also avoid duplicating the "acpi" target for Arm, and unique one for both architecture. And move the "acpi" target to be with other targets rather than in the middle of the source listing. For the same reason, move the prerequisites listing for both $(DSDT_FILES-y) and "build.o". Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 1d5716dbba..4a8b0f7bcf 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -32,14 +32,10 @@ ACPI_PATH = $(XEN_ROOT)/tools/libacpi DSDT_FILES-$(CONFIG_X86) = dsdt_pvh.c ACPI_OBJS = $(patsubst %.c,%.o,$(DSDT_FILES-y)) build.o static_tables.o ACPI_PIC_OBJS = $(patsubst %.o,%.opic,$(ACPI_OBJS)) -$(DSDT_FILES-y) build.o build.opic: acpi + vpath build.c $(ACPI_PATH)/ vpath static_tables.c $(ACPI_PATH)/ -.PHONY: acpi -acpi: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" - OBJS-$(CONFIG_X86) += $(ACPI_OBJS) CFLAGS += -Wno-format-zero-length -Wmissing-declarations \ @@ -58,8 +54,6 @@ ifeq ($(CONFIG_ARM_64),y) DSDT_FILES-y = dsdt_anycpu_arm.c OBJS-y += libxl_arm_acpi.o OBJS-y += $(DSDT_FILES-y:.c=.o) -dsdt_anycpu_arm.c: - $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" else OBJS-$(CONFIG_ARM) += libxl_arm_no_acpi.o endif @@ -191,6 +185,12 @@ all: $(CLIENTS) $(TEST_PROGS) $(AUTOSRCS) $(AUTOINCS) $(OBJS-y) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): $(AUTOINCS) libxl.api-ok +$(DSDT_FILES-y): acpi + +# Depends on the source files generated by the "acpi" target even if "build.o" +# don't needs them but do need the headers that are also generated by "acpi". +build.o build.opic: $(DSDT_FILES-y) + libxl.api-ok: check-libxl-api-rules _libxl.api-for-check $(PERL) $^ touch $@ @@ -227,6 +227,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_ $(XEN_INCLUDE)/_%.h: _%.h $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) +.PHONY: acpi +acpi: + $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) DSDT_FILES="$(DSDT_FILES-y)" + libxenlight_test.so: $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(CC) $(LDFLAGS) -Wl,$(SONAME_LDFLAG) -Wl,libxenlight.so.$(MAJOR) $(SHLIB_LDFLAGS) -o $@ $^ $(LDLIBS) $(APPEND_LDFLAGS) From patchwork Thu Oct 13 13:05:09 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005968 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 546A0C4332F for ; Thu, 13 Oct 2022 13:15:31 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422109.667955 (Exim 4.92) (envelope-from ) id 1oiy3U-0002aV-Bf; Thu, 13 Oct 2022 13:15:20 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422109.667955; Thu, 13 Oct 2022 13:15:20 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiy3U-0002aO-8c; Thu, 13 Oct 2022 13:15:20 +0000 Received: by outflank-mailman (input) for mailman id 422109; Thu, 13 Oct 2022 13:15:19 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuK-0001tl-Vq for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:53 +0000 Received: from esa6.hc3370-68.iphmx.com (esa6.hc3370-68.iphmx.com [216.71.155.175]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b5ed4008-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:30 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b5ed4008-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666352; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=cMqBsfjjVcDOSywKpK4KZmm9RxQrPRiX94KjnGLwZeE=; b=QrKiHGYZ92LDbGYz8shrZVkph82U/Sz3sFrq66uN3CeOodLg3seSDeOn svXIqskoes0pwM+CUaI+HDzokBvIkgg4iVuNUo+xJxMJ0m3fmkDpapzoT yOBJVYY0pheZOIQWKt70War33hHpZU5nwy6OXnqhGIs58a8TzBin53Mdq U=; Authentication-Results: esa6.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 82281658 X-Ironport-Server: esa6.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:DAGtNqi4Qrx5uckmXImtJFX+X161ZRAKZh0ujC45NGQN5FlHY01je htvXz3XOfyKZDT2KYhwPImxpBkGsJDcmIBiHQc4/y48EXsb9cadCdqndUqhZCn6wu8v7q5Ex 55HNoSfdpBcolv0/ErF3m3J9CEkvU2wbuOgTrSCYkidfCc8IA85kxVvhuUltYBhhNm9Emult Mj75sbSIzdJ4RYtWo4vw//F+U4HUMja4mtC5AVmPKsT5TcyqlFOZH4h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: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="82281658" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 13/17] libs/light: Rework generation of include/_libxl_*.h Date: Thu, 13 Oct 2022 14:05:09 +0100 Message-ID: <20221013130513.52440-14-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Instead of moving the public "_libxl_*.h" headers, we make a copy to the destination so that make doesn't try to remake the targets "_libxl_*.h" in libs/light/ again. A new .PRECIOUS target is added to tell make to not deletes the intermediate targets generated by "gentypes.py". Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 4a8b0f7bcf..9329055c98 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -215,6 +215,8 @@ libxl_internal_json.h: _libxl_types_internal_json.h $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h +# This exploits the 'multi-target pattern rule' trick. +# gentypes.py should be executed only once to make all the targets. _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py $(eval stem = $(notdir $*)) $(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \ @@ -224,8 +226,10 @@ _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_ $(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h) $(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c) -$(XEN_INCLUDE)/_%.h: _%.h - $(call move-if-changed,_$*.h,$(XEN_INCLUDE)/_$*.h) +.PRECIOUS: _libxl_type%.h _libxl_type%.c + +$(XEN_INCLUDE)/_libxl_%.h: _libxl_%.h + cp -f $< $@ .PHONY: acpi acpi: From patchwork Thu Oct 13 13:05:10 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 900A4C433FE for ; Thu, 13 Oct 2022 13:16:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422126.667965 (Exim 4.92) (envelope-from ) id 1oiy46-0003Al-LJ; Thu, 13 Oct 2022 13:15:58 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422126.667965; Thu, 13 Oct 2022 13:15:58 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiy46-0003Ae-IZ; Thu, 13 Oct 2022 13:15:58 +0000 Received: by outflank-mailman (input) for mailman id 422126; Thu, 13 Oct 2022 13:15:57 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixui-0002ig-SZ for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:06:16 +0000 Received: from esa4.hc3370-68.iphmx.com (esa4.hc3370-68.iphmx.com [216.71.155.144]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id cfc32739-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:06:14 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: cfc32739-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666373; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=CGFwXlrWynx6TK1V9fLINkj8ydS6NN68SzpiLukviOo=; b=DxqdkTsXzeCaAMHsGqt6Wc/Jj/DkzkBeyhgVelNDB9rpM5nhy9NIR7OF Beoky3gF8ezAhi/56O5Gis+gEBK5c4INg0QUvAvkCrMPTBD9th3rFpLm+ 3zfo743qzM1a+tm6CqEaAHwvnj3tSL9X1z5TNqHGVroQ5CL2HqEkf7deM k=; Authentication-Results: esa4.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 85173851 X-Ironport-Server: esa4.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:bbyzlaLXB5fQ5GULFE+R1ZUlxSXFcZb7ZxGr2PjKsXjdYENS3j0Dn DMbDGyAOf7ZNmCkeNh3bt6+9k8Cv5CDydY2GVdlqX01Q3x08seUXt7xwmUcnc+xBpaaEB84t ZV2hv3odp1coqr0/0/1WlTZhSAgk/vOHtIQMcacUghpXwhoVSw9vhxqnu89k+ZAjMOwRgiAo rsemeWGULOe82MyYz98B56r8ks15q2q4WhA5zTSWNgQ1LPgvyhNZH4gDfnZw0vQGuF8AuO8T uDf+7C1lkuxE8AFU47Nfh7TKyXmc5aKVeS8oiM+t5uK23CukhcawKcjXMfwXG8M49m/c3Kd/ /0W3XC4YV9B0qQhA43xWTEAe811FfUuFLMqvRFTGCFcpqHLWyKE/hlgMK05Fakh4floBHFwz ONCMxUEbi6Oibrrwr3uH4GAhux7RCXqFIYWu3UmxjDFF/c2B5vERs0m5/cBgm123JoXW6+DO YxJMlKDbzyZC/FLEl4RFJI5mvbunnTleidUgFmUubA28y7YywkZPL3FYIeMJYfaGJw9ckCwj T7dvEbJPRQhDtGe7WPa9SiMncXWknauMG4VPOLhraM76LGJ/UQRBwcRTkCTuuSihwi1XNc3A 1MQ0jojq+417kPDZsnwWVi0rWCJujYYWsFMCKsq5QeV0K3W7g2FQG8eQVZ8hMcO7ZFsA2Zwj xnQwo2vVWcHXKCppWy10o6Psiy3KRYsMjUZQCYEcwYLu4Thr9Rm5v7QdepLHKmwh9zzPDj/x TGWsSQz74kuYd43O7aTpg6e3W/1znTdZktsv1iMADr5hu9sTNT9D7FE/2Q3+hqpwGyxalCa9 EYJlMGFhAzlJcHczXfdKAnh8VzA2hpkDNE+qQQyd3XC3273k5JGQWy3yGAWGauRGpxYEQIFm WeK0e+r2LddPWGxcYh8aJ+rBsIhwMDITIq7C66MNoIWPMcoLmdrGR2CgmbJhgjQfLUEy/lja f93j+72ZZrlNUiX5GXvHLpMuVPa7is/2XnSVfjG8vhT6pLHPSb9dFvwGAHRBgzPxP/b/V69H hc2H5fi9iizp8WnPnmKrt9NcwpXRZX5bLivw/Fqmie4ClIOMAkc5zX5mutJl1BN90iNqtr1w w== IronPort-HdrOrdr: A9a23:JbBuk6gd5vwMeqsH4M/H4LcbiHBQXtwji2hC6mlwRA09TySZ// rAoB19726StN9xYgBYpTnuAsi9qB/nmKKdpLNhX4tKPzOW3FdATrsD0WKK+VSJcEfDH6xmpM JdmsBFebvN5DNB4/oSjjPVLz9Z+qjlzJyV X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="85173851" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 14/17] libs/light: Rework targets prerequisites Date: Thu, 13 Oct 2022 14:05:10 +0100 Message-ID: <20221013130513.52440-15-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 No need for $(AUTOSRCS), GNU make can generate them as needed when trying to build them as needed when trying to build the object. Also, those two AUTOSRCS don't need to be a prerequisite of "all". As for the "clean" target, those two files are already removed via "_*.c". We don't need $(AUTOINCS) either: - As for both _libxl_savm_msgs*.h headers, we are adding more selective dependencies so the headers will still be generated as needed. - "clean" rule already delete the _*.h files, so AUTOINCS aren't needed there. "libxl_internal_json.h" doesn't seems to have ever existed, so the dependency is removed. Add few prerequisite for "libxl_internal.h" so all headers that it depends on should be generated. And have $(SAVE_HELPER_OBJS) depends on "libxl_internal.h". Rework objects prerequisites, to have them dependents on either "libxl.h" or "libxl_internal.h". "libxl.h" is not normally included directly in the source code as "libxl_internal.h" is used instead. But we are adding "libxl.h" as prerequisite of "libxl_internal.h", so generated headers will still be generated as needed. "testidl.c" doesn't depends on "libxl.h" but "testidl.o" does. Also use automatic variables $< and $@. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 29 +++++++++++++++++------------ 1 file changed, 17 insertions(+), 12 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 9329055c98..274e8350bb 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -147,9 +147,6 @@ LIBXL_TEST_OBJS += $(foreach t, $(LIBXL_TESTS_INSIDE),libxl_test_$t.opic) TEST_PROG_OBJS += $(foreach t, $(LIBXL_TESTS_PROGS),test_$t.o) test_common.o TEST_PROGS += $(foreach t, $(LIBXL_TESTS_PROGS),test_$t) -AUTOINCS = _libxl_save_msgs_callout.h _libxl_save_msgs_helper.h -AUTOSRCS = _libxl_save_msgs_callout.c _libxl_save_msgs_helper.c - CLIENTS = testidl libxl-save-helper SAVE_HELPER_OBJS = libxl_save_helper.o _libxl_save_msgs_helper.o @@ -177,13 +174,13 @@ libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -I$(XEN_ROOT)/tools $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenguest) testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight) -testidl.c: libxl_types.idl gentest.py $(XEN_INCLUDE)/libxl.h $(AUTOINCS) - $(PYTHON) gentest.py libxl_types.idl testidl.c.new - mv testidl.c.new testidl.c +testidl.c: libxl_types.idl gentest.py + $(PYTHON) gentest.py $< $@.new + mv -f $@.new $@ -all: $(CLIENTS) $(TEST_PROGS) $(AUTOSRCS) $(AUTOINCS) +all: $(CLIENTS) $(TEST_PROGS) -$(OBJS-y) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): $(AUTOINCS) libxl.api-ok +$(OBJS-y) $(PIC_OBJS) $(SAVE_HELPER_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS): libxl.api-ok $(DSDT_FILES-y): acpi @@ -195,7 +192,7 @@ libxl.api-ok: check-libxl-api-rules _libxl.api-for-check $(PERL) $^ touch $@ -_libxl.api-for-check: $(XEN_INCLUDE)/libxl.h $(AUTOINCS) +_libxl.api-for-check: $(XEN_INCLUDE)/libxl.h $(CC) $(CPPFLAGS) $(CFLAGS) -c -E $< $(APPEND_CFLAGS) \ -DLIBXL_EXTERNAL_CALLERS_ONLY=LIBXL_EXTERNAL_CALLERS_ONLY \ >$@.new @@ -207,13 +204,22 @@ _libxl_save_msgs_helper.h _libxl_save_msgs_callout.h: \ $(PERL) -w $< $@ >$@.new $(call move-if-changed,$@.new,$@) +# +# headers dependencies on generated headers +# $(XEN_INCLUDE)/libxl.h: $(XEN_INCLUDE)/_libxl_types.h $(XEN_INCLUDE)/libxl_json.h: $(XEN_INCLUDE)/_libxl_types_json.h +libxl_internal.h: $(XEN_INCLUDE)/libxl.h $(XEN_INCLUDE)/libxl_json.h libxl_internal.h: _libxl_types_internal.h _libxl_types_private.h _libxl_types_internal_private.h -libxl_internal_json.h: _libxl_types_internal_json.h +libxl_internal.h: _libxl_save_msgs_callout.h -$(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS) $(TEST_PROG_OBJS) $(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h +# +# objects dependencies on headers that depends on generated headers +# +$(TEST_PROG_OBJS): $(XEN_INCLUDE)/libxl.h $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): libxl_internal.h +$(SAVE_HELPER_OBJS): $(XEN_INCLUDE)/libxl.h _libxl_save_msgs_helper.h +testidl.o: $(XEN_INCLUDE)/libxl.h # This exploits the 'multi-target pattern rule' trick. # gentypes.py should be executed only once to make all the targets. @@ -260,5 +266,4 @@ clean:: $(RM) testidl.c.new testidl.c *.api-ok $(RM) $(TEST_PROGS) libxenlight_test.so libxl_test_*.opic $(RM) -r __pycache__ - $(RM) $(AUTOSRCS) $(AUTOINCS) $(MAKE) -C $(ACPI_PATH) ACPI_BUILD_DIR=$(CURDIR) clean From patchwork Thu Oct 13 13:05:11 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005969 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F3C6C4332F for ; Thu, 13 Oct 2022 13:16:11 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422129.667977 (Exim 4.92) (envelope-from ) id 1oiy49-0003RM-0u; Thu, 13 Oct 2022 13:16:01 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422129.667977; Thu, 13 Oct 2022 13:16:00 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiy48-0003RD-U0; Thu, 13 Oct 2022 13:16:00 +0000 Received: by outflank-mailman (input) for mailman id 422129; Thu, 13 Oct 2022 13:15:59 +0000 Received: from se1-gles-flk1-in.inumbo.com ([94.247.172.50] helo=se1-gles-flk1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuK-0001tl-1f for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:52 +0000 Received: from esa5.hc3370-68.iphmx.com (esa5.hc3370-68.iphmx.com [216.71.155.168]) by se1-gles-flk1.inumbo.com (Halon) with ESMTPS id b5eda9ad-4af7-11ed-8fd0-01056ac49cbb; Thu, 13 Oct 2022 15:05:29 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: b5eda9ad-4af7-11ed-8fd0-01056ac49cbb DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666350; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=Nc4WbeeXR+sXTmS5lu4Ec75pp9DLw9YmC4v+YNyuXWw=; b=Tb3KCDrOjpiDjPo+MbrBEQaJW21cfgNCPLnMHJM9T8N/D2TTN6yeCW/d Dcct4TzB/m7ZecTQ1bxIoQCnMLdPGd0Jn5UdLqaFhZ2xf4wUcaEE/z36U gvfNq5ApbLiXlZ/Nlt2+4YdAR3dW/79jnPge5AjmULp4jzqD+CMVzJcDf 8=; Authentication-Results: esa5.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 81760266 X-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USZy5VpPllJauNvxIZd0n3tjlAs/tLjwzgi90Kr2WUN5vYwtaQLWBt3VGYve/205B f4DaJbRo/ieOcWiChTqHXk7dAxacCdqW86s9qS6tIere2JbJY3oMNeJqZtJRmCvt/09ejvgl p1lZnJl9Q== IronPort-HdrOrdr: A9a23:c21tX6xptsK8G+jSPUx4KrPwFL1zdoMgy1knxilNoRw8SKKlfq eV7ZImPH7P+U4ssR4b+exoVJPtfZqYz+8R3WBzB8bEYOCFghrKEGgK1+KLqFeMJ8S9zJ846U 4JSdkGNDSaNzlHZKjBjzVQa+xQouW6zA== X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="81760266" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , "Juergen Gross" Subject: [XEN PATCH for-4.17 v5 15/17] libs/light: Makefile cleanup Date: Thu, 13 Oct 2022 14:05:11 +0100 Message-ID: <20221013130513.52440-16-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Rework "libacpi.h" include in "libxl_x86_acpi.c" as to be more selective about the include path and only add "tools/libacpi/". Also "libxl_dom.c" don't use "libacpi.h" anymore. Use "-iquote" for libacpi headers. Get rid of the weird "$(eval stem =" in the middle of a recipe and use a make automatic variable "$(*F)" instead. Signed-off-by: Anthony PERARD --- Notes: v4: - new patch tools/libs/light/Makefile | 16 +++++++--------- tools/libs/light/libxl_x86_acpi.c | 2 +- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/tools/libs/light/Makefile b/tools/libs/light/Makefile index 274e8350bb..250cc3bd2c 100644 --- a/tools/libs/light/Makefile +++ b/tools/libs/light/Makefile @@ -169,8 +169,7 @@ LDLIBS += $(LDLIBS-y) $(OBJS-y) $(PIC_OBJS) $(LIBXL_TEST_OBJS): CFLAGS += $(CFLAGS_LIBXL) -include $(XEN_ROOT)/tools/config.h $(ACPI_OBJS) $(ACPI_PIC_OBJS): CFLAGS += -I. -DLIBACPI_STDUTILS=\"$(CURDIR)/libxl_x86_acpi.h\" $(TEST_PROG_OBJS) _libxl.api-for-check: CFLAGS += $(CFLAGS_libxentoollog) $(CFLAGS_libxentoolcore) -libxl_dom.o libxl_dom.opic: CFLAGS += -I$(XEN_ROOT)/tools # include libacpi/x86.h -libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -I$(XEN_ROOT)/tools +libxl_x86_acpi.o libxl_x86_acpi.opic: CFLAGS += -iquote $(ACPI_PATH) $(SAVE_HELPER_OBJS): CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenevtchn) $(CFLAGS_libxenguest) testidl.o: CFLAGS += $(CFLAGS_libxenctrl) $(CFLAGS_libxenlight) @@ -224,13 +223,12 @@ testidl.o: $(XEN_INCLUDE)/libxl.h # This exploits the 'multi-target pattern rule' trick. # gentypes.py should be executed only once to make all the targets. _libxl_type%.h _libxl_type%_json.h _libxl_type%_private.h _libxl_type%.c: libxl_type%.idl gentypes.py idl.py - $(eval stem = $(notdir $*)) - $(PYTHON) gentypes.py libxl_type$(stem).idl __libxl_type$(stem).h __libxl_type$(stem)_private.h \ - __libxl_type$(stem)_json.h __libxl_type$(stem).c - $(call move-if-changed,__libxl_type$(stem).h,_libxl_type$(stem).h) - $(call move-if-changed,__libxl_type$(stem)_private.h,_libxl_type$(stem)_private.h) - $(call move-if-changed,__libxl_type$(stem)_json.h,_libxl_type$(stem)_json.h) - $(call move-if-changed,__libxl_type$(stem).c,_libxl_type$(stem).c) + $(PYTHON) gentypes.py libxl_type$(*F).idl __libxl_type$(*F).h __libxl_type$(*F)_private.h \ + __libxl_type$(*F)_json.h __libxl_type$(*F).c + $(call move-if-changed,__libxl_type$(*F).h,_libxl_type$(*F).h) + $(call move-if-changed,__libxl_type$(*F)_private.h,_libxl_type$(*F)_private.h) + $(call move-if-changed,__libxl_type$(*F)_json.h,_libxl_type$(*F)_json.h) + $(call move-if-changed,__libxl_type$(*F).c,_libxl_type$(*F).c) .PRECIOUS: _libxl_type%.h _libxl_type%.c diff --git a/tools/libs/light/libxl_x86_acpi.c b/tools/libs/light/libxl_x86_acpi.c index 57a6b63790..22eb160659 100644 --- a/tools/libs/light/libxl_x86_acpi.c +++ b/tools/libs/light/libxl_x86_acpi.c @@ -16,7 +16,7 @@ #include "libxl_arch.h" #include #include -#include "libacpi/libacpi.h" +#include "libacpi.h" /* Number of pages holding ACPI tables */ #define NUM_ACPI_PAGES 16 From patchwork Thu Oct 13 13:05:12 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005971 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 79F08C43219 for ; Thu, 13 Oct 2022 13:16:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422141.667998 (Exim 4.92) (envelope-from ) id 1oiy4P-0004L1-Hm; Thu, 13 Oct 2022 13:16:17 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422141.667998; Thu, 13 Oct 2022 13:16:17 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiy4P-0004Kl-EY; Thu, 13 Oct 2022 13:16:17 +0000 Received: by outflank-mailman (input) for mailman id 422141; Thu, 13 Oct 2022 13:16:16 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuQ-0002ig-ME for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:05:58 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c3cfa8c6-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:53 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c3cfa8c6-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666353; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=yZl8f6nskAbfIqIwFywI0ObjvI50ZytLF896MN4MC2E=; b=XxnQtvS0tflVy8S9caQQJq0chyqtNj67qLALNnpgj5bkpjD4MxgqS4p/ GCncRIlG0i5MpNi/3C9iraubyGQqk7MF7Fil1ZuHaBFWxK65ZqKI76oM0 NWU5HNWe9oLBs81ntKSHoALZaKVJDu9JUL86kOpeqbx9sQX2o/6p8QFTA M=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 83071574 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronPort-Data: A9a23:g4V3VKB6T0bjpBVW/zTjw5YqxClBgxIJ4kV8jS/XYbTApG4kg2ZRy mseWDuDPvqDN2egetp+Ydiw/EpXusXUm9VrQQY4rX1jcSlH+JHPbTi7wuUcHAvJd5GeExg3h yk6QoOdRCzhZiaE/n9BCpC48T8mk/ngqoPUUIbsIjp2SRJvVBAvgBdin/9RqoNziJ2yDhjlV ena+qUzA3f4nW8pWo4ow/jb8kk25K2p4GpwUmEWPpingnePzxH5M7pHTU2BByOQapVZGOe8W 9HCwNmRlo8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E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="83071574" From: Anthony PERARD To: CC: Anthony PERARD , Henry Wang , George Dunlap , Nick Rosbrook , Wei Liu Subject: [XEN PATCH for-4.17 v5 16/17] tools/golang/xenlight: Rework gengotypes.py and generation of *.gen.go Date: Thu, 13 Oct 2022 14:05:12 +0100 Message-ID: <20221013130513.52440-17-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 gengotypes.py creates both "types.gen.go" and "helpers.gen.go", but make can start gengotypes.py twice. Rework the rules so that gengotypes.py is executed only once. Also, add the ability to provide a path to tell gengotypes.py where to put the files. This doesn't matter yet but it will when for example the script will be run from tools/ to generate the targets. Signed-off-by: Anthony PERARD Release-acked-by: Henry Wang Acked-by: George Dunlap --- Notes: v5: - released-acked to fix occasional CI build issue v4: - new patch tools/golang/xenlight/Makefile | 6 ++++-- tools/golang/xenlight/gengotypes.py | 10 +++++++++- 2 files changed, 13 insertions(+), 3 deletions(-) diff --git a/tools/golang/xenlight/Makefile b/tools/golang/xenlight/Makefile index 00e6d17f2b..c5bb6b94a8 100644 --- a/tools/golang/xenlight/Makefile +++ b/tools/golang/xenlight/Makefile @@ -15,8 +15,10 @@ all: build GOXL_GEN_FILES = types.gen.go helpers.gen.go -%.gen.go: gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(LIBXL_SRC_DIR)/idl.py - LIBXL_SRC_DIR=$(LIBXL_SRC_DIR) $(PYTHON) gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl +# This exploits the 'multi-target pattern rule' trick. +# gentypes.py should be executed only once to make all the targets. +$(subst .gen.,.%.,$(GOXL_GEN_FILES)): gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(LIBXL_SRC_DIR)/idl.py + LIBXL_SRC_DIR=$(LIBXL_SRC_DIR) $(PYTHON) gengotypes.py $(LIBXL_SRC_DIR)/libxl_types.idl $(@D)/types.gen.go $(@D)/helpers.gen.go # Go will do its own dependency checking, and not actuall go through # with the build if none of the input files have changed. diff --git a/tools/golang/xenlight/gengotypes.py b/tools/golang/xenlight/gengotypes.py index ac1cf060dd..ff4c2ad216 100644 --- a/tools/golang/xenlight/gengotypes.py +++ b/tools/golang/xenlight/gengotypes.py @@ -723,7 +723,13 @@ def xenlight_golang_fmt_name(name, exported = True): return words[0] + ''.join(x.title() for x in words[1:]) if __name__ == '__main__': + if len(sys.argv) != 4: + print("Usage: gengotypes.py ", file=sys.stderr) + sys.exit(1) + idlname = sys.argv[1] + path_types = sys.argv[2] + path_helpers = sys.argv[3] (builtins, types) = idl.parse(idlname) @@ -735,9 +741,11 @@ if __name__ == '__main__': // source: {} """.format(os.path.basename(sys.argv[0]), - ' '.join([os.path.basename(a) for a in sys.argv[1:]])) + os.path.basename(sys.argv[1])) xenlight_golang_generate_types(types=types, + path=path_types, comment=header_comment) xenlight_golang_generate_helpers(types=types, + path=path_helpers, comment=header_comment) From patchwork Thu Oct 13 13:05:13 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Anthony PERARD X-Patchwork-Id: 13005972 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 6F60AC4332F for ; Thu, 13 Oct 2022 13:16:26 +0000 (UTC) Received: from list by lists.xenproject.org with outflank-mailman.422134.667988 (Exim 4.92) (envelope-from ) id 1oiy4O-00041g-9U; Thu, 13 Oct 2022 13:16:16 +0000 X-Outflank-Mailman: Message body and most headers restored to incoming version Received: by outflank-mailman (output) from mailman id 422134.667988; Thu, 13 Oct 2022 13:16:16 +0000 Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oiy4O-00041Y-6S; Thu, 13 Oct 2022 13:16:16 +0000 Received: by outflank-mailman (input) for mailman id 422134; Thu, 13 Oct 2022 13:16:14 +0000 Received: from se1-gles-sth1-in.inumbo.com ([159.253.27.254] helo=se1-gles-sth1.inumbo.com) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1oixuT-0002ig-7w for xen-devel@lists.xenproject.org; Thu, 13 Oct 2022 13:06:01 +0000 Received: from esa1.hc3370-68.iphmx.com (esa1.hc3370-68.iphmx.com [216.71.145.142]) by se1-gles-sth1.inumbo.com (Halon) with ESMTPS id c4a10fd2-4af7-11ed-91b4-6bf2151ebd3b; Thu, 13 Oct 2022 15:05:55 +0200 (CEST) X-BeenThere: xen-devel@lists.xenproject.org List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Errors-To: xen-devel-bounces@lists.xenproject.org Precedence: list Sender: "Xen-devel" X-Inumbo-ID: c4a10fd2-4af7-11ed-91b4-6bf2151ebd3b DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=citrix.com; s=securemail; t=1665666354; h=from:to:cc:subject:date:message-id:in-reply-to: references:mime-version:content-transfer-encoding; bh=xNKHGKv0xiseesErXwvSTNU3NRH6cY3P70E/A0khyJY=; b=JKkLA/3JYRZ57DEFovQrgvxhRHuhWN83fhFNKB3SbqWS7ATffIxyIo0b qdBQ4OL3Sl1egie0WwLmZdoiVsoGRf8tOF6PDPSl+Bmh1zvqRbqBT7Tct 3Pb4aWGMy/YGQwMN8aHOEdO2hwLlQUeL06O5yhmCDulStlX0BimWCpRXL 4=; Authentication-Results: esa1.hc3370-68.iphmx.com; dkim=none (message not signed) header.i=none X-SBRS: 2.7 X-MesageID: 83071582 X-Ironport-Server: esa1.hc3370-68.iphmx.com X-Remote-IP: 162.221.156.83 X-Policy: $RELAYED IronP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uPWoyhivBrWO3WHrNFCcw5QcBDWx/ne8qRqSwJKGSI+cElJNhMb6e9Jl1BN90iNqtr1w w== IronPort-HdrOrdr: A9a23:Y6OquKBfZlxZKZLlHelW55DYdb4zR+YMi2TDt3oddfWaSKylfq GV7ZAmPHrP4gr5N0tOpTntAse9qBDnhPtICOsqTNSftWDd0QPFEGgL1+DfKlbbak/DH4BmtJ uJc8JFeaDN5VoRt7eH3OFveexQv+Vu88qT9JnjJ28Gd3AMV0n5hT0JcTpyFCdNNW97LKt8Lr WwzOxdqQGtfHwGB/7LfEXsD4D41qT2fIuNW29/OyIa X-IronPort-AV: E=Sophos;i="5.95,180,1661832000"; d="scan'208";a="83071582" From: Anthony PERARD To: CC: Anthony PERARD , Wei Liu , Christian Lindig , David Scott Subject: [XEN PATCH for-4.17 v5 17/17] tools: Rework linking options for ocaml binding libraries Date: Thu, 13 Oct 2022 14:05:13 +0100 Message-ID: <20221013130513.52440-18-anthony.perard@citrix.com> X-Mailer: git-send-email 2.30.2 In-Reply-To: <20221013130513.52440-1-anthony.perard@citrix.com> References: <20221013130513.52440-1-anthony.perard@citrix.com> MIME-Version: 1.0 Using a full path to the C libraries when preparing one of the ocaml binding for those libraries make the binding unusable by external project. The full path is somehow embedded and reused by the external project when linking against the binding. Instead, we will use the proper way to link a library, by using '-l'. For in-tree build, we also need to provide the search directory via '-L'. (The search path -L are still be embedded, but at least that doesn't prevent the ocaml binding from been used.) Related-to: xen-project/xen#96 Signed-off-by: Anthony PERARD --- Notes: This patch only partially resolve xen-project/xen#96. At least with this patch, the ocaml binding can be used by external project, but those project will still "see" and try to use the rpath and lib search path as the -L and -W,-rpath-link are still embedded in the ocaml binding. I'm working on a more involve series of patch which would remove the unnecessary flags. (This would mean that oxenstored and the ocaml test will need those ldflags, instead of the binding.) v5: - new patch tools/ocaml/libs/eventchn/Makefile | 2 +- tools/ocaml/libs/xc/Makefile | 2 +- tools/ocaml/libs/xentoollog/Makefile | 2 +- tools/ocaml/libs/xl/Makefile | 2 +- tools/Rules.mk | 8 ++++++++ 5 files changed, 12 insertions(+), 4 deletions(-) diff --git a/tools/ocaml/libs/eventchn/Makefile b/tools/ocaml/libs/eventchn/Makefile index 7362a28d9e..dc560ba49b 100644 --- a/tools/ocaml/libs/eventchn/Makefile +++ b/tools/ocaml/libs/eventchn/Makefile @@ -8,7 +8,7 @@ OBJS = xeneventchn INTF = $(foreach obj, $(OBJS),$(obj).cmi) LIBS = xeneventchn.cma xeneventchn.cmxa -LIBS_xeneventchn = $(LDLIBS_libxenevtchn) +LIBS_xeneventchn = $(call xenlibs-ldflags-ldlibs,evtchn) all: $(INTF) $(LIBS) $(PROGRAMS) diff --git a/tools/ocaml/libs/xc/Makefile b/tools/ocaml/libs/xc/Makefile index 67acc46bee..3b76e9ad7b 100644 --- a/tools/ocaml/libs/xc/Makefile +++ b/tools/ocaml/libs/xc/Makefile @@ -10,7 +10,7 @@ OBJS = xenctrl INTF = xenctrl.cmi LIBS = xenctrl.cma xenctrl.cmxa -LIBS_xenctrl = $(LDLIBS_libxenctrl) $(LDLIBS_libxenguest) +LIBS_xenctrl = $(call xenlibs-ldflags-ldlibs,ctrl guest) xenctrl_OBJS = $(OBJS) xenctrl_C_OBJS = xenctrl_stubs diff --git a/tools/ocaml/libs/xentoollog/Makefile b/tools/ocaml/libs/xentoollog/Makefile index 9ede2fd124..1645b40faf 100644 --- a/tools/ocaml/libs/xentoollog/Makefile +++ b/tools/ocaml/libs/xentoollog/Makefile @@ -13,7 +13,7 @@ OBJS = xentoollog INTF = xentoollog.cmi LIBS = xentoollog.cma xentoollog.cmxa -LIBS_xentoollog = $(LDLIBS_libxentoollog) +LIBS_xentoollog = $(call xenlibs-ldflags-ldlibs,toollog) xentoollog_OBJS = $(OBJS) xentoollog_C_OBJS = xentoollog_stubs diff --git a/tools/ocaml/libs/xl/Makefile b/tools/ocaml/libs/xl/Makefile index 7c1c4edced..22d6c93aae 100644 --- a/tools/ocaml/libs/xl/Makefile +++ b/tools/ocaml/libs/xl/Makefile @@ -15,7 +15,7 @@ LIBS = xenlight.cma xenlight.cmxa OCAMLINCLUDE += -I ../xentoollog -LIBS_xenlight = $(LDLIBS_libxenlight) +LIBS_xenlight = $(call xenlibs-ldflags-ldlibs,light) xenlight_OBJS = $(OBJS) xenlight_C_OBJS = xenlight_stubs diff --git a/tools/Rules.mk b/tools/Rules.mk index a165dc4bda..34d495fff7 100644 --- a/tools/Rules.mk +++ b/tools/Rules.mk @@ -113,6 +113,14 @@ define xenlibs-ldflags $(foreach lib,$(1),-L$(XEN_ROOT)/tools/libs/$(lib)) endef +# Flags for linking against all Xen libraries listed in $(1) but by making use +# of -L and -l instead of providing a path to the shared library. +define xenlibs-ldflags-ldlibs + $(call xenlibs-ldflags,$(1)) \ + $(foreach lib,$(1), -l$(FILENAME_$(lib))) \ + $(foreach lib,$(1),$(xenlibs-ldlibs-$(lib))) +endef + define LIB_defs FILENAME_$(1) ?= xen$(1) XEN_libxen$(1) = $$(XEN_ROOT)/tools/libs/$(1)