While debugging some cruft I was doing inside the Linux LCDC framebuffer driver I came across something odd:
drivers/built-in.o: In function `cfb_copyarea': : undefined reference to `__avr32_udiv64' make: *** [vmlinux] Error 1
This was triggered if
- pr_debug(" pixclk: %llu Hz\n", 1000000000000ULL / var->pixclock); + printk(KERN_DEBUG " pixclk: %llu Hz\n", 1000000000000ULL / var->pixclock);
EDIT: ^^^ Code tag mangle, all that's happening is that the pr_debug is expanded to a printk, such as happens when you #define DEBUG before #include
This is in sidsafb.c around line 260. Trying to see where the offending symbol came from:
linux-2.6.18-at0 $ grep -r '__avr32_udiv64' . Binary file ./drivers/built-in.o matches Binary file ./drivers/video/built-in.o matches Binary file ./drivers/video/sidsafb.o matches
So it seems to me the offending symbol is generated by the compiler, not by anything in the kernel source. Hence the post here rather than in the Linux forum.
That being said, I have not had any success recreating this outside the kernel code, though it can be recreated by doing a similar sum inside the kernel code but outside a printk.
I'm assuming Haavard would have #define DEBUG'd inside sidsafb.c at some stage while dev'ing this driver, turning on all the pr_debugs and, in my case, triggering buggage. I'm thinking then that this is a regression of some sort, I'm running avr32-linux-gcc from the atmel .deb repository:
$ avr32-linux-gcc --version avr32-linux-gcc (GCC) 4.0.2-atmel.1.0.0
Still hanging out for .debs of GCC 4.1.whatever :)