This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Pthread problems on HP-UX 10.20
- To: gcc at sunburst dot rose dot hp dot com, egcs at cygnus dot com
- Subject: Re: Pthread problems on HP-UX 10.20
- From: Mike Romberg <romberg at fsl dot noaa dot gov>
- Date: Fri, 23 Oct 1998 10:42:23 -0600 (MDT)
> Hi! I've installed egcs 1.1 on several machines. Everything
> works fine. However when the package
> DCE-CoreTools.DCE-BPRG(package puts user-level threads) is
> installed and I recompile egcs lot of strange problems
> happen. I use the following flags --enable-shared
> --with-gnu-as --enable-haifa.
> mysqld will start crashing with kernel panic. I think this
> is related to the fact it has mysqld includes mit-pthread.
> However when I compile this on non-DCE it works just fine.
> Any application compiled with DCE egcs version all c++
> program come up with this error /usr/lib/dld.sl: Unresolved
> symbol: pthread_once (code) from /usr/local/lib/lib stdc++.sl
> ABORT instruction (core dumped). It can be fixed by linking
> with dce library(Can this be put in the spec file, I am not
> sure how).
I bumped into this same problem and "fixed" it by modifying
g++spec.c. I'm pretty sure this is not the correct way to do this.
But it does seem to work. Here is the change I made to
gcc/cp/g++spec.c:
/* Add `-lstdc++' if we haven't already done so. */
if (library)
{
arglist[j++] = "-lstdc++";
added_libraries++;
+ arglist[j++] = "-ldce";
+ added_libraries++;
}
Perhaps someone else knows a better way to do this.
Mike Romberg (romberg@fsl.noaa.gov)