Subject: gcc-3.2
To: NetBSD toolchain <tech-toolchain@netbsd.org>
From: Bryan <u1@terran.org>
List: tech-toolchain
Date: 09/10/2002 18:43:42
Hello,

Noting Jason Thorpe's post to tech-toolchain dated 5/2002, I installed
stock gcc-3.2 C/C++ and binutils-2.13 (in /usr/local) today on my
NetBSD-1.5.3/alpha machine.  Compilation works, but I am unable to execute
any dynamically-linked executables produced from either gcc or g++.
Instead I get a core dump.  If I statically link, I have no problems.

% uname -a
NetBSD jupiter 1.5.4_ALPHA NetBSD 1.5.4_ALPHA (Jupiter 20020825) #5: Sun Aug 25 15:50:04 PDT 2002 bryan@jupiter:/usr/src/1.5/src/sys/arch/alpha/compile/jupiter alpha
% printf '#include <stdio.h>\nint main(int argc, char *argv[]){printf("Hello\\n");return 0;}\n' > tmp/test.c
% local-gcc --version
local-gcc (GCC) 3.2
Copyright (C) 2002 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

% local-gcc -Wall tmp/test.c
% ./a.out
Segmentation fault (core dumped)
% local-gcc -Wall -static tmp/test.c
% ./a.out
Hello
%

My version of gdb (4.17) is not able to debug applications compiled with
gcc-3, and I'm having trouble resolving that (seems gdb-5.2.1 is a no-go
still on netbsd-alpha).  However, before I go any further, is there a short
answer on NetBSD and gcc-3 (e.x "don't use it")?

Thanks,
--
-bryan