[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#301064: gcc-3.4 build failure on hurd-i386



tags 301064 +patch
thanks

On Wed, May 04, 2005 at 03:48:07PM +0200, Thomas Schwinge wrote:
> I was able to build und use gcc-3_4-branch (last month or so).
> The only problem was (and still is) that _statically_ linked executables
> are segfaulting immediatelly.
> I was not yet able to debug that; parhaps it's related to the combination
> of binutils, glibc and gcc.

Hmm, I did no know about that.  Thanks.

What versions of binutils and glibc did you use?  The ones from
unstable?

> > Anyway, back to the gcc-3.4 build log:
> > 
> > > ./xgcc -B./ -B/usr/i586-gnu/bin/ -isystem /usr/i586-gnu/include
> > >   -isystem /usr/i586-gnu/sys-include
> > >   -L/build/mbanck/gcc-3.4-3.4.3/build/gcc/../ld -O2 -DIN_GCC    -W
> > >   -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes
> > >   -Wold-style-definition  -isystem ./include  -I. -I. -I../../src/gcc
> > >   -I../../src/gcc/. -I../../src/gcc/../include   -g0
> > >   -finhibit-size-directive -fno-inline-functions -fno-exceptions
> > >   -fno-zero-initialized-in-bss -fno-unit-at-a-time  \
> > >   -c ../../src/gcc/crtstuff.c -DCRT_BEGIN \
> > >   -o crtbegin.o
> > > In file included from ../../src/gcc/crtstuff.c:62:
> > >   ../../src/gcc/tsystem.h:79:19: stdio.h: No such file or directory
> > 
> > I see now: /include appears to be hard-coded as the sole system include
> > search path for *-gnu-*
> 
> Yes, that is done in gcc/config/t-gnu.
> #v+
> # In GNU, "/usr" is a four-letter word.
> NATIVE_SYSTEM_HEADER_DIR = /include
> #v-
> 
> I just set $NATIVE_SYSTEM_HEADER_DIR to the directory containing glibc's
> header files to make the build work.

Actually, this is what Debian does already (hurd-changes.dpatch changes
it to /usr/include); however, it seems the other headers in gcc/config/
have been shuffled around between gcc-3.3 and gcc-3.4, and
gcc/config/gnu.h now has a mention of /include as well.  Adding the
following patch to hurd-changes appears to work fine:

--- gcc/config/gnu.h.orig       2005-05-04 18:14:48.000000000 +0200
+++ gcc/config/gnu.h    2005-05-04 18:16:29.000000000 +0200
@@ -9,8 +9,9 @@
 #define LIB_SPEC "%{bsd:-lbsd-compat} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}"

 /* Standard include directory.  In GNU, "/usr" is a four-letter word.  */
+/* Overriden for Debian GNU/Hurd.  */
 #undef STANDARD_INCLUDE_DIR
-#define STANDARD_INCLUDE_DIR "/include"
+#define STANDARD_INCLUDE_DIR "/usr/include"

 /* Implicit library calls should use memcpy, not bcopy, etc.  */
 #undef TARGET_MEM_FUNCTIONS


Again, this should be a Debian-specific change for now.


cheers,

Michael



Reply to: