home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / os / linux / 21028 < prev    next >
Encoding:
Internet Message Format  |  1992-12-21  |  1.7 KB

  1. Path: sparky!uunet!cs.utexas.edu!uwm.edu!ogicse!news.u.washington.edu!serval!hlu
  2. From: hlu@eecs.wsu.edu (H.J. Lu)
  3. Newsgroups: comp.os.linux
  4. Subject: Re: gcc -g
  5. Message-ID: <1992Dec18.231418.23150@serval.net.wsu.edu>
  6. Date: 18 Dec 92 23:14:18 GMT
  7. Article-I.D.: serval.1992Dec18.231418.23150
  8. References: <1992Dec17.232305.24764@watson.ibm.com>
  9. Sender: news@serval.net.wsu.edu (USENET News System)
  10. Organization: School of EECS, Washington State University
  11. Lines: 34
  12.  
  13. In article <1992Dec17.232305.24764@watson.ibm.com>, rajat@watson.ibm.com (Rajat Datta) writes:
  14. |> I'm running with the basedisk, libdisk, rootdisk, etc. that H.J. Lu
  15. |> distributes with the GCC package.  Where can I find a working libg.a?
  16. |> Meanwhile, any files I compile with gcc -g fails with segmentation
  17. |> error; something to do with i/o, I believe, but haven't looked into it
  18. |> any deeper.  Of course, this means gdb is pretty useless too.
  19. |> 
  20. |> Any ideas?  Thanks,
  21. |> -- 
  22. |> rajat (rajat@watson.ibm.com)
  23.  
  24. This is caused by a bad `specs'. It will be fixed in gcc 2.3.3. I am
  25. sorry we have to wait for it. I don't want to see a buggy gcc 2.3.2 floating
  26. around. The problem is the shared version of libgcc.a is linked if -g
  27. is used during the final link stage. Since my current configuraion may be
  28. very different from yours, I cannot give you my `specs'. If you are using
  29. the alpha gcc 2.3.2, you should not have this problem. The
  30. solutions are
  31.  
  32. 1. Do
  33.  
  34.     gcc xxxxxxxxxxx -c -g foo.c
  35.     gcc -o foo foo.o foo1.o ... # no -g
  36.  
  37.    This is what I am doing although
  38.  
  39.     gcc -g -o foo foo.o
  40.  
  41.    works for me. That saves quite a lot disk space. The only drawback
  42.    is you cannot debug libc.a with this (Do you want to?).
  43.  
  44. 2. Fix `specs' if you know how.
  45.  
  46. H.J.
  47.