public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Sam Ravnborg <sam@ravnborg.org>
To: Vladislav Bolkhovitin <vst@vlnb.net>
Cc: David Miller <davem@davemloft.net>,
	sparclinux@vger.kernel.org, simone.ricci@gmail.com,
	scst-devel@lists.sourceforge.net, linux-kernel@vger.kernel.org,
	Nick.Couchman@seakr.com, Michal Marek <mmarek@suse.cz>,
	linux-kbuild@vger.kernel.org
Subject: Re: Error "Unknown relocation: 36" on module load on Sparc
Date: Tue, 22 Jun 2010 21:35:30 +0200	[thread overview]
Message-ID: <20100622193530.GA26041@merkur.ravnborg.org> (raw)
In-Reply-To: <4C210A07.80906@vlnb.net>

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@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

  reply	other threads:[~2010-06-22 19:35 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <AANLkTimuv7nOlcGFxqPZlwcAjLmFMiLAvbA5O7F32Wbg@mail.gmail.com>
2010-06-16 19:05 ` Error "Unknown relocation: 36" on module load on Sparc Vladislav Bolkhovitin
2010-06-16 19:22   ` Kyle McMartin
2010-06-16 20:38     ` David Miller
2010-06-16 20:40       ` Kyle McMartin
2010-06-16 20:35   ` David Miller
2010-06-22 19:07     ` Vladislav Bolkhovitin
2010-06-22 19:35       ` Sam Ravnborg [this message]
2010-06-22 21:17         ` David Miller
2010-06-22 21:16       ` David Miller
2010-06-16 19:08 ` How to printk/sprintf uint64_t on Sparc without format and argument types mismatch Vladislav Bolkhovitin
2010-06-16 19:29   ` Kyle McMartin
2010-06-16 20:36   ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20100622193530.GA26041@merkur.ravnborg.org \
    --to=sam@ravnborg.org \
    --cc=Nick.Couchman@seakr.com \
    --cc=davem@davemloft.net \
    --cc=linux-kbuild@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mmarek@suse.cz \
    --cc=scst-devel@lists.sourceforge.net \
    --cc=simone.ricci@gmail.com \
    --cc=sparclinux@vger.kernel.org \
    --cc=vst@vlnb.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox