|
|
|
|
|
|
|
|
|
|
xen-devel
Re: [Xen-devel] [PATCH 1 of 2] Add linker flags to makefile rules to ena
On Mon, 2011-11-14 at 21:53 +0000, Andres Lagar-Cavilla wrote:
> 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@xxxxxxxxxxx>
>
> 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
I think when Adin posted this we determined that it only worked by
coincidence, since when we invoke ld directly it is as
ld $(LDFLAGS) -melf_x86_64
so while -m32 -march= are unknown to ld the -nelf_xx (which is a valid
ld option) takes precedence and things work ok.
The consensus then was that we need to split LDFLAGS-for-gcc-as-linker
from LDFLAGS-for-ld-directly into two variables. See Jan's response in
<4E844703020000780005868E@xxxxxxxxxxxxxxxxxxxx>.
Ian.
>
> # 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)
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@xxxxxxxxxxxxxxxxxxx
> http://lists.xensource.com/xen-devel
_______________________________________________
Xen-devel mailing list
Xen-devel@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-devel
|
|
|
|
|