This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.
See the CrossGCC FAQ for lots more information.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hello, I was able to build gcc 3.3.6 using crosstool-0.38. I ran into a couple of problems, which I fixed with these patches. One problem is the PATH_MAX problem, easily fixed by Dan Kegel's patch for it. The other is a build problem I noticed when gcc's configure is invoked with --without-headers. It builds a temporary script in $TMPDIR/cNf<PID>/cNf<PID>.tgt. It later invokes this script. I don't know if this patch is absolutely necessary to build. Leo
diff -urN crosstool-0.38-orig/patches/gcc-3.3.6/gcc-3.3.6-fix-fixincl.patch crosstool-0.38/patches/gcc-3.3.6/gcc-3.3.6-fix-fixincl.patch
--- crosstool-0.38-orig/patches/gcc-3.3.6/gcc-3.3.6-fix-fixincl.patch 1969-12-31 17:00:00.000000000 -0700
+++ crosstool-0.38/patches/gcc-3.3.6/gcc-3.3.6-fix-fixincl.patch 2005-12-20 18:31:44.000000000 -0700
@@ -0,0 +1,30 @@
+diff -urN gcc-3.3.6-orig/gcc/Makefile.in gcc-3.3.6/gcc/Makefile.in
+--- gcc-3.3.6-orig/gcc/Makefile.in 2004-04-01 09:55:23.000000000 -0700
++++ gcc-3.3.6/gcc/Makefile.in 2005-12-20 18:28:39.000000000 -0700
+@@ -265,7 +265,10 @@
+ CROSS_SYSTEM_HEADER_DIR = @CROSS_SYSTEM_HEADER_DIR@
+
+ # autoconf sets SYSTEM_HEADER_DIR to one of the above.
+-SYSTEM_HEADER_DIR = @SYSTEM_HEADER_DIR@
++# Purge it of unneccessary internal relative paths
++# to directories that might not exist yet.
++# The sed idiom for this is to repeat the search-and-replace until it doesn't match, using :a ... ta.
++SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER_DIR@ | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`
+
+ # Control whether to run fixproto and fixincludes.
+ STMP_FIXPROTO = @STMP_FIXPROTO@
+@@ -2374,11 +2377,13 @@
+ $(SHELL) ${srcdir}/mkinstalldirs $(gcc_tooldir)
+
+ # Build fixed copies of system files.
++# Abort if no system headers available, unless building a crosscompiler.
++# Canonicalize path so directory/that/doesnt/exist/yet/../../../.. doesn't fail
+ stmp-fixinc: fixinc.sh gsyslimits.h
+ @if test ! -d ${SYSTEM_HEADER_DIR}; then \
+ echo The directory that should contain system headers does not exist: >&2 ; \
+ echo " ${SYSTEM_HEADER_DIR}" >&2 ; \
+- if test "x${SYSTEM_HEADER_DIR}" = "x${gcc_tooldir}/sys-include"; \
++ if test "x${SYSTEM_HEADER_DIR}" = "x`echo "${gcc_tooldir}/sys-include" | sed -e :a -e "s,[^/]*/\.\.\/,," -e ta`"; \
+ then sleep 1; else exit 1; fi; \
+ fi
+ rm -rf include; mkdir include
diff -urN crosstool-0.38-orig/patches/gcc-3.3.6/gcc-3.3.6-fix-tmpfile-tgt.patch crosstool-0.38/patches/gcc-3.3.6/gcc-3.3.6-fix-tmpfile-tgt.patch
--- crosstool-0.38-orig/patches/gcc-3.3.6/gcc-3.3.6-fix-tmpfile-tgt.patch 1969-12-31 17:00:00.000000000 -0700
+++ crosstool-0.38/patches/gcc-3.3.6/gcc-3.3.6-fix-tmpfile-tgt.patch 2005-12-20 16:10:28.000000000 -0700
@@ -0,0 +1,12 @@
+diff -urN gcc-3.3.6-orig/configure.in gcc-3.3.6/configure.in
+--- gcc-3.3.6-orig/configure.in 2004-01-02 07:09:48.000000000 -0700
++++ gcc-3.3.6/configure.in 2005-12-20 16:08:36.000000000 -0700
+@@ -867,7 +867,7 @@
+
+ # Handle --with-headers=XXX. If the value is not "yes", the contents of
+ # the named directory are copied to $(tooldir)/sys-include.
+-if test x"${with_headers}" != x ; then
++if test x"${with_headers}" != x && test x"${with_headers}" != xno ; then
+ if test x${is_cross_compiler} = xno ; then
+ echo 1>&2 '***' --with-headers is only supported when cross compiling
+ exit 1
------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |