From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andres Lagar-Cavilla Subject: [PATCH 1 of 2] Add linker flags to makefile rules to enable cross compiling Date: Mon, 14 Nov 2011 16:53:52 -0500 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Sender: xen-devel-bounces@lists.xensource.com Errors-To: xen-devel-bounces@lists.xensource.com To: xen-devel@lists.xensource.com Cc: andres@gridcentric.ca, adin@gridcentric.ca List-Id: xen-devel@lists.xenproject.org config/x86_32.mk | 1 + config/x86_64.mk | 1 + 2 files changed, 2 insertions(+), 0 deletions(-) For cross-compiling, the link step must also include necessary architecture flags (otherwise there's a mismatch between input objects and the output we're trying to produce). Signed-off-by: Adin Scannell diff -r 1f9e4cde0093 -r bf47f7aaf669 config/x86_32.mk --- a/config/x86_32.mk +++ b/config/x86_32.mk @@ -8,6 +8,7 @@ CONFIG_XCUTILS := y CONFIG_IOEMU := y CFLAGS += -m32 -march=i686 +LDFLAGS += -m32 -march=i686 # Use only if calling $(LD) directly. LDFLAGS_DIRECT_OpenBSD = _obsd diff -r 1f9e4cde0093 -r bf47f7aaf669 config/x86_64.mk --- a/config/x86_64.mk +++ b/config/x86_64.mk @@ -9,6 +9,7 @@ CONFIG_XCUTILS := y CONFIG_IOEMU := y CFLAGS += -m64 +LDFLAGS += -m64 LIBLEAFDIR = $(LIBLEAFDIR_x86_64) LIBDIR = $(LIBDIR_x86_64)