From nobody Sat Apr 27 06:58:12 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org ARC-Seal: i=1; a=rsa-sha256; t=1594626384; cv=none; d=zohomail.com; s=zohoarc; b=i7IhuYGiSvmTabmsOUw1UtzVg/uQ491ecS/tEDz9gDWIVS2USzF11KqCBMX2qEI16H9LUE68d6ADw97AnC75/b6o1LSqdDa7AOLqAtCtfQ4r97DzGVD80yhlEgyuQQ2y7ZoJt3XBsmsQkLosFRZ188/Qq+RHIFQXsOAU7JEGLFI= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1594626384; h=Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=jnKenGyWIRdmkn6F9J1NNfpAh//eBfM4J97o1uf63/4=; b=aQsYpj6hj2WUu32DWLX7+bNSsNQ5JfONfNxwj/bqYKF2eR83K4f2s7oBrdYzyyfp2k+P3LptH7WIQgXqkQn5JGKUSbbmobv+T+laGc2MRYJswP6hY6zmfH6diT/Tg23AeADGX4wsHIVee8xdsOhRyrEC+zcjJB2JiAQblOxw2SA= ARC-Authentication-Results: i=1; mx.zohomail.com; spf=pass (zohomail.com: domain of lists.xenproject.org designates 192.237.175.120 as permitted sender) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1594626383973904.3094794779804; Mon, 13 Jul 2020 00:46:23 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jut9j-00087i-Hb; Mon, 13 Jul 2020 07:45:43 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.92) (envelope-from ) id 1jut9i-000877-4R for xen-devel@lists.xenproject.org; Mon, 13 Jul 2020 07:45:42 +0000 Received: from mx2.suse.de (unknown [195.135.220.15]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id d6233408-c4dc-11ea-8496-bc764e2007e4; Mon, 13 Jul 2020 07:45:35 +0000 (UTC) Received: from relay2.suse.de (unknown [195.135.221.27]) by mx2.suse.de (Postfix) with ESMTP id C9652AC82; Mon, 13 Jul 2020 07:45:36 +0000 (UTC) X-Inumbo-ID: d6233408-c4dc-11ea-8496-bc764e2007e4 X-Virus-Scanned: by amavisd-new at test-mx.suse.de From: Juergen Gross To: minios-devel@lists.xenproject.org, xen-devel@lists.xenproject.org Subject: [PATCH] mini-os: don't hard-wire xen internal paths Date: Mon, 13 Jul 2020 09:45:31 +0200 Message-Id: <20200713074531.27547-1-jgross@suse.com> X-Mailer: git-send-email 2.26.2 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Juergen Gross , samuel.thibault@ens-lyon.org, wl@xen.org Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" Content-Type: text/plain; charset="utf-8" Mini-OS shouldn't use Xen internal paths for building. Import the needed paths from Xen and fall back to the current values only if the import was not possible. Signed-off-by: Juergen Gross --- Config.mk | 15 ++++++++++++++- Makefile | 35 ++++++++++++++++++----------------- 2 files changed, 32 insertions(+), 18 deletions(-) diff --git a/Config.mk b/Config.mk index f6a2afa..cb823c2 100644 --- a/Config.mk +++ b/Config.mk @@ -33,6 +33,19 @@ endif # ifneq ($(XEN_ROOT),) MINIOS_ROOT=3D$(XEN_ROOT)/extras/mini-os + +-include $(XEN_ROOT)/stubdom/mini-os.mk + +XENSTORE_CPPFLAGS ?=3D -isystem $(XEN_ROOT)/tools/xenstore/include +TOOLCORE_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore +TOOLLOG_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog +EVTCHN_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn +GNTTAB_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab +CALL_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call +FOREIGNMEMORY_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/for= eignmemory +DEVICEMODEL_PATH ?=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devic= emodel +CTRL_PATH ?=3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) +GUEST_PATH ?=3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) else MINIOS_ROOT=3D$(TOPLEVEL_DIR) endif @@ -93,7 +106,7 @@ DEF_CPPFLAGS +=3D -D__MINIOS__ ifeq ($(libc),y) DEF_CPPFLAGS +=3D -DHAVE_LIBC DEF_CPPFLAGS +=3D -isystem $(MINIOS_ROOT)/include/posix -DEF_CPPFLAGS +=3D -isystem $(XEN_ROOT)/tools/xenstore/include +DEF_CPPFLAGS +=3D $(XENSTORE_CPPFLAGS) endif =20 ifneq ($(LWIPDIR),) diff --git a/Makefile b/Makefile index be640cd..82422a5 100644 --- a/Makefile +++ b/Makefile @@ -125,23 +125,24 @@ OBJS :=3D $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(O= BJS)) =20 ifeq ($(libc),y) ifeq ($(CONFIG_XC),y) -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore = -whole-archive -lxentoolcore -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toolcore/libxento= olcore.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog -= whole-archive -lxentoollog -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/toollog/libxentoo= llog.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn -w= hole-archive -lxenevtchn -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/evtchn/libxenevtc= hn.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab -w= hole-archive -lxengnttab -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/gnttab/libxengntt= ab.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call -who= le-archive -lxencall -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/call/libxencall.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignme= mory -whole-archive -lxenforeignmemory -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/foreignmemory/lib= xenforeignmemory.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemod= el -whole-archive -lxendevicemodel -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libs-$(MINIOS_TARGET_ARCH)/devicemodel/libxe= ndevicemodel.a -APP_LDLIBS +=3D -L$(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH) -whole-a= rchive -lxenguest -lxenctrl -no-whole-archive -LIBS +=3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenctrl.a -LIBS +=3D $(XEN_ROOT)/stubdom/libxc-$(MINIOS_TARGET_ARCH)/libxenguest.a +APP_LDLIBS +=3D -L$(TOOLCORE_PATH) -whole-archive -lxentoolcore -no-whole-= archive +LIBS +=3D $(TOOLCORE_PATH)/libxentoolcore.a +APP_LDLIBS +=3D -L$(TOOLLOG_PATH) -whole-archive -lxentoollog -no-whole-ar= chive +LIBS +=3D $(TOOLLOG_PATH)/libxentoollog.a +APP_LDLIBS +=3D -L$(EVTCHN_PATH) -whole-archive -lxenevtchn -no-whole-arch= ive +LIBS +=3D $(EVTCHN_PATH)/libxenevtchn.a +APP_LDLIBS +=3D -L$(GNTTAB_PATH) -whole-archive -lxengnttab -no-whole-arch= ive +LIBS +=3D $(GNTTAB_PATH)/libxengnttab.a +APP_LDLIBS +=3D -L$(CALL_PATH) -whole-archive -lxencall -no-whole-archive +LIBS +=3D $(XCALL_PATH)/libxencall.a +APP_LDLIBS +=3D -L$(FOREIGNMEMORY_PATH) -whole-archive -lxenforeignmemory = -no-whole-archive +LIBS +=3D $(FOREIGNMEMORY_PATH)/libxenforeignmemory.a +APP_LDLIBS +=3D -L$(DEVICEMODEL_PATH) -whole-archive -lxendevicemodel -no-= whole-archive +LIBS +=3D $(DEVICEMODEL_PATH)/libxendevicemodel.a +APP_LDLIBS +=3D -L$(GUEST_PATH) -whole-archive -lxenguest -no-whole-archive +LIBS +=3D $(GUEST_PATH)/libxenguest.a +APP_LDLIBS +=3D -L$(CTRL_PATH) -whole-archive -lxenctrl -no-whole-archive +LIBS +=3D $(CTRL_PATH)/libxenctrl.a endif APP_LDLIBS +=3D -lpci APP_LDLIBS +=3D -lz --=20 2.26.2