[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Xen-devel] [PATCH v2] stubdom: fix make clean and distclean on a freshly cloned tree



> -----Original Message-----
> From: xen-devel-bounces@xxxxxxxxxxxxx
> [mailto:xen-devel-bounces@xxxxxxxxxxxxx] On Behalf Of Ian Campbell
> Sent: Tuesday, March 03, 2015 1:00 AM
> To: Wei Liu
> Cc: Samuel Thibault; Stefano Stabellini; Ian Jackson; xen-devel@xxxxxxxxxxxxx
> Subject: Re: [Xen-devel] [PATCH v2] stubdom: fix make clean and distclean on a
> freshly cloned tree
> 
> On Mon, 2015-03-02 at 15:05 +0000, Wei Liu wrote:
> > Clean and distclean targets need not depend on existence of the
> > mini-os tree. Don't check for mini-os and don't try to blindly include
> > mini-os's Config.mk when doing clean and distclean.
> >
> > Note that one subtle issue is that $(XEN_ROOT)/Config.mk tries to
> > include $(XEN_ROOT)/config/$(XEN_OS).mk. In stubdom's case XEN_OS is
> > "MiniOS". Then $(XEN_ROOT)/config/MiniOS.mk tries to include mini-os's
> > Config.mk.
> >
> > Since clean and distclean don't enforce existence of mini-os tree,
> > don't include $(XEN_ROOT)/Config.mk to avoid getting error due to the
> > aforementioned issue.
> >
> > Reported-by: Sander Eikelenboom <linux@xxxxxxxxxxxxxx>
> > Signed-off-by: Wei Liu <wei.liu2@xxxxxxxxxx>
> > Cc: Ian Campbell <ian.campbell@xxxxxxxxxx>
> > Cc: Ian Jackson <ian.jackson@xxxxxxxxxxxxx>
> > Cc: Stefano Stabellini <stefano.stabellini@xxxxxxxxxxxxx>
> > Cc: Samuel Thibault <samuel.thibault@xxxxxxxxxxxx>
> 
> Acked + applied, thanks.
> 
When building pv-grub, error occurred with " ld: warning: app.lds contains 
output sections; did you forget -T?
ld: cannot find -lxenguest "

Building pv-grub steps(after building xen and tools):
"cd xen
make mini-os-dir
cd studom
./configure
make pv-grub"

There were some errors in mini-os.git/Makefile introduced by commit 55f7cd74.
1. The commit had deleted the XEN_ROOT variable in Makefile, bug it still used 
it;
2. And XEN_TARGET_ARCH was blank for the above steps; it will report " ld: 
cannot find -lxenguest ";
3. it lacks a "-T" option, it would report the warning " ld: warning: app.lds 
contains output sections; did you forget -T?".

Following patch may work around this issue.

diff --git a/Makefile b/Makefile
index f16520e..dfb58c8 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@

 OBJ_DIR=$(CURDIR)
 TOPLEVEL_DIR=$(CURDIR)
+XEN_TARGET_ARCH=x86_64

 ifeq ($(MINIOS_CONFIG),)
 include Config.mk
@@ -165,7 +166,7 @@ OBJS := $(filter-out $(OBJ_DIR)/lwip%.o $(LWO), $(OBJS))

 ifeq ($(libc),y)
 ifeq ($(CONFIG_XC),y)
-APP_LDLIBS += -L$(XEN_ROOT)/stubdom/libxc-$(XEN_TARGET_ARCH) -whole-archive 
-lxenguest -lxenctrl -no-whole-archive
+APP_LDLIBS += -L../../stubdom/libxc-$(XEN_TARGET_ARCH) -whole-archive 
-lxenguest -lxenctrl -no-whole-archive
 endif
 APP_LDLIBS += -lpci
 APP_LDLIBS += -lz
@@ -178,7 +179,7 @@ OBJS := $(filter-out $(OBJ_DIR)/daytime.o, $(OBJS))
 endif

 $(OBJ_DIR)/$(TARGET)_app.o: $(APP_OBJS) app.lds
-       $(LD) -r -d $(LDFLAGS) -\( $^ -\) $(APP_LDLIBS) --undefined main -o $@
+       $(LD) -r -d $(LDFLAGS) -\( $< -T app.lds -\) $(APP_LDLIBS) --undefined 
main -o $@

 ifneq ($(APP_OBJS),)
 APP_O=$(OBJ_DIR)/$(TARGET)_app.o __________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxx
http://lists.xen.org/xen-devel


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.