[Bug libgcc/57058] New: Bootstrap problems on AIX (libgcc configure, 64-bit)
schnetter at gmail dot com
gcc-bugzilla@gcc.gnu.org
Wed Apr 24 17:49:00 GMT 2013
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57058
Bug #: 57058
Summary: Bootstrap problems on AIX (libgcc configure, 64-bit)
Classification: Unclassified
Product: gcc
Version: 4.7.3
Status: UNCONFIRMED
Severity: normal
Priority: P3
Component: libgcc
AssignedTo: unassigned@gcc.gnu.org
ReportedBy: schnetter@gmail.com
I am trying to bootstrap gcc 4.7.3 on AIX. Both xlc and gcc 4.2.0 are
pre-installed. The main issue I encountered is that I need to use the option
"-maix64" when building with gcc, as I otherwise encounter assembler errors
about ".llong" (but that's fine since I want to use 64 bits anyway).
I encountered a problem when the stage 1 compiler tries to build libgcc. The
stage 1 compiler still needs to use -maix64. However, libgcc's configure script
seems to ignore all ways in which I could add this to CFLAGS (BOOT_CFLAGS,
CFLAGS_FOR_TARGET). The symptoms are errors about ".llong", since the stage 1
compiler doesn't use -maix64.
I believe this is due to an error in the following lines from libgcc's
configure.ac:
{{{
AC_CACHE_CHECK([whether to use setjmp/longjmp exceptions],
[libgcc_cv_lib_sjlj_exceptions],
[AC_LANG_CONFTEST(
[AC_LANG_SOURCE([
void bar ();
void clean (int *);
void foo ()
{
int i __attribute__ ((cleanup (clean)));
bar();
}
])])
CFLAGS_hold=$CFLAGS
CFLAGS="--save-temps -fexceptions"
libgcc_cv_lib_sjlj_exceptions=unknown
AS_IF([ac_fn_c_try_compile],
[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])
CFLAGS=$CFLAGS_hold
rm -f conftest*
])
}}}
Note that these lines unconditionally set CFLAGS before compiling a test
program. Instead, they should presumably be adding to CFLAGS. When changing the
offending line to
CFLAGS="$CFLAGS --save-temps -fexceptions"
the bootstrap went past this problem.
More information about the Gcc-bugs
mailing list