Re: m68k: main.c:(.init.text+0x730): undefined reference to `strlen'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, May 14, 2008 at 10:37:57AM +0200, Andreas Schwab wrote:
Geert Uytterhoeven <geert@xxxxxxxxxxxxxx> writes:

My first guess is gcc is turning sizeof() into strlen() again.

Definitely not.  sizeof is a compile-time constant, strlen is not.  More
likely the strlen call is embedded in the expansion of strncat.

m68k is one of the architectures not using -ffreestanding, so this 
kind of problems is somehow expected...

We could add -ffreestanding on m68k.

Or replace all the strlen stuff in include/asm-m68k/string.h with a 
function prototype, which lets gcc choose itself whether it wants to use 
the builtin or the version from lib/string.c, and makes an out-of-line 
version of the function available for caes like the one we face here.

Andreas.

cu
Adrian

-- 

       "Is there not promise of rain?" Ling Tan asked suddenly out
        of the darkness. There had been need of rain for many days.
       "Only a promise," Lao Er said.
                                       Pearl S. Buck - Dragon Seed

--
To unsubscribe from this list: send the line "unsubscribe linux-m68k" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Video for Linux]     [Yosemite News]     [Linux S/390]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux