Return to BSD News archive
Path: sserve!manuel.anu.edu.au!munnari.oz.au!news.hawaii.edu!ames!sun-barr!cs.utexas.edu!wupost!darwin.sura.net!paladin.american.edu!news.univie.ac.at!hp4at!mcsun!Germany.EU.net!unidui!du9ds3!veit
From: veit@du9ds3 (Holger Veit)
Newsgroups: comp.unix.bsd
Subject: [386bsd] gcc-2.3.1 and XFree86-1.1 compile
Date: 30 Nov 92 12:36:31 GMT
Organization: Uni-Duisburg FB9 Datenverarbeitung
Lines: 37
Message-ID: <veit.723126991@du9ds3>
Reply-To: veit@du9ds3.uni-duisburg.de
NNTP-Posting-Host: du9ds3.fb9dv.uni-duisburg.de
I yesterday managed to compile the XFree86 tree with gcc-2.3.1 (I today
heard the 2.3.2 is out, but I think this doesn't make much difference).
FYI: There were two minor problems, which I do not know of whether they have
been corrected in the new gcc version:
1. Don't make the mistake to try run fix-includes on the 386bsd include files,
they produce garbage. The includes already provided with 386bsd work
fine enough.
2. Many X applications fail compile with
_eprintf: abort() undefined reference
This is because of a loop in heritance of library functions:
The gcc driver links applications with
gcc -o a.out *.o -l(other libraries) -lgcc -lc -lgcc
_eprintf is the gcc-2.3.1 builtin for the assert macro, which calls
abort internally, which is in libc.a.
Some functions in libc.a, however use assert, and if they are used
and the main program does not use abort before, _eprintf is included
from the second -lgcc and leaves an unresolved reference for abort.
I solved this problem, since I had the gcc sources still online by
modifying the gcc.c line where it reads
... %L -lgcc -lc -lgcc ...
into
... %L -lgcc -lc -lgcc -lc ...
which IS a hack, but the fastest solution. If I detect this again in
2.3.2, I'll report the problem to gcc-bugs.
Holger
--
| | / Dr. Holger Veit | INTERNET: veit@du9ds3.fb9dv.uni-duisburg.de
|__| / University of Duisburg | "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
| | / Dept. of Electr. Eng. | Sorry, the above really good fortune has
| |/ Inst. f. Dataprocessing | been CENSORED because of obscenity"