Linux MIPS Architecture development
 help / color / mirror / Atom feed
* [OT?] is there something strange about __builtin_ffs these days?
@ 2007-12-17 21:08 Robert P. J. Day
  2007-12-17 21:45 ` Thiemo Seufer
  0 siblings, 1 reply; 2+ messages in thread
From: Robert P. J. Day @ 2007-12-17 21:08 UTC (permalink / raw)
  To: linux-mips


  i'm hoping i'm not abusing this list overly by asking for some help
with debugging an OpenWRT issue.  the trac ticket is here:

https://dev.openwrt.org/ticket/2735

and involves cross-compiling an image for the MIPS-based linksys
WRT54GL router.  i've verified that this error still exists in the
latest svn update of openwrt and, in a nutshell, it involves the claim
that "__builtin_ffs" is undefined:

...
 CC [M]  /home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.o
/home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.c:538:5:
  warning: "__builtin_ffs" is not defined
/home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.c:538:5:
  error: missing binary operator before token "("
...

  that line in the source file is simply:

   #if PUD_SHIFT

i have no idea what the problem is here and, as you can see from the
trac ticket, this seems to have started because of the kernel version
upgrade from 2.6.22 to 2.6.23.  but what about that would affect the
usage of __builtin_ffs?

  does anyone have an idea why something this basic might be going
wrong now?  any suggestions appreciated.  thanks.

rday
--
========================================================================
Robert P. J. Day
Linux Consulting, Training and Annoying Kernel Pedantry
Waterloo, Ontario, CANADA

http://crashcourse.ca
========================================================================

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [OT?] is there something strange about __builtin_ffs these days?
  2007-12-17 21:08 [OT?] is there something strange about __builtin_ffs these days? Robert P. J. Day
@ 2007-12-17 21:45 ` Thiemo Seufer
  0 siblings, 0 replies; 2+ messages in thread
From: Thiemo Seufer @ 2007-12-17 21:45 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: linux-mips

Robert P. J. Day wrote:
> 
>   i'm hoping i'm not abusing this list overly by asking for some help
> with debugging an OpenWRT issue.  the trac ticket is here:
> 
> https://dev.openwrt.org/ticket/2735
> 
> and involves cross-compiling an image for the MIPS-based linksys
> WRT54GL router.  i've verified that this error still exists in the
> latest svn update of openwrt and, in a nutshell, it involves the claim
> that "__builtin_ffs" is undefined:
> 
> ...
>  CC [M]  /home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.o
> /home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.c:538:5:
>   warning: "__builtin_ffs" is not defined
> /home/openwrt/builds/trunk_brcm47xx/build_dir/linux-brcm47xx/spca5xx-le/spca_core.c:538:5:
>   error: missing binary operator before token "("
> ...
> 
>   that line in the source file is simply:
> 
>    #if PUD_SHIFT
> 
> i have no idea what the problem is here and, as you can see from the
> trac ticket, this seems to have started because of the kernel version
> upgrade from 2.6.22 to 2.6.23.  but what about that would affect the
> usage of __builtin_ffs?
> 
>   does anyone have an idea why something this basic might be going
> wrong now?  any suggestions appreciated.  thanks.

The compiler should never attempt to use __builtin_ffs by itself, because
the kernel makefile adds -ffreestanding to CFLAGS. So either your compiler
is broken, or the makefile of your kernel tree is incorrect, or somewhere
in your kernel tree there's a explicit call to __builtin_ffs (which is
also incorrect, as the compiler may invoke library functions to implement
it.)


Thiemo

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2007-12-17 21:45 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-12-17 21:08 [OT?] is there something strange about __builtin_ffs these days? Robert P. J. Day
2007-12-17 21:45 ` Thiemo Seufer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox