Re: [arch-general] [arch-dev-public] [toolchain] gcc 4.5 breakage
Thomas Bächler (2010-05-06 09:45):
Am 06.05.2010 09:44, schrieb Thomas Bächler:
Am 05.05.2010 02:46, schrieb Allan McRae:
Interesting... Does fixing the aliasing fix this one too? I see no upstream bug reports that seem related so you should follow it up there. I will pull in a new gcc-4.5 snapshot next week when I do the glibc-2.12 toolchain rebuild so hopefully that may contain a fix that I am missing...
There is no fix in the latest 4.5 branch (or trunk) yet. http://gcc.gnu.org/PR43987 has more details.
Basically, the problem is caused by -ftree-fta, which is on by default with -O1 and higher (and also -Os, which I use for busybox). The bug can be worked around with -fno-tree-fta until a fix becomes available.
Writing is difficult - it's -free-pta and -fno-tree-pta, of course.
I wasted a lot of time yesterday: 1. Compiled the kernel from git (for radeon stuff), rebooted. 2. 'ninit' segfaulted, 'ls' from busybox segfaulted. 3. Read your mail about busybox breakage, upgraded busybox with -fno-tree-pta, but... the same segfaults with kernels compiled by gcc-4.5. 4. Played with the kernel config for hours until finding out that CONFIG_CC_OPTIMIZE_FOR_SIZE=y causes the segfaults (and only on x86_64). I wonder whether this is something more specific to my setup, or nobody is compiling kernels with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86_64 with gcc-4.5 (building with gcc-4.4 works)... All this is probably unrelated to http://gcc.gnu.org/PR43987, but perhaps it will save some time for someone, as your post about busybox helped me. I'll wait for a new gcc package before reporting a gcc bug. -- -- Rogutės Sparnuotos P.S. The only good thing about the wasted time was that I found out how to use qemu for testing: $ qemu-system-x86_64 -kernel bzImage -initrd initrd.img
Am 06.05.2010 15:25, schrieb Rogutės Sparnuotos:
I wasted a lot of time yesterday:
1. Compiled the kernel from git (for radeon stuff), rebooted. 2. 'ninit' segfaulted, 'ls' from busybox segfaulted. 3. Read your mail about busybox breakage, upgraded busybox with -fno-tree-pta, but... the same segfaults with kernels compiled by gcc-4.5.
The busybox in the repositories is still built with gcc 4.4 - otherwise nobody would be able to boot. I'll be building a new version soon though, which is why I discovered this problem in the first place.
4. Played with the kernel config for hours until finding out that CONFIG_CC_OPTIMIZE_FOR_SIZE=y causes the segfaults (and only on x86_64).
I wonder whether this is something more specific to my setup, or nobody is compiling kernels with CONFIG_CC_OPTIMIZE_FOR_SIZE=y on x86_64 with gcc-4.5 (building with gcc-4.4 works)...
At least in Arch, we don't use that option for our kernels. It is pretty bad that this breaks.
On Thu, May 6, 2010 at 3:25 PM, Rogutės Sparnuotos <rogutes@googlemail.com> wrote:
All this is probably unrelated to http://gcc.gnu.org/PR43987, but perhaps it will save some time for someone, as your post about busybox helped me. I'll wait for a new gcc package before reporting a gcc bug.
IMO you should report it now, especially considering that the current package is a stable gcc release.
participants (3)
-
Rogutės Sparnuotos
-
Thomas Bächler
-
Xavier Chantry