On Sun, Jul 22, 2007 at 11:01:55PM -0700, Roland McGrath wrote:
Reading Documentation/kbuild/makefiles.txt:
LDFLAGS_MODULE Options for $(LD) when linking modules
LDFLAGS_MODULE is used to set specific flags for $(LD) when
linking the .ko files used for modules.
So it seems to be documented as such.
Browsing the source it looks like a bug that LDFLAGS_MODULE is used in
cmd_link_multi-m.
I suggest you to do the following:
Remove '-r' from LDFLAGS_MODULE in top-level Makefile
Hardcode '-r' in cmd_link_multi-m and remove LDFLAGS_MODULE in the same.
Hardcode '-r' in Makefile,modpost
Add your stuff to LDFLAGS_MODULE in toplevel Makefile.
Sorry for not prrviding a preliminary patch but away from my dev box
with no easy source access.
Sam
-