bootstrap/4068: GCC 3.0.1 bootstrap fails on older Linux (Red Hat 5.2)

mengel@fnal.gov mengel@fnal.gov
Mon Aug 20 16:06:00 GMT 2001


>Number:         4068
>Category:       bootstrap
>Synopsis:       bootstrap fails on older Linux (Red Hat 5.2)
>Confidential:   no
>Severity:       critical
>Priority:       medium
>Responsible:    unassigned
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Mon Aug 20 16:06:01 PDT 2001
>Closed-Date:
>Last-Modified:
>Originator:     Marc Mengel
>Release:        3.0.1
>Organization:
Fermi National Accelerator Laboratory
>Environment:
Red Hat 5.2 Linux
System: Linux bldlinux52.fnal.gov 2.0.36 #2 Thu Jul 15 13:58:21 CDT 1999 i686 unknown
Architecture: i686

Red Hat 5.2 Linux box using:
    libc-5.3.12-28
    glibc-devel-2.0.7-29.4
    glibc-2.0.7-29.4
building a native compiler ('make bootstrap')

host: i686-pc-linux-gnu
build: i686-pc-linux-gnu
target: i686-pc-linux-gnu
configured with: ../gcc-3.0.1/configure --prefix=/tmp/build-gcc-v3_0_1 --disable-shared
>Description:
  The header:
     gcc-3.0.1/gcc/config/i386/linux.h
  does a:
    #include <sys/ucontext.h>
  which header file doesn't exist on this release.

  It dies down in:
    ./xgcc -B./ -B/tmp/build-gcc-v3_0_1/i686-pc-linux-gnu/bin/ -isystem /tmp/build-gcc-v3_0_1/i686-pc-linux-gnu/include -O2   -DIN_GCC    -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -isystem ./include  -fPIC -g1  -DIN_LIBGCC2 -D__GCC_FLOAT_NOT_NEEDED  -I. -I. -I../../gcc-3.0.1/gcc -I../../gcc-3.0.1/gcc/. -I../../gcc-3.0.1/gcc/config -I../../gcc-3.0.1/gcc/../include  -DL_muldi3 -c ../../gcc-3.0.1/gcc/libgcc2.c -o libgcc/./_muldi3.o
    In file included from tm.h:7,
		     from ../../gcc-3.0.1/gcc/config/i386/xm-i386.h:39,
		     from tconfig.h:3,
		     from ../../gcc-3.0.1/gcc/libgcc2.c:36:
    ../../gcc-3.0.1/gcc/config/i386/linux.h:237:26: sys/ucontext.h: No such file or directory
    gmake[4]: *** [libgcc/./_muldi3.o] Error 1
    gmake[4]: Leaving directory `/scratch/gcc-v3_0_1-Linux+2/_build/obj/gcc'
    gmake[3]: *** [libgcc.a] Error 2
    gmake[3]: Leaving directory `/scratch/gcc-v3_0_1-Linux+2/_build/obj/gcc'
    gmake[2]: *** [stage1_build] Error 2
    gmake[2]: Leaving directory `/scratch/gcc-v3_0_1-Linux+2/_build/obj/gcc'
    gmake[1]: *** [bootstrap] Error 2
    gmake[1]: Leaving directory `/scratch/gcc-v3_0_1-Linux+2/_build/obj'
    make: *** [all] Error 2

>How-To-Repeat:
	unpack gcc tarfile
	make obj directory
	cd to obj
	../gcc-3.0.1/configure --prefix=/tmp/build-gcc-v3_0_1 --disable-shared
	make bootstrap
>Fix:

I *think* the following patch works; (and would work better if configure
checked for <sys/ucontext.h>).

- - - - - - - - - - - - - cut here - - - - - - - - - - - - - - - - - 
*** gcc/config/i386/linux.h.orig	Mon Aug 20 17:57:01 2001
--- gcc/config/i386/linux.h	Mon Aug 20 17:57:13 2001
***************
*** 234,242 ****
--- 234,251 ----
  
  #ifdef IN_LIBGCC2
  #include <signal.h>
+ #ifdef HAVE_UCONTEXT_H
  #include <sys/ucontext.h>
+ #else
+ #include <sys/types.h>
+ #include <features.h>
+ #include <sys/elf.h>
+ #include <string.h>
+ #include <sigcontext.h>
+ #endif
  #endif
  
+ #ifdef HAVE_UCONTEXT_H
  #define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS)		\
    do {									\
      unsigned char *pc_ = (CONTEXT)->ra;					\
***************
*** 290,292 ****
--- 299,302 ----
      (FS)->retaddr_column = 8;						\
      goto SUCCESS;							\
    } while (0)
+ #endif
>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the Gcc-prs mailing list