gcc-4.1.1 pass2 cannot find limits.h

f.l. texlexsex at gmail.com
Fri Jun 30 03:12:58 PDT 2006


still no luck,
i think gcc/config/sh/linux.h is not required for an i386 , isn't it?

my patch to gcc-4.1.1:(between ````` and ''''')

`````

diff -ru gcc-4.1.1/gcc/config/i386/linux.h
../build/gcc-4.1.1/gcc/config/i386/linux.h
--- gcc-4.1.1/gcc/config/i386/linux.h   2005-08-11 01:53:01.000000000 +0800
+++ ../build/gcc-4.1.1/gcc/config/i386/linux.h  2006-06-30
17:39:53.000000000 +0800
@@ -105,7 +105,7 @@
 /* If ELF is the default format, we should not use /lib/elf.  */

 #define LINK_EMULATION "elf_i386"
-#define DYNAMIC_LINKER "/lib/ld-linux.so.2"
+#define DYNAMIC_LINKER "/tool/lib/ld-linux.so.2"

 #undef  SUBTARGET_EXTRA_SPECS
 #define SUBTARGET_EXTRA_SPECS \
diff -ru gcc-4.1.1/gcc/config/linux.h ../build/gcc-4.1.1/gcc/config/linux.h
--- gcc-4.1.1/gcc/config/linux.h        2005-08-06 21:26:35.000000000 +0800
+++ ../build/gcc-4.1.1/gcc/config/linux.h       2006-06-30
17:37:49.000000000 +0800
@@ -104,3 +104,7 @@
 #define TARGET_C99_FUNCTIONS 1

 #define TARGET_POSIX_IO
+
+/* remove /usr/include from system standard include header file search dir */
+#undef STANDARD_INCLUDE_DIR
+#define STANDARD_INCLUDE_DIR 0
diff -ru gcc-4.1.1/gcc/configure ../build/gcc-4.1.1/gcc/configure
--- gcc-4.1.1/gcc/configure     2006-02-15 00:50:45.000000000 +0800
+++ ../build/gcc-4.1.1/gcc/configure    2006-06-30 17:41:21.000000000 +0800
@@ -12763,7 +12763,9 @@
 # These are the normal (build=host) settings:
 CC_FOR_BUILD='$(CC)'
 BUILD_CFLAGS='$(ALL_CFLAGS)'
-STMP_FIXINC=stmp-fixinc
+# disable fixincludes
+#STMP_FIXINC=stmp-fixinc
+STMP_FIXINC=

 # Possibly disable fixproto, on a per-target basis.
 case ${use_fixproto} in

'''''


error message: (between ````` and ''''')

`````

mv tmp-libgcc.mk libgcc.mk
TARGET_CPU_DEFAULT="" \
HEADERS="auto-host.h ansidecl.h" DEFINES="USED_FOR_TARGET " \
/bin/sh ../../gcc-4.1.1/gcc/mkconfig.sh tconfig.h
/src/build/gcc-build2/./gcc/xgcc -B/src/build/gcc-build2/./gcc/ -B/tool/i686-pc-
linux-gnu/bin/ -B/tool/i686-pc-linux-gnu/lib/ -isystem /tool/i686-pc-linux-gnu/i
nclude -isystem /tool/i686-pc-linux-gnu/sys-include -O2 -O2 -g -O2   -DIN_GCC
 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wold-style-d
efinition  -isystem ./include  -I. -I. -I../../gcc-4.1.1/gcc -I../../gcc-4.1.1/g
cc/. -I../../gcc-4.1.1/gcc/../include -I../../gcc-4.1.1/gcc/../libcpp/include
-g0 -finhibit-size-directive -fno-inline-functions -fno-exceptions -fno-zero-ini
tialized-in-bss -fno-unit-at-a-time  -fno-omit-frame-pointer \
  -c ../../gcc-4.1.1/gcc/crtstuff.c -DCRT_BEGIN \
  -o crtbegin.o
In file included from /src/build/gcc-build2/./gcc/include/limits.h:11,
                 from ../../gcc-4.1.1/gcc/tsystem.h:108,
                 from ../../gcc-4.1.1/gcc/crtstuff.c:68:
/tool/lib/gcc/i686-pc-linux-gnu/4.1.1/include/syslimits.h:7:25: error: no includ
e path in which to search for limits.h
make[2]: *** [crtbegin.o] Error 1
make[2]: Leaving directory `/src/build/gcc-build2/gcc'
make[1]: *** [all-gcc] Error 2
make[1]: Leaving directory `/src/build/gcc-build2'
make: *** [all] Error 2
build:/src/build/gcc-build2$

'''''

On 6/30/06, Andrew Benton <b3nt at ukonline.co.uk> wrote:
> f.l. wrote:
> > hi,
> > i'm using gcc-4.1.1 to build the tool chain,
> > while it blocked at pass 2,
> > and gcc reported no limits.h was found.
> >
> > my patch to gcc source:
> > in gcc/configure:
> > change STMP_FIXINC=stmp-fixinc
> > to STMP_FIXINC=
> >
> > in gcc/cppdefaults.h:
> > added
> >    #undef STANDARD_INCLUDE_DIR
> >    #define STANDARD_INCLUDE_DIR 0
> >
> > and changed various string values in header files in gcc/config/i386/,
> > as mentioned in gcc-specs-patch
> >
> > and i find there is a
> > #include_next <limits.h>
> > which caused the problem,
> >
> > anyone have the same problem?
>
> No, gcc-4.1.1 works fine here. How did you apply the specs patch? What
> works for me is these commands
>
> sed -i 's,r /l,r /tools/l,g'  gcc/config/sh/linux.h
> sed -i 's,R "/l,R "/tools/l,g' gcc/config/i386/linux.h
> cat >> gcc/config/linux.h << "EOF"
> #undef STANDARD_INCLUDE_DIR
> #define STANDARD_INCLUDE_DIR 0
> EOF
>
> Andy
> --
> http://linuxfromscratch.org/mailman/listinfo/lfs-support
> FAQ: http://www.linuxfromscratch.org/lfs/faq.html
> Unsubscribe: See the above information page
>



More information about the lfs-support mailing list