crosstool-0.28-rc37 fails to build on SuSE 9.2

Steven Scholz steven.scholz@imc-berlin.de
Wed Dec 29 11:38:00 GMT 2004


dank04@kegel.com wrote:
> Might be that gcc-3.3.3 has a 'trap' line somewhere
> in a configure script that isn't compatible with
> the new version of bash.

That's right! A quick hack is this:

diff -u crosstool-0.28-rc37/crosstool.sh.orig crosstool-0.28-rc37/crosstool.sh
--- crosstool-0.28-rc37/crosstool.sh.orig       2004-12-29 10:50:14.258505184 +0100
+++ crosstool-0.28-rc37/crosstool.sh    2004-12-29 10:50:53.599524440 +0100
@@ -313,7 +313,7 @@
  # Use --with-local-prefix so older gccs don't look in /usr/local (http://gcc.gnu.org/PR10532)

  if test '!' -f Makefile; then
-    ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \
+    bash ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \
         --with-local-prefix=${SYSROOT} \
         --disable-multilib \
         --with-newlib \
@@ -421,7 +421,7 @@
      # only matters for gcc-3.2.x and later, I think
      # --disable-nls to work around crash bug on ppc405, but also because embedded
      # systems don't really need message catalogs...
-    ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \
+    bash ${GCC_DIR}/configure $CANADIAN_BUILD --target=$TARGET --host=$GCC_HOST --prefix=$PREFIX \
          ${GCC_EXTRA_CONFIG} \
          $GCC_SYSROOT_ARG \
         --with-local-prefix=${SYSROOT} \

But according to http://lists.gnu.org/archive/html/bug-bash/2004-07/msg00293.html

  "POSIX says that the `action' and `condition' are both required.
   The official way to accomplish what you want is to run `trap - 0'."

So the proper way would be to replace the two "trap 0" with "trap - 0" in configure
of gcc-3.3.x with something like

perl -i -p -e "s,trap 0,trap - 0,g" ${GCC_DIR}/configure

--
Steven


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list