bill@ssbn.WLK.COM (Bill Kennedy) (12/28/88)
s the subject suggests I'm trying to tiptoe into the new compiler. Thus
far I haven't found anything it does that's smaller than what pcc writes
but there is a mesaurable (time) speed improvement. I have very little
experience with it so bear with my (hopefully not obvious) ignorance.
I took the same source and compiled it with pcc and gcc, with and without
the shared C library (-lc_s). It outran pcc by about 30% with a 50%
increase in binary size without the shared library. The pcc version with
shared library was about 20% larger than without it and it ran. The gcc
binary with shared library promptly dumped core with a memory fault. I
did RTFM but if there was a caveat in there it didn't have a big red flag
flying over it.
Is anyone else having similar results or is it just me again? Thanks,
--
Bill Kennedy usenet {killer,att,cs.utexas.edu,sun!daver}!ssbn!bill
internet bill@ssbn.WLK.COMzeeff@b-tech.ann-arbor.mi.us (Jon Zeeff) (12/30/88)
/*
This allows gcc (Green Hills) to be used with shared libraries
To install,
1) compile this program creating ld
3) cp /usr/ghs/BIN/386/lib/crt0.o to crt0.o.bak
4) cp /lib/crt1.o to /usr/ghs/BIN/386/lib/crt0.o
5) mv /bin/ld /bin/ld.real
6) mv this program (ld) to /bin/ld
7) cp /bin/gcc to /usr/gcc/cc
8) use -lc_s on your cc lines.
9) set your path to use /usr/gcc before /bin
Anything you compile should now used shared libraries
*/
#include <stdio.h>
main(argc,argv)
int argc;
char **argv;
{
int i;
char *new_argv[500];
for (i = 0; i < argc; ++i) {
new_argv[i] = argv[i];
}
new_argv[i++] = "/lib/crtn.o";
new_argv[i] = NULL;
execv("/bin/ld.real",new_argv);
return 1;
}
--
Jon Zeeff zeeff@b-tech.ann-arbor.mi.us
Support ISO 8859/1 zeeff%b-tech.uucp@umix.cc.umich.edu
Ann Arbor, MI umix!b-tech!zeeff