Hello,
I tried to compile OpenWrt trunk (AR7 port for Sinus 154) with a newer compiler (gcc-4.0.2).
Only two trivial patches were needed for Linux kernel 2.4.32 (AR7 specific code),
the rest compiled without change (at least the basic package subset which I use).
The resulting kernel worked as before.
My motivation was to see whether the new code was smaller. This was the case
for normal applications (checked with busybox, uclib, wlan driver) but not for
the largest code, the kernel itself, which increased dramatically. I had to change
the load address from 0x94200000 to 0x94300000 because the uncompressed
kernel grew larger than 0x200000.
Here are the code sizes:
Comparision of gcc-3.* and gcc-4.02
text data bss dec hex filename
366103 4480 19352 389935 5f32f openwrt-3.4.4/toolchain_build_mipsel/uClibc-0.9.28/lib/libuClibc-0.9.28.so
361047 4484 19352 384883 5df73 openwrt-4.0.2/toolchain_build_mipsel/uClibc-0.9.28/lib/libuClibc-0.9.28.so
text data bss dec hex filename
552146 10412 821840 1384398 151fce openwrt-3.4.4/build_mipsel/busybox-1.1.0-pre1/busybox
546948 10388 821840 1379176 150b68 openwrt-4.0.2/build_mipsel/busybox-1.1.0-pre1/busybox
text data bss dec hex filename
92660 5232 35088 132980 20774 openwrt-3.4.4/build_mipsel/linux-2.4-ar7/linux-2.4.32/kernel/kernel.o
166384 5232 35088 206704 32770 openwrt-4.0.2/build_mipsel/linux-2.4-ar7/linux-2.4.32/kernel/kernel.o
text data bss dec hex filename
373216 108400 449776 931392 e3640 wlan-3.4.4/make/tiap.o
355416 108400 449776 913592 df0b8 wlan-4.0.2/make/tiap.o
Obviously the default kernel compiler flags are not good for the new compiler.
Regards
Stefan