aboutsummaryrefslogtreecommitdiffstats
path: root/xen/Rules.mk
diff options
context:
space:
mode:
authorkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-18 16:56:27 +0100
committerkfraser@localhost.localdomain <kfraser@localhost.localdomain>2006-10-18 16:56:27 +0100
commitea847a59dc7db35e48d15faf01ca81ba982675c8 (patch)
tree55ea2a33af872666068c03e1d25ec359f545b149 /xen/Rules.mk
parent8917832a55d01ea649c7d6a0265ccb3177098280 (diff)
downloadxen-ea847a59dc7db35e48d15faf01ca81ba982675c8.tar.gz
xen-ea847a59dc7db35e48d15faf01ca81ba982675c8.tar.bz2
xen-ea847a59dc7db35e48d15faf01ca81ba982675c8.zip
Clean up linker flag definitions.
1. GNU ld does not understand -m{32,64}. It must be cooked for it by the GCC driver program. 2. Where GNU ld is directly called we must use -melf_{i386,x86_64}. 3. We cannot avoid calling GNU ld directly in some cases (e.g., when specifying GNU-specific linker scripts) as on some host architectures the GCC driver is configured to call the host linker. 4. We cannot add -melf_{i386,x86_64} to LDFLAGS as the option is not recognised by GCC. Hence we define new LDFLAGS_DIRECT, to be added to the command line only when invoking GNU ld directly. Signed-off-by: Keir Fraser <keir@xensource.com>
Diffstat (limited to 'xen/Rules.mk')
-rw-r--r--xen/Rules.mk3
1 files changed, 3 insertions, 0 deletions
diff --git a/xen/Rules.mk b/xen/Rules.mk
index 1522ba786b..d333e563ce 100644
--- a/xen/Rules.mk
+++ b/xen/Rules.mk
@@ -71,6 +71,9 @@ CFLAGS := $(strip $(CFLAGS) $(CFLAGS-y))
AFLAGS := $(strip $(AFLAGS) $(AFLAGS-y))
AFLAGS += $(patsubst -std=gnu%,,$(CFLAGS))
+# LDFLAGS are only passed directly to $(LD)
+LDFLAGS += $(LDFLAGS_DIRECT)
+
include Makefile
# Ensure each subdirectory has exactly one trailing slash.