[Bug boehm-gc/37017] Using --enable-threads=solaris breaks near end of build in boehm-gc configury

rob1weld at aol dot com gcc-bugzilla@gcc.gnu.org
Tue Jan 20 04:05:00 GMT 2009



------- Comment #4 from rob1weld at aol dot com  2009-01-20 04:05 -------
(In reply to comment #1)
> I really don't think using solaris threads is that well supported anymore.  Is
> there a reason why you are not using just --enable-threads=pthreads?

I have another reason for the compiler to support Solaris threading
on this Platform, it is 'expected' by gdb. This is from code compiled by:
gcc version 4.4.0 20090117 (experimental) [trunk revision 143454].

# gdb simtest
GNU gdb (GDB) 6.8.50.20090115-cvs
(gdb) b 8
Breakpoint 1 at 0x804883f: file simtest.f, line 8.
(gdb) r
Starting program: /usr/share/src/gcc_build/gcc/testsuite/gcc/simtest 
warning: rw_common (): unable to read at addr 0x155708
warning: sol_thread_new_objfile: td_ta_new: Debugger service failed
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Breakpoint 1, MAIN__ () at simtest.f:8
8             call sub
(gdb) 


The "warning: sol_thread_new_objfile" line is from: 'gdb-6.8/gdb/sol-thread.c'.

static void
sol_thread_new_objfile (struct objfile *objfile)
{
  td_err_e val;
...
  if (val == TD_NOLIBTHREAD)
    return;
  else if (val != TD_OK)
    {
      warning (_("sol_thread_new_objfile: td_ta_new: %s"), td_err_string
(val));
      return;
    }

  sol_thread_active = 1;
}


Between ./configuring using "--with-gnu-as --with-as=/usr/local/bin/as 
--with-gnu-ld --with-ld=/usr/local/bin/ld" and using the Posix thread 
model on i386-pc-solaris2.11 we end up confusing gdb build with an unusual
Solaris configuration.

Gdb expects the Solaris Platform to be different than what gcc is providing
and for Solaris' compiler (_even_ _if_ it is gcc) to support the model
--enable-threads=solaris . 

This is due to gdb's expectation that the libthread_db and libthread
provided by the Operating System are in use. If we can not build the
compiler with the correct options for this Platform then gdb suffers.

When we get that warning it also means "sol_thread_active != 1" .

While it would be correct for gdb to fix _their_ configury to correctly
_detect_ the features that are available we should also fix _our_ 
configury to correctly _provide_ the features we need.

Rob


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=37017



More information about the Gcc-bugs mailing list