public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug boehm-gc/34232]  New: bootstrap fails when libgcj enabled due to undefined reference in libgcjgc (boehm-gc)
@ 2007-11-25 23:12 silver-dad at comcast dot net
  2009-08-21  2:26 ` [Bug boehm-gc/34232] " davek at gcc dot gnu dot org
  0 siblings, 1 reply; 2+ messages in thread
From: silver-dad at comcast dot net @ 2007-11-25 23:12 UTC (permalink / raw)
  To: gcc-bugs

libgcj build in bootstrap fails on i686-pc-cygwin due to undefined reference
error in boehm-gc library.

libtool: link: /home/LarryR/Build/gcc-4.3.0/gcc/gcj
-B/home/LarryR/Build/gcc-4.3.0/i686-pc-cygwin/libjava/
-B/home/LarryR/Build/gcc-4.3.0/gcc/ -ffloat-store -fomit-frame-pointer -Usun
-march=prescott -pipe -o .libs/jv-convert.exe --main=gnu.gcj.convert.Convert
-shared-libgcc  -L/home/LarryR/Build/gcc-4.3.0/i686-pc-cygwin/libjava/.libs
-L/home/LarryR/Build/gcc-4.3.0/i686-pc-cygwin/libjava ./.libs/libgcj.a -ldl -lz
-L/gcc-4.3.0/lib/gcc/i686-pc-cygwin/4.3.0
./.libs/libgcj.a(lt105-misc.o):misc.c:(.text+0xc10): undefined reference to
`_GC_get_thread_stack_base'
collect2: ld returned 1 exit status

This is caused by the following in "boehm-gc":

in "pthread-support.c" line 60 ...

# if defined(GC_PTHREADS) && !defined(GC_SOLARIS_THREADS) \
     && !defined(GC_WIN32_THREADS)

the functions in "pthread-support.c" are not compiled if GC_WIN32_THREADS is
defined, in particular "GC_get_thread_stack_base()" is not compiled.

in "misc.c" line 677 ...

# if defined(GC_PTHREADS) && ! defined(GC_SOLARIS_THREADS)
/* Use thread_stack_base if available, as GC could be initialized from
   a thread that is not the "main" thread.  */
GC_stackbottom = GC_get_thread_stack_base();
# endif

thus a call to GC_get_thread_stack_base() is generated even though
GC_WIN32_THREADS is defined so that GC_get_thread_stack_base() does not exist,
which breaks the build.

The following patch fixes the problem

--- boehm-gc/misc.c     (revision 130402)
+++ boehm-gc/misc.c     (working copy)
@@ -674,7 +674,7 @@
 #   if !defined(THREADS) || defined(GC_PTHREADS) || defined(GC_WIN32_THREADS)
\
        || defined(GC_SOLARIS_THREADS)
       if (GC_stackbottom == 0) {
-        # if defined(GC_PTHREADS) && ! defined(GC_SOLARIS_THREADS)
+        # if defined(GC_PTHREADS) && ! defined(GC_SOLARIS_THREADS) && !
defined(GC_WIN32_THREADS)
        /* Use thread_stack_base if available, as GC could be initialized from
           a thread that is not the "main" thread.  */
        GC_stackbottom = GC_get_thread_stack_base();


-- 
           Summary: bootstrap fails when libgcj enabled due to undefined
                    reference in libgcjgc (boehm-gc)
           Product: gcc
           Version: 4.3.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: boehm-gc
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: silver-dad at comcast dot net
 GCC build triplet: i686-pc-cygwin
  GCC host triplet: i686-pc-cygwin
GCC target triplet: i686-pc-cygwin


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

* [Bug boehm-gc/34232] bootstrap fails when libgcj enabled due to undefined reference in libgcjgc (boehm-gc)
  2007-11-25 23:12 [Bug boehm-gc/34232] New: bootstrap fails when libgcj enabled due to undefined reference in libgcjgc (boehm-gc) silver-dad at comcast dot net
@ 2009-08-21  2:26 ` davek at gcc dot gnu dot org
  0 siblings, 0 replies; 2+ messages in thread
From: davek at gcc dot gnu dot org @ 2009-08-21  2:26 UTC (permalink / raw)
  To: gcc-bugs



------- Comment #1 from davek at gcc dot gnu dot org  2009-08-21 02:26 -------
Was fixed in 

http://gcc.gnu.org/viewcvs?view=revision&revision=147641


-- 

davek at gcc dot gnu dot org changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|UNCONFIRMED                 |RESOLVED
         Resolution|                            |FIXED


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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2009-08-21  2:26 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-25 23:12 [Bug boehm-gc/34232] New: bootstrap fails when libgcj enabled due to undefined reference in libgcjgc (boehm-gc) silver-dad at comcast dot net
2009-08-21  2:26 ` [Bug boehm-gc/34232] " davek at gcc dot gnu dot org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).