|
From: | Hollis Blanchard |
Subject: | Re: [ppc patch] link with -m32 |
Date: | Sat, 15 Apr 2006 08:37:13 -0500 |
On Apr 15, 2006, at 5:36 AM, Marco Gerards wrote:
I think LDFLAGS are really processed by cc, no? So we do not use ld, but cc if I am not mistaken.
No; compare the man pages for ld and gcc.For example, -m32 is a gcc flag, and -melf32ppc is an ld flag. GCC complains if you pass it -melf32ppc, and ld complains if you pass it -m32. Look at all the -Wl options we use in grubof_LDFLAGS: -Wl means "pass these options to the linker".
We can use either gcc or ld to link, but we need to pick one. If we use ld, we will also need to use 'gcc -m32 -print-file-name=libc.a', since ld cannot find libgcc on its own.
-Hollis
[Prev in Thread] | Current Thread | [Next in Thread] |