From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jerone Young Subject: [PATCH] Simple makefile changes for x86-64 compiltion of tools Date: Mon, 07 Feb 2005 13:03:58 -0600 Message-ID: <1107803039.5793.26.camel@thinkpad> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-sOxLRt2q7UU2FkVLPpE9" Sender: xen-devel-admin@lists.sourceforge.net Errors-To: xen-devel-admin@lists.sourceforge.net List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , List-Archive: To: xen-devel List-Id: xen-devel@lists.xenproject.org --=-sOxLRt2q7UU2FkVLPpE9 Content-Type: text/plain Content-Transfer-Encoding: 7bit Hi all, Here are a few simple changes to the makefiles in the tools dir to help on compilation on x86-64. This mainly is so that libxutil will compile. Will also have patches for libxc & python tools soon (figured I would just send these, and not sit on them any longer). -- Jerone Young Open Virtualization IBM Linux Technology Center jyoung5@us.ibm.com 512-838-1157 (T/L: 678-1157) --=-sOxLRt2q7UU2FkVLPpE9 Content-Disposition: attachment; filename=tools_rules_mk.diff Content-Type: text/x-patch; name=tools_rules_mk.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit --- xen-unstable.orig/tools/Rules.mk 2005-02-07 10:12:56.184342544 -0600 +++ xen-unstable/tools/Rules.mk 2005-02-07 10:16:30.674735048 -0600 @@ -4,12 +4,14 @@ XEN_XC = $(XEN_ROOT)/tools/p XEN_LIBXC = $(XEN_ROOT)/tools/libxc XEN_LIBXUTIL = $(XEN_ROOT)/tools/libxutil -ifeq ($(TARGET_ARCH),x86_32) +XEN_TARGET_ARCH ?= $(shell uname -m | sed -e s/i.86/x86_32/) + +ifeq ($(XEN_TARGET_ARCH),x86_32) CFLAGS += -m32 -march=i686 LDFLAGS += -m elf_i386 endif -ifeq ($(TARGET_ARCH),x86_64) -CFLAGS += -m64 +ifeq ($(XEN_TARGET_ARCH),x86_64) +CFLAGS += -m64 -fpic LDFLAGS += -m elf_x86_64 endif --=-sOxLRt2q7UU2FkVLPpE9 Content-Disposition: attachment; filename=tools_xutil_makefile.diff Content-Type: text/x-patch; name=tools_xutil_makefile.diff; charset=UTF-8 Content-Transfer-Encoding: 7bit --- xen-unstable.orig/tools/libxutil/Makefile 2005-02-07 10:12:56.171344520 -0600 +++ xen-unstable/tools/libxutil/Makefile 2005-02-07 10:14:11.565882808 -0600 @@ -65,7 +65,7 @@ libxutil.so.$(MAJOR).$(MINOR): $(PIC_OBJ $(CC) -Wl,-soname -Wl,libxutil.so.$(MAJOR) -shared -o $@ $^ else libxutil.so.$(MAJOR).$(MINOR): $(LIB_OBJS) - $(CC) -Wl,-soname -Wl,libxutil.so.$(MAJOR) -shared -o $@ $^ + $(CC) $(CFLAGS) -Wl,-soname -Wl,libxutil.so.$(MAJOR) -shared -o $@ $^ endif libxutil.a: $(LIB_OBJS) --=-sOxLRt2q7UU2FkVLPpE9-- ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click