Hi!
A current tcc (from git) can compile a linux kernel 2.4.26. All
patches are commited.
But there are a warnings (because a -Wimplicit-function-declaration is on now)
=====
fantoo tcc-kernel-2.4.26 # ./tcc-compile-kernel.sh
linux/kernel/sched.c:437: warning: implicit declaration of function
'__builtin_return_address'
linux/kernel/timer.c:193: warning: implicit declaration of function
'__builtin_return_address'
linux/arch/i386/kernel/irq.c:554: warning: implicit declaration of
function '__builtin_return_address'
Root device is (0, 19)
Boot sector 512 bytes.
Setup is 2521 bytes.
System is 2259 kB
warning: kernel is too big for standalone boot from floppy
ready: put vmlinuz with initrd.img from a tccboot.iso into a bootloader menu.
Example for a grub 0.97:
title A linux kernel v2.4.26 compiled by a tcc
kernel /boot/tccboot/vmlinuz root=/dev/ram ramdisk_size=20000
initrd /boot/tccboot/initrd.img
boot
=====
A kernel boots fine. But a question is: how to implement a
__builtin_return_address() ?
Any tips?
A test program:
=======
#include <stdio.h>
void add_timer()
{
printf("bug: kernel timer added twice at %p.\n",
__builtin_return_address(0));
}
int main()
{
add_timer();
return 0;
}
=======
_______________________________________________
Tinycc-devel mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/tinycc-devel