From: Sam Ravnborg on
On Tue, Jun 22, 2010 at 11:07:51PM +0400, Vladislav Bolkhovitin wrote:
>
> David Miller, on 06/17/2010 12:35 AM wrote:
>> From: Vladislav Bolkhovitin <vst(a)vlnb.net>
>>
>> You're building the module with incorrect compiler flags, in
>> particular somehow the "-mcmodel=medlow" option is not getting passed
>> into the module build and thus the wrong code model is being used to
>> build the module.
>>
> Thank you. This gives us the direction away from the current dead end.
> We will make the needed changes in our Makefiles.
>
> But we surprised that such platform specific compiler flags have to be
> manually maintained by out of the kernel tree modules developers. We
> thought kbuild environment doing it automatically. Particularly,
> Documentation/kbuild/modules.txt doesn't say anything about manual
> platform specific flags.

They should all be there automagically.
A few things to try out...
What machine is this being build on?

Your Makefile contains this:
> ifeq ($(KVER),)
> ifeq ($(KDIR),)
> KVER = $(shell uname -r)
> KDIR := /lib/modules/$(KVER)/build
> endif
> else
> KDIR := /lib/modules/$(KVER)/build
> endif
>

But does /lib/modules/... contain a sparc kernel?

You could try to build your module using: V=1

And reply with the output. This should give a clue about what flags are picked
up from where.

Most of your Makefile looks fine - I guess we need to find the bug
in the build environmnet and not in the Makefile.

Sam
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
From: David Miller on
From: Sam Ravnborg <sam(a)ravnborg.org>
Date: Tue, 22 Jun 2010 21:35:30 +0200

> Most of your Makefile looks fine - I guess we need to find the bug
> in the build environmnet and not in the Makefile.

Sam, note that these guys are working with 2.6.26 or some
ancient kernel like that :-/
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo(a)vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/