cross build cc1 crashed, while in libgcc stage

Programming, for all ages and all languages.
Post Reply
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

cross build cc1 crashed, while in libgcc stage

Post by blackoil »

in checking whether to use setjmp/longjmp exceptions

Code: Select all

# The sjlj test is almost duplicated here and in libgo/configure.ac (for C),
# libstdc++-v3/acinclude.m4 and libjava/configure.ac (for C++), and
# libobjc/configure.ac (for Objective-C).
# FIXME: This should be centralized in config/sjlj.m4.
# Check whether --enable-sjlj-exceptions was given.
if test "${enable_sjlj_exceptions+set}" = set; then :
  enableval=$enable_sjlj_exceptions; case "$enableval" in
   yes|no|auto) ;;
   *) as_fn_error "unknown argument to --enable-sjlj-exceptions" "$LINENO" 5 ;;
   esac
else
  enable_sjlj_exceptions=auto
fi


{ $as_echo "$as_me:${as_lineno-$LINENO}: checking whether to use setjmp/longjmp exceptions" >&5
$as_echo_n "checking whether to use setjmp/longjmp exceptions... " >&6; }
if test "${libgcc_cv_lib_sjlj_exceptions+set}" = set; then :
  $as_echo_n "(cached) " >&6
else
  cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h.  */

void bar ();
void clean (int *);
void foo ()
{
  int i __attribute__ ((cleanup (clean)));
  bar();
}

_ACEOF
CFLAGS_hold=$CFLAGS
CFLAGS="--save-temps -fexceptions"
libgcc_cv_lib_sjlj_exceptions=unknown
if ac_fn_c_try_compile; then :
  if grep _Unwind_SjLj_Resume conftest.s >/dev/null 2>&1; then
    libgcc_cv_lib_sjlj_exceptions=yes
  elif grep _Unwind_Resume conftest.s >/dev/null 2>&1; then
    libgcc_cv_lib_sjlj_exceptions=no
  fi
fi
CFLAGS=$CFLAGS_hold
rm -f conftest*
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: cross build cc1 crashed, while in libgcc stage

Post by sortie »

Uh - what? You'll have to give more context.
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Re: cross build cc1 crashed, while in libgcc stage

Post by blackoil »

os: ubuntu 8.04
host_gcc: 4.3.2
target_gcc: 4.7.2
important-options: without-headers

the cc1 crashed, while compiling libgcc.
the configure script needs to determine what exceptions model, by grep unwind_resume or unwind_sjlj_resume from assembly output.
ac_fn_c_try_compile, maybe crashed here.
User avatar
bluemoon
Member
Member
Posts: 1761
Joined: Wed Dec 01, 2010 3:41 am
Location: Hong Kong

Re: cross build cc1 crashed, while in libgcc stage

Post by bluemoon »

blackoil wrote:os: ubuntu 8.04
Are you kidding me, or it's a very special embedded build?
As of today ubuntu has version 13.04, nearly double the version number you're using.

Anyway, have you check the wiki on building cross compiling toolchain?
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Re: cross build cc1 crashed, while in libgcc stage

Post by blackoil »

yes. My cross build is almost done.

If I don't flag -fexceptions, the conftest passed. Otherwise internal compiler error.
User avatar
sortie
Member
Member
Posts: 931
Joined: Wed Mar 21, 2012 3:01 pm
Libera.chat IRC: sortie

Re: cross build cc1 crashed, while in libgcc stage

Post by sortie »

Right, you probably want to either:

1) Upgrade your current OS (Ubuntu 8.04 is FIVE YEARS OLD AND OBSOLETE)
2) Upgrade your current gcc (see http://wiki.osdev.org/Building_GCC) and then building the cross-compiler with your new gcc.
3) Actually give some real context. You appear to be doing crazy ****.
blackoil
Member
Member
Posts: 146
Joined: Mon Feb 12, 2007 4:45 am

Re: cross build cc1 crashed, while in libgcc stage

Post by blackoil »

I think I missed some target debugging hook functions, that make cc1 crashed unexpectively.
Post Reply