This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
A user's experiences with GCC-3.4 snapshots
- From: Art Haas <ahaas at airmail dot net>
- To: gcc at gcc dot gnu dot org
- Date: Tue, 16 Sep 2003 14:31:58 -0500
- Subject: A user's experiences with GCC-3.4 snapshots
Hi.
I'm writing a short note to the list to post my experiences with the 3.4
development snapshots. As the compiler is still undergoing daily
modifications I haven't expected it to be flawless. I try to build a CVS
updated snapshot every two or three days.
In general, the snapshots have compiled without problem. Many of the C
and C++ programs that I build from source compile and run. There are a
few big holdouts though:
Mozilla - The 1.5 branch wouldn't build because of extra semi-colon
characters in the code. A number of patches have been applied to the
Mozilla tree to resolve this - the new parser is _very_ good at catching
this stuff! Still, the resulting binary doesn't run - it crashes before
displaying anything. The followin message to gcc-patches contains a
patch which the author said fixes this problem:
http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00947.html
Perl - The problem here occurs during the configuration. Perl's
Configure script generates a small programs to compile to test if a
feature is available (like GNU configure), but the programs provide
different results under GCC-3.3 and GCC-3.4. In the earlier version of
GCC the program fails to link, but GCC-3.4 produces a working program,
thus fooling Configure into thinking a feature is present. On my
i586-pc-linux-gnu box (Debian, glibc-2.3.2) the following code snippet
is the test for setproctitle(), which looks to be a BSD feature and so
the resulting program should fail to link. The file 'try.c' is the
generated program from the Configure script ...
$ cat try.c
#include <stdio.h>
int main() { extern void *setproctitle(); if(&setproctitle) return(0); else return(1); }
$ gcc --version
gcc (GCC) 3.4 20030909 (experimental)
...
$ gcc -save-temps -o try try.c
$ cat try.s
.file "try.c"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $0, %eax
subl %eax, %esp
movl $0, %eax
leave
ret
.size main, .-main
.section .note.GNU-stack,"",@progbits
.ident "GCC: (GNU) 3.4 20030909 (experimental)"
Building with gcc-3.3 or earlier fails (as expected):
$ /usr/bin/gcc --version
gcc (GCC) 3.3.2 20030831 (Debian prerelease)
...
$ /usr/bin/gcc -save-temps -o try try.c
/tmp/ccWd37Or.o(.text+0x11): In function `main':
: undefined reference to `setproctitle'
collect2: ld returned 1 exit status
$ cat try.s
.file "try.c"
.text
.globl main
.type main, @function
main:
pushl %ebp
movl %esp, %ebp
subl $8, %esp
andl $-16, %esp
movl $0, %eax
subl %eax, %esp
movl $setproctitle, %eax
testl %eax, %eax
je .L2
movl $0, -4(%ebp)
jmp .L1
.L2:
movl $1, -4(%ebp)
.L1:
movl -4(%ebp), %eax
leave
ret
.size main, .-main
.ident "GCC: (GNU) 3.3.2 20030831 (Debian prerelease)"
$
GCC-3.4 removes all traces of 'setproctitle' from the generated assembly
code file, where GCC-3.3 leaves in a 'movl $setproctitle, %eax' line. I
am no good with assembly so I can't say just what is going on. There are
other functions like eaccess() that generate false successes, so the
end result is a bad configuration and Perl fails to link.
Parrot: GCC-3.4 has a _huge_ slowdown in compiling the 'core_ops_cg.c'
file - a C file with a large number of computed goto statements. In
GCC-3.2 this file compiled but required a huge amount of memory. GCC-3.3
fixed both of these shortcomings in 3.2 - the file compiled much more
quickly and with significantly less memory. GCC-3.4 has regressed
time-wise though, as the file now takes 5x or 6x as long to compile as
it does with GCC-3.3. There is also a compiler error generated when the
/usr/include/bits/mathinline.h file gets included, but I've lost my
build log with the error message. Grrr ...
One other major program that failed with GCC-3.4 was the 2.6.0-test Linux
kernel. I tried a build several weeks ago, and the resulting kernel
built and linked successfully, but crashed when booted. Earlier GCC
releases did the same for me prior to their branching and official
release, so I"m not surprised this build failed. I'll be trying again
shortly as there have been many patches applied to GCC-3.4 since my
earlier kernel build.
GCC-3.4 has successfully built many other programs I use - Subversion,
Apache, numerous C and C++ GNU packages from CVS, and of course GCC
itself.
Please take this message as a report from the field - the GCC-3.4
compiler is looking good, but there are a few hiccups still to be
resolved. I'll be glad to file Bugzilla bug reports if that is helpful
in keeping track of these issues I've posted.
Art Haas
--
Man once surrendering his reason, has no remaining guard against absurdities
the most monstrous, and like a ship without rudder, is the sport of every wind.
-Thomas Jefferson to James Smith, 1822