xen-devel.lists.xenproject.org archive mirror
 help / color / mirror / Atom feed
From: Andres Lagar-Cavilla <andres@lagarcavilla.org>
To: xen-devel@lists.xensource.com
Cc: andres@gridcentric.ca, adin@gridcentric.ca
Subject: [PATCH 1 of 2] Add linker flags to makefile rules to enable cross compiling
Date: Mon, 14 Nov 2011 16:53:52 -0500	[thread overview]
Message-ID: <bf47f7aaf6694e6318dc.1321307632@xdev.gridcentric.ca> (raw)
In-Reply-To: <patchbomb.1321307631@xdev.gridcentric.ca>

 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 <adin@scannell.ca>

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)

  reply	other threads:[~2011-11-14 21:53 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-11-14 21:53 [PATCH 0 of 2] Fixes for cross-compiling 32 bit tools on 64 bit host Andres Lagar-Cavilla
2011-11-14 21:53 ` Andres Lagar-Cavilla [this message]
2011-11-15  8:55   ` [PATCH 1 of 2] Add linker flags to makefile rules to enable cross compiling Ian Campbell
2011-11-14 21:53 ` [PATCH 2 of 2] Fixes for cross-compiling 32-bit tools on 64-bit host Andres Lagar-Cavilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bf47f7aaf6694e6318dc.1321307632@xdev.gridcentric.ca \
    --to=andres@lagarcavilla.org \
    --cc=adin@gridcentric.ca \
    --cc=andres@gridcentric.ca \
    --cc=xen-devel@lists.xensource.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).