Path: utzoo!attcan!uunet!tut.cis.ohio-state.edu!cs.utexas.edu!milano!cadillac!harp From: harp@cadillac.CAD.MCC.COM (Christopher North-Keys) Newsgroups: comp.windows.x Subject: Re: Compiling with GCC on Sparc? Keywords: gcc compiled X, sparc Message-ID: <9272@cadillac.CAD.MCC.COM> Date: 28 Jun 90 12:55:16 GMT References: <1990Jun20.150203.24164@swbatl.sbc.com> <2267@laura.UUCP> Reply-To: harp@MCC.COM (Christopher North-Keys) Organization: Packaging/Interconnect, M.C.C. Lines: 43 [From: klute@heike.informatik.uni-dortmund.de (Rainer Klute)] | If they are faster I can't tell you. However, they are considerably | larger (ca. 100 kB more) than those compiled with cc. The reason is that | cc makes use of shared libraries and gcc makes not (yet). Correction: GNU gcc-ld doesn't use dynamic linking. GNU gcc is perfectly happy with dynamic linking, *IF* you *DON'T* use gcc-ld with it. You should have it use the Sun ld. The gcc-ld appeared on my network when GNU g++ was compiled, at which point I noticed all my gcc-compiled executables had become huge. I edited the source to g++ to arrange for it to look for "gcc-ld++" instead of "gcc-ld", moved gcc-ld to gcc-ld++, reinstalled g++, and LO: no more problem. This happened on both the Sun 3 and 4's here. Example dynamic from the binaries used on our Sun 4/390, SunOS 4.1, X11R4: }-0.134-> file Xsun Xsun: sparc demand paged dynamically linked executable not stripped }-0.135-> nm Xsun | grep gcc 00002f50 t gcc_compiled. 0009da60 t gcc_compiled. 00097458 t gcc_compiled. 0009af48 t gcc_compiled. 00099170 t gcc_compiled. }-0.136-> ldd Xsun -lsunwindow.0 => /usr/lib/libsunwindow.so.0.40 -lpixrect.2 => /usr/lib/libpixrect.so.2.4 -lc.1 => /usr/lib/libc.so.1.3 }-0.137-> ls -Flasg Xsun 808 -rwxr-xr-x 1 harp netadm 819200 Jun 25 1990 Xsun* (I do seem to remember difficulty in compiling the server, unrelated to the dynamic-linking wierdness noted above. Also, I have not replaced *all* of the sparc binaries which were accidentally statically linked. Be warned.) -- --Christopher Alexander North-Keys----/\-------------------------------------- Co-founder Group Talisman / \/\ ^*^ Harp[@Mcc.Com] [*my* opinions] / \ \ Associate Systems Analyst --------------------------Microelectronics & Computer Technology Corporation--