This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Successful egcs-1.0.2 compile!
- To: egcs at cygnus dot com
- Subject: Successful egcs-1.0.2 compile!
- From: npsimons at nmt dot edu
- Date: Tue, 24 Mar 1998 21:46:03 -0700 (MST)
- Disposition-Notification-To: npsimons@nmt.edu
- Organization: New Mexico Institute of Mining and Technology
-----BEGIN PGP SIGNED MESSAGE-----
I thought I would try compiling and installing egcs because a friend of
mine said it works better with glibc and it might fix this little problem:
Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2
/tmp/cca056251.o: In function `main':
/tmp/cca056251.o(.text+0x75): undefined reference to `stat'
/tmp/cca056251.o(.text+0x1bb): undefined reference to `stat'
It's installed, but I guess I need to recompile glibc with egcs so that it will
fix that problem. BTW, I first ran into this problem with gcc 2.8.1 and glibc
2.0.6. I found an interesting workaround, which is more of a kludge. If you
do this:
Mysteria:~/Projects/class_check$ gcc lud2.c -o lud2 -O
Mysteria:~/Projects/class_check$
It compiles fine, as shown. I found a newsgroup posting that said this is
because of some strange relationships between xstat and stat (and variants
thereof; take a look at sys/stat.h). Adding the -O option makes it so that it
inlines some functions, including stat (I guess). Needless to say, I was happy
to get anything to compile, so I decided to recompile a few other things (make,
fileutil, etc). When the -O option didn't work with them, I got nervous. I
tried lots of different things: -share (compiles; segfaults on exec), -static
(compiles, works flawlessy, but x2 size), passing -shared, -call_shared, -dy,
- -Bsymbolic to ld, etc. I finally just gave up and tried egcs. All these
problems are probably just in my setup; I've hacked a lot of things to get them
to "compile" ;)
Anyways, I had to use the -O option when compiling egcs, and I had to
make a little hack to _G_config.h (in libraries/libio) because of a problem
with a typedef somewhere around line 45; I'm pretty sure it was 'typedef
__sigset_t _G_sigset_t;'. It was complaining that the data type was undefined.
I remember having to fix a problem like this for something else once before
(maybe previous gcc?), so I check _G_config.h. No includes, except for one at
the end, and it wasn't sigset.h (where the definition for __sigset_t is). So I
add it to line one of _G_sigset_t, start another make bootstrap, and it compiles
fine.
Now I guess I will go and try to recompile glibc with egcs and see what
happens. Here are the details for my machine:
kernel: Linux 2.1.90
libc: glibc 2.0.6 (aka libc 6)
cc: gcc 2.8.1 (before) egcs 1.0.2 (after)
arch: i686 (Intel Pentium Pro 180 MHz)
dist: Slakware 3.2 (1.5 years ago; now it's unrecognizable :)
host: Mysteria.rcn.nmt.edu (check web address below, if it's up)
- ------------------------------------------------------------------
Nathan Paul Simons | Life on the cutting edge
npsimons@nmt.edu | Linux 2.1.90
http://www.nmt.edu/~npsimons | glibc 2.0.6
http://Mysteria.rcn.nmt.edu:8080 | egcs 1.0.2
- ------------------------------------------------------------------
-----BEGIN PGP SIGNATURE-----
Version: 2.6.2
iQCVAwUBNRiQoa2TiEsw6BOVAQFiWwQAq9bMQXdEmRLeRkTRtnXzOxFJPWluL8Ze
Ll69EGWSBWnTh4FcrI2ObkDZZW1tRMicRSmTJcaHLtFe/ff9R8mX38Je6QEy4NS/
a+O1DH2lLY00g1+mH6Hkl7WvJRE48JLv44aQprXXNuGHXiAXBolFRPPFhk2mQqoq
OlRLUtcqXdU=
=i2zY
-----END PGP SIGNATURE-----