Subject: RE: C++ compiler wackyness. - hack - note
To: <>
From: mjbedy <mjbedy@Oakland.edu>
List: port-pmax
Date: 08/13/1998 01:58:43
I already ran into a problem with this, but it worked for a buch of C++
stuff. I guess this is ok most of the time, but every once in a while, you
have to switch it back to the way it was before to get something to
compile.
Oh, well. I'm dealing with it.
- Mike
On Wed, 12 Aug 1998, mjbedy wrote:
>
>
> Ok, here's my hack to get c++ to work (your gonna love it).
>
> First, though, I have to say that this could screw something up - I
> don't know if it will mess things up if you're linking a shared library or
> not. (if someone could try it and let me know, I'd appreciate it.)
>
> Now for the hack:
>
> 1) create a file, fix.C, that contains nothing but the fix:
> /*
> * Workaround an ld shared library bug: define these dummy entries to
> * satisify __do_global_ctors() instead of the entries in libg++.so.
> */
> int *__CTOR_LIST__[] = {0};
> int *__DTOR_LIST__[] = {0,0};
>
> 2) compile it like so:
> c++ -c fix.C
>
> 3) this will create fix.o copy it to usr/bin
>
> cp fix.o /usr/bin
>
> 4) now cd into /usr/bin
>
> cd /usr/bin
>
> 5) move ld to ld.exe
>
> mv ld ld.exe
>
> 6) create a new ld script:
>
> #! /bin/csh -f
> /usr/bin/ld.exe /usr/bin/fix.o $*
>
> 7) chmod a+r+x ld
>
> When it breaks something, let me know. (It works for simple programs,
> and doesn't seem to adversly effect gcc, but it certainy doesn't mean it
> won't break something else.)
>
> - Mike
>
>