All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] m32r: add __ucmpdi2 to fix build failure
Date: Fri, 10 Jun 2016 08:08:44 +0100	[thread overview]
Message-ID: <575A677C.1010507@gmail.com> (raw)
In-Reply-To: <20160609151603.79da214c8133130e92ff689a@linux-foundation.org>

On Thursday 09 June 2016 11:16 PM, Andrew Morton wrote:
> On Thu,  9 Jun 2016 22:53:33 +0100 Sudip Mukherjee <sudipm.mukherjee@gmail.com> wrote:
>
>> We are having build failure with m32r and the error message being:
>> ERROR: "__ucmpdi2" [lib/842/842_decompress.ko] undefined!
>> ERROR: "__ucmpdi2" [fs/btrfs/btrfs.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/scsi/sd_mod.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/media/i2c/adv7842.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/md/bcache/bcache.ko] undefined!
>> ERROR: "__ucmpdi2" [drivers/iio/imu/inv_mpu6050/inv-mpu6050.ko] undefined!
>>
>> __ucmpdi2 is introduced to m32r architecture taking example from other
>> architectures like h8300, microblaze, mips.
>>
>> --- a/arch/m32r/kernel/m32r_ksyms.c
>> +++ b/arch/m32r/kernel/m32r_ksyms.c
>> @@ -41,6 +41,9 @@ EXPORT_SYMBOL(cpu_data);
>>   EXPORT_SYMBOL(smp_flush_tlb_page);
>>   #endif
>>
>> +extern int __ucmpdi2(unsigned long long a, unsigned long long b);
>> +EXPORT_SYMBOL(__ucmpdi2);
>> +
>
> This would be neater.  Does it work?
>
>
> From: Andrew Morton <akpm@linux-foundation.org>
> Subject: m32r-add-__ucmpdi2-to-fix-build-failure-fix
>
> avoid extern declaration in .c file
>
> Cc: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk>
> Cc: Sudip Mukherjee <sudipm.mukherjee@gmail.com>
> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
>
> --- a/arch/m32r/kernel/m32r_ksyms.c~m32r-add-__ucmpdi2-to-fix-build-failure-fix
> +++ a/arch/m32r/kernel/m32r_ksyms.c
> @@ -41,7 +41,6 @@ EXPORT_SYMBOL(cpu_data);
>   EXPORT_SYMBOL(smp_flush_tlb_page);
>   #endif
>
> -extern int __ucmpdi2(unsigned long long a, unsigned long long b);
>   EXPORT_SYMBOL(__ucmpdi2);
>
>   /* compiler generated symbol */
> --- a/arch/m32r/lib/libgcc.h~m32r-add-__ucmpdi2-to-fix-build-failure-fix
> +++ a/arch/m32r/lib/libgcc.h
> @@ -22,3 +22,4 @@ typedef union {
>
>   #endif /* __ASM_LIBGCC_H */
>
> +extern int __ucmpdi2(unsigned long long a, unsigned long long b);
>


Nope.
In file included from ../include/linux/linkage.h:6:0,
                  from ../include/linux/kernel.h:6,
                  from ../include/linux/list.h:8,
                  from ../include/linux/module.h:9,
                  from ../arch/m32r/kernel/m32r_ksyms.c:1:
../arch/m32r/kernel/m32r_ksyms.c:44:15: error: '__ucmpdi2' undeclared 
here (not in a function)
  EXPORT_SYMBOL(__ucmpdi2);
                ^
../include/linux/export.h:57:16: note: in definition of macro 
'___EXPORT_SYMBOL'
   extern typeof(sym) sym;     \
                 ^
../arch/m32r/kernel/m32r_ksyms.c:44:1: note: in expansion of macro 
'EXPORT_SYMBOL'
  EXPORT_SYMBOL(__ucmpdi2);
  ^
make[2]: *** [arch/m32r/kernel/m32r_ksyms.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [arch/m32r/kernel] Error 2
make[1]: *** Waiting for unfinished jobs....

m32r_ksyms.c is not having any reference to the name. If you want to 
remove the extern from the C file then I think we should declare it in 
some header file and include that in the m32r_ksyms.c. And if that works 
then that can be applied to all the other arch also, as almost all of 
them have these externs in *_ksyms.c.

Regards
Sudip

      reply	other threads:[~2016-06-10  7:08 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-09 21:53 [PATCH] m32r: add __ucmpdi2 to fix build failure Sudip Mukherjee
2016-06-09 22:16 ` Andrew Morton
2016-06-10  7:08   ` Sudip Mukherjee [this message]

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=575A677C.1010507@gmail.com \
    --to=sudipm.mukherjee@gmail.com \
    --cc=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.