public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads
@ 2012-12-04  9:15 michael at talamasca dot ocis.net
  2012-12-04 10:28 ` [Bug libgcc/55589] " pinskia at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: michael at talamasca dot ocis.net @ 2012-12-04  9:15 UTC (permalink / raw)
  To: gcc-bugs


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

             Bug #: 55589
           Summary: Failure compiling "generic-morestack-thread.c",
                    without threads
    Classification: Unclassified
           Product: gcc
           Version: 4.7.2
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: libgcc
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: michael@talamasca.ocis.net


Stock GCC 4.7.2 fails to build itself on my uClibc system, stopping at the file
"generic-morestack-thread.c":

/home/source/gcc-4.7.2/libgcc/generic-morestack-thread.c:41:21: fatal error:
pthread.h: No such file or directory
compilation terminated.
make[3]: *** [generic-morestack-thread.o] Error 1
make[3]: Leaving directory
`/home/test/build/gcc-build/i386-pc-linux-uclibc/libgcc'
make[2]: *** [all-stage1-target-libgcc] Error 2
make[2]: Leaving directory `/home/test/build/gcc-build'
make[1]: *** [stage1-bubble] Error 2
make[1]: Leaving directory `/home/test/build/gcc-build'
make: *** [all] Error 2

"pthread.h" is indeed missing, as I have compiled uClibc without threading
support.  GCC's build system fails to realize that that file shouldn't be built
in this case.

I've been dealing with this problem myself by simply changing "ifndef
inhibit_libc" to simply "if 0".  I haven't noticed any negative consequences
from this hack.


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

* [Bug libgcc/55589] Failure compiling "generic-morestack-thread.c", without threads
  2012-12-04  9:15 [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads michael at talamasca dot ocis.net
@ 2012-12-04 10:28 ` pinskia at gcc dot gnu.org
  2012-12-05  8:39 ` michael at talamasca dot ocis.net
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-12-04 10:28 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #1 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-04 10:27:26 UTC ---
How did you configure GCC?


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

* [Bug libgcc/55589] Failure compiling "generic-morestack-thread.c", without threads
  2012-12-04  9:15 [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads michael at talamasca dot ocis.net
  2012-12-04 10:28 ` [Bug libgcc/55589] " pinskia at gcc dot gnu.org
@ 2012-12-05  8:39 ` michael at talamasca dot ocis.net
  2012-12-09  0:48 ` pinskia at gcc dot gnu.org
  2012-12-13 23:38 ` michael at talamasca dot ocis.net
  3 siblings, 0 replies; 5+ messages in thread
From: michael at talamasca dot ocis.net @ 2012-12-05  8:39 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #2 from michael at talamasca dot ocis.net <michael at talamasca dot ocis.net> 2012-12-05 08:38:49 UTC ---
My usual GCC recipe is this:

configure
--build=i386-pc-linux-uclibc
--prefix=/usr
--sysconfdir=/etc
--sharedstatedir=/var/com
--localstatedir=/var/state
--infodir=/usr/share/info
--mandir=/usr/share/man
--disable-nls
--disable-static
--enable-shared
--enable-languages=c,c++
--disable-threads
--disable-libgomp
--disable-libitm
--with-system-zlib
--enable-frame-pointer

Everything up to --enable-shared is my usual policy that I apply to every
autoconf application unless it causes a problem.


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

* [Bug libgcc/55589] Failure compiling "generic-morestack-thread.c", without threads
  2012-12-04  9:15 [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads michael at talamasca dot ocis.net
  2012-12-04 10:28 ` [Bug libgcc/55589] " pinskia at gcc dot gnu.org
  2012-12-05  8:39 ` michael at talamasca dot ocis.net
@ 2012-12-09  0:48 ` pinskia at gcc dot gnu.org
  2012-12-13 23:38 ` michael at talamasca dot ocis.net
  3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu.org @ 2012-12-09  0:48 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #3 from Andrew Pinski <pinskia at gcc dot gnu.org> 2012-12-09 00:48:37 UTC ---
Created attachment 28902
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=28902
Patch which might work

Can you try this patch?


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

* [Bug libgcc/55589] Failure compiling "generic-morestack-thread.c", without threads
  2012-12-04  9:15 [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads michael at talamasca dot ocis.net
                   ` (2 preceding siblings ...)
  2012-12-09  0:48 ` pinskia at gcc dot gnu.org
@ 2012-12-13 23:38 ` michael at talamasca dot ocis.net
  3 siblings, 0 replies; 5+ messages in thread
From: michael at talamasca dot ocis.net @ 2012-12-13 23:38 UTC (permalink / raw)
  To: gcc-bugs


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

--- Comment #4 from michael at talamasca dot ocis.net <michael at talamasca dot ocis.net> 2012-12-13 23:36:53 UTC ---
The patch doesn't compile.  At __wrap_pthread_create, it starts erroring
because the pthread_t and pthread_attr_t types do not exist.

It appears that since the module specifically depends on hooking user
applications' attempts to use the pthread API, it's unavoidably specific to
that API.


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

end of thread, other threads:[~2012-12-13 23:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-12-04  9:15 [Bug libgcc/55589] New: Failure compiling "generic-morestack-thread.c", without threads michael at talamasca dot ocis.net
2012-12-04 10:28 ` [Bug libgcc/55589] " pinskia at gcc dot gnu.org
2012-12-05  8:39 ` michael at talamasca dot ocis.net
2012-12-09  0:48 ` pinskia at gcc dot gnu.org
2012-12-13 23:38 ` michael at talamasca dot ocis.net

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).