Simple makefile changes for x86-64 compiltion of tools
PATCH 1/1 Simple makefile changes for x86-64 compiltion of tools
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).
Signature · 5 lines
Jerone Young Open Virtualization IBM Linux Technology Center [email protected] 512-838-1157 (T/L: 678-1157)
tools/Rules.mk +5 -3
@@ -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
tools/libxutil/Makefile +1 -1
@@ -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)