Bug 34794 - build of gcc 4.2.2 fails on AIX 6.1 / libstdc++-v3/libmath/stubs.c:47
Summary: build of gcc 4.2.2 fails on AIX 6.1 / libstdc++-v3/libmath/stubs.c:47
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: target (show other bugs)
Version: 4.2.2
: P3 normal
Target Milestone: 4.2.4
Assignee: Not yet assigned to anyone
URL: http://gcc.gnu.org/ml/gcc-patches/200...
Keywords:
Depends on:
Blocks:
 
Reported: 2008-01-15 10:38 UTC by Rainer Tammer
Modified: 2008-03-13 19:16 UTC (History)
3 users (show)

See Also:
Host: powerpc-ibm-aix6.1.0.0
Target: powerpc-ibm-aix6.1.0.0
Build: powerpc-ibm-aix6.1.0.0
Known to work:
Known to fail:
Last reconfirmed: 2008-01-22 22:15:32


Attachments
AIX 6.1 TL0 SP2 math.h (12.80 KB, text/plain)
2008-01-23 07:12 UTC, Rainer Tammer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rainer Tammer 2008-01-15 10:38:36 UTC
Hello,
the build of gcc 4.2.2 fails on AIX 6.1 during stage3 / libstdc++.

environment:
IBM AIX 6.1 TL0 SP2
XC C/C++ 9.0 
gcc 4.2.2 compiled on AIX 5.3

=====> stage_current: stage3

gmake[4]: Entering directory `/opt/freeware/src/packages/BUILD/gcc-build/powerpc-ibm-aix6.1.0.0/libstdc++-v3/libmath'
/opt/freeware/bin/bash ../libtool --tag CC --mode=compile /opt/freeware/src/packages/BUILD/gcc-build/./gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./gcc/ -B/opt/freeware/powerpc-ibm-aix6.1.0.0/bin/ -B/opt/freeware/powerpc-ibm-aix6.1.0.0/lib/ -isystem /opt/freeware/powerpc-ibm-aix6.1.0.0/include -isystem /opt/freeware/powerpc-ibm-aix6.1.0.0/sys-include -DHAVE_CONFIG_H -I. -I../../../../gcc-4.2.2/libstdc++-v3/libmath -I..     -O2 -O2 -I/opt/freeware/include  -c -o stubs.lo ../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c
/opt/freeware/src/packages/BUILD/gcc-build/./gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./gcc/ -B/opt/freeware/powerpc-ibm-aix6.1.0.0/bin/ -B/opt/freeware/powerpc-ibm-aix6.1.0.0/lib/ -isystem /opt/freeware/powerpc-ibm-aix6.1.0.0/include -isystem /opt/freeware/powerpc-ibm-aix6.1.0.0/sys-include -DHAVE_CONFIG_H -I. -I../../../../gcc-4.2.2/libstdc++-v3/libmath -I.. -O2 -O2 -I/opt/freeware/include -c ../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c -o stubs.o
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:47: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:48: error: conflicting types for 'fabs'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'fabs':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:49: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:49: error: (Each undeclared identifier is reported only once
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:49: error: for each function it appears in.)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:64: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:65: error: conflicting types for 'acos'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'acos':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:66: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:81: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:82: error: conflicting types for 'asin'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'asin':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:83: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:98: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:99: error: conflicting types for 'atan'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'atan':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:100: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:115: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:115: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:116: error: conflicting types for 'atan2'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'atan2':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:117: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:117: error: 'y' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:132: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:133: error: conflicting types for 'ceil'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'ceil':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:134: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:149: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:150: error: conflicting types for 'cos'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'cos':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:151: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:166: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:167: error: conflicting types for 'cosh'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'cosh':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:168: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:183: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:184: error: conflicting types for 'exp'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'exp':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:185: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:200: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:201: error: conflicting types for 'floor'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'floor':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:202: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:217: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:217: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:218: error: conflicting types for 'fmod'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'fmod':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:219: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:219: error: 'y' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:235: error: redefinition of 'frexpl'
/opt/freeware/src/packages/BUILD/gcc-build/./gcc/include/math.h:576: error: previous definition of 'frexpl' was here
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:251: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:252: error: conflicting types for 'sqrt'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'sqrt':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:253: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:285: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:285: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:286: error: conflicting types for 'hypot'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'hypot':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:287: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:287: error: 'y' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:308: error: redefinition of 'ldexpl'
/opt/freeware/src/packages/BUILD/gcc-build/./gcc/include/math.h:581: error: previous definition of 'ldexpl' was here
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:324: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:325: error: conflicting types for 'log'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'log':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:326: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:341: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:342: error: conflicting types for 'log10'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'log10':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:343: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:363: error: redefinition of 'modfl'
/opt/freeware/src/packages/BUILD/gcc-build/./gcc/include/math.h:587: error: previous definition of 'modfl' was here
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:383: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:383: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:384: error: conflicting types for 'pow'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'pow':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:385: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:385: error: 'y' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:400: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:401: error: conflicting types for 'sin'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'sin':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:402: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:417: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:418: error: conflicting types for 'sinh'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'sinh':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:419: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:434: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:435: error: conflicting types for 'tan'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'tan':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:436: error: 'x' undeclared (first use in this function)
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: At top level:
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:451: error: expected declaration specifiers or '...' before '(' token
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:452: error: conflicting types for 'tanh'
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c: In function 'tanh':
../../../../gcc-4.2.2/libstdc++-v3/libmath/stubs.c:453: error: 'x' undeclared (first use in this function)
gmake[4]: *** [stubs.lo] Error 1
gmake[4]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/powerpc-ibm-aix6.1.0.0/libstdc++-v3/libmath'
gmake[3]: *** [all-recursive] Error 1
gmake[3]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/powerpc-ibm-aix6.1.0.0/libstdc++-v3'
gmake[2]: *** [all] Error 2
gmake[2]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/powerpc-ibm-aix6.1.0.0/libstdc++-v3'
gmake[1]: *** [all-target-libstdc++-v3] Error 2
gmake[1]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake: *** [bootstrap-lean] Error 2
Bad exit status from /tmp/rpm-tmp.22206 (%build)

This is the tmp rpm build script:

#!/bin/sh

RPM_SOURCE_DIR="/opt/freeware/src/packages/SOURCES"
RPM_BUILD_DIR="/opt/freeware/src/packages/BUILD"
RPM_OPT_FLAGS="-O2 -fsigned-char"
RPM_ARCH="ppc"
RPM_OS="aix"
export RPM_SOURCE_DIR RPM_BUILD_DIR RPM_OPT_FLAGS RPM_ARCH RPM_OS
RPM_DOC_DIR="/opt/freeware/doc"
export RPM_DOC_DIR
RPM_PACKAGE_NAME="gcc"
RPM_PACKAGE_VERSION="4.2.2"
RPM_PACKAGE_RELEASE="2"
export RPM_PACKAGE_NAME RPM_PACKAGE_VERSION RPM_PACKAGE_RELEASE
RPM_BUILD_ROOT="/tmp/gcc-4.2.2-root"
export RPM_BUILD_ROOT

set -x
umask 022
cd /opt/freeware/src/packages/BUILD
cd gcc-4.2.2
# speed up the configure processes...
export CONFIG_SHELL=/opt/freeware/bin/bash
export CONFIGURE_ENV_ARGS=/opt/freeware/bin/bash

cd ..
rm -rf gcc-build
mkdir gcc-build
cd gcc-build
CC=cc \
BOOT_CFLAGS="-O2 -I/opt/freeware/include" \
CFLAGS="-O2 -I/opt/freeware/include" \
CXXFLAGS="-O2 -I/opt/freeware/include" \
LIBCFLAGS="-O2 -I/opt/freeware/include" \
LIBCXXFLAGS="-O2 -I/opt/freeware/include -fno-implicit-templates" \
LDFLAGS="-L/opt/freeware/lib" \
../gcc-4.2.2/configure \
--with-as=/usr/bin/as \
--with-ld=/usr/bin/ld \
--enable-languages="c,c++,fortran" \
--prefix=/opt/freeware \
--enable-threads \
--enable-version-specific-runtime-libs \
--disable-nls \
--enable-decimal-float=dpd \
--host=powerpc-ibm-aix6.1.0.0

ulimit -d unlimited
ulimit -s unlimited
gmake -j 1 \
	CFLAGS='-O2 -I/opt/freeware/include' \
	CXXFLAGS='-O2 -I/opt/freeware/include' \
	LIBCFLAGS='-O2 -I/opt/freeware/include' \
	LIBCXXFLAGS='-O2 -I/opt/freeware/include -fno-implicit-templates' \
	BOOT_CFLAGS='-O2 -I/opt/freeware/include' \
	bootstrap-lean

# remove the "-print-multi-os-directory" flag...
sed -e "s/MULTIOSDIR = \`\$(CC) \$(LIBCFLAGS) -print-multi-os-directory\`/MULTIOSDIR = ./" libiberty/Makefile > Makefile.tmp
mv -f Makefile.tmp libiberty/Makefile


exit 0

Is this a known problem ?


Bye
  Rainer
Comment 1 Paolo Carlini 2008-01-15 10:45:41 UTC
Hi David, can you have a look at this issue? Thanks.
Comment 2 Rainer Tammer 2008-01-15 11:28:08 UTC
Hello,
currently I am working with Ralf Wildenhues (libtool, autconf, automake, config) to get AIX 6.1 in. The libtool (branch-1.5 / HEAD) and config.guess now recognizes AIX 6.1 as -> powerpc-ibm-aix6.1.0.0.

I have not yet regenerated the complete build environment of gcc 4.2.2 with the above tools. As gcc is a very large project I am not comfortable in rebuilding the whole shebang... 

Bye
  Rainer
Comment 3 Rainer Tammer 2008-01-21 11:14:05 UTC
Hello,
any news ? 

Do you need further information / tests ?

Bye
  Rainer
Comment 4 David Edelsohn 2008-01-22 22:15:32 UTC
libsdc++ does not appear to be configured correctly on AIX 6.1.  libstdc++-3/libmath/stubs.c and /usr/include/math.h are not interacting correctly and functions, such as fabsl, are getting redefined by math.h, causing problems.
Comment 5 Rainer Tammer 2008-01-23 07:12:31 UTC
Created attachment 15004 [details]
AIX 6.1 TL0 SP2 math.h
Comment 6 Rainer Tammer 2008-01-23 07:13:06 UTC
Hallo,
this is exactly what I feared. But unfortunately I do not know exactly how to fix this. I have attached the math.h from AIX 6.1. Maybe you can have a look at the header and find a quick fix ?

Bye
  Rainer
Comment 7 David Edelsohn 2008-01-24 17:23:39 UTC
I have upgraded libtool and all of the configure scripts in mainline.

The problem with stubs is because the libstdc++-v3 configure machinery is not recognizing that AIX libm already provides all of those functions, as it detects with AIX 5.  I am continuing to investigate.
Comment 8 David Edelsohn 2008-01-24 19:12:49 UTC
AIX 6 math.h "optimizations" completely confuse GCC configure looking for ISO C99 and long double support.  It looks like this will require fix-includes magic.
Comment 9 David Edelsohn 2008-01-25 02:53:30 UTC
Replacing gcc's "include-fixed" version of math.h with the include-fixed version from AIX 5.3 gets farther.  AIX 6 math.h is going to need to be tweaked and we need to figure out what parts of the file need to be commented out.  I suspect all of the "inlined" functions.
Comment 10 Rainer Tammer 2008-01-25 07:13:01 UTC
Hello,
I can try with the updated source and the AIX 5.3 math.h ...

What is the correct SNV tag for the "updated" version or did you only update you local copy ??

Bye
  Rainer
Comment 11 David Edelsohn 2008-01-25 13:58:25 UTC
The AIX 5.3 fixed math.h does not make the build completely succeed, it just gets farther.

GCC currrent mainline has the other changes.
Comment 12 David Edelsohn 2008-01-26 16:27:12 UTC
Subject: Bug 34794

Author: dje
Date: Sat Jan 26 16:26:27 2008
New Revision: 131865

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131865
Log:
        PR target/34794
        * config.gcc: Separate AIX 5.3 from AIX 6.1.
        * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
        __LONGDOUBLE128 too.
        * config/rs6000/aix61.h: New file.

Added:
    trunk/gcc/config/rs6000/aix61.h
Modified:
    trunk/gcc/ChangeLog
    trunk/gcc/config.gcc
    trunk/gcc/config/rs6000/rs6000-c.c

Comment 13 David Edelsohn 2008-01-26 16:28:53 UTC
Subject: Bug 34794

Author: dje
Date: Sat Jan 26 16:28:03 2008
New Revision: 131866

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=131866
Log:
        PR target/34794
        * config/os/aix/os_defines.h: Define __COMPATMATH__.

Modified:
    trunk/libstdc++-v3/ChangeLog
    trunk/libstdc++-v3/config/os/aix/os_defines.h

Comment 14 Rainer Tammer 2008-01-29 07:03:56 UTC
Hello,
I just tested HEAD on AIX 6.1 and you are right ... the build crashes here:

/opt/freeware/bin/bash ../../gcc-4.3.0/gcc/../move-if-change tmp-attr.h insn-attr.h
echo timestamp > s-attr
/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/xgcc -B/opt/freeware/src/packages/BUILD/gcc-build/./prev-gcc/ -B/opt
/freeware/powerpc-ibm-aix6.1.0.0/bin/ -c   -O2 -I/opt/freeware/include -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-protot
ypes -Wmissing-prototypes -Wold-style-definition -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros
                               -Wno-overlength-strings -Werror -fno-common   -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.3.0/gcc
 -I../../gcc-4.3.0/gcc/. -I../../gcc-4.3.0/gcc/../include -I../../gcc-4.3.0/gcc/../libcpp/include -I/opt/freeware/include
-I/opt/freeware/include -I../../gcc-4.3.0/gcc/../libdecnumber -I../../gcc-4.3.0/gcc/../libdecnumber/dpd -I../libdecnumber
   insn-attrtab.c -o insn-attrtab.o
../../gcc-4.3.0/gcc/config/rs6000/rs6000.md: In function 'internal_dfa_insn_code':
../../gcc-4.3.0/gcc/config/rs6000/rs6000.md:148: internal compiler error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
gmake[3]: *** [insn-attrtab.o] Error 1
gmake[3]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build/gcc'
gmake[2]: *** [all-stage2-gcc] Error 2
gmake[2]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake[1]: *** [stage2-bubble] Error 2
gmake[1]: Leaving directory `/opt/freeware/src/packages/BUILD/gcc-build'
gmake: *** [bootstrap-lean] Error 2
Bad exit status from /tmp/rpm-tmp.5075 (%build)


Is this the problem you mentioned ?? 
The 4.2.2. release did not crash on this place.

Bye
  Rainer
Comment 15 David Edelsohn 2008-01-29 14:40:11 UTC
First, mainline bootstraps fully for me on AIX 6.1.  I am closing this bug about AIX building libstdc++ as resolved in GCC 4.3.

Second, "... and you are right" is completely meaningless without context.  I have no idea what you are referring to.  Make sure that the process limits are large enough.  Building on AIX 6.1, I did experience random system call failures during the build, but simply restarted and the build completed.

If you can provide a more detailed and repeatable failure, please open a new GCC bug.
Comment 16 David Edelsohn 2008-01-29 14:42:52 UTC
By the way, I am using a recent GCC compiled for AIX 5.3 with the "fixed" headers removed as the bootstrap compiler on AIX 6.1.
Comment 17 Rainer Tammer 2008-01-29 15:17:01 UTC
I have used IBM XL C/C++ 9.0 to bootstrap the gcc 4.3 compiler. I will test the build with the gcc 4.2.2 build from www.perzl.org (Mr. Perzl from IBM Germany) for the initial stage1.

Thanks for your help.
Comment 18 David Edelsohn 2008-01-29 15:22:56 UTC
IBM XLC has had problems bootstrapping GCC.  I am surprised you got to libstdc++ for GCC 4.2.2.  If you were using XLC, then that likely is the problem and it miscompiled the stage1 GCC compiler.
Comment 19 David Edelsohn 2008-03-13 19:04:20 UTC
Subject: Bug 34794

Author: dje
Date: Thu Mar 13 19:03:23 2008
New Revision: 133184

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133184
Log:
        Backport from mainline:
        2008-01-26  David Edelsohn  <edelsohn@gnu.org>

        PR target/34794
        * config/os/aix/os_defines.h: Define __COMPATMATH__.

Modified:
    branches/gcc-4_2-branch/libstdc++-v3/ChangeLog
    branches/gcc-4_2-branch/libstdc++-v3/config/os/aix/os_defines.h

Comment 20 David Edelsohn 2008-03-13 19:12:27 UTC
Subject: Bug 34794

Author: dje
Date: Thu Mar 13 19:11:43 2008
New Revision: 133186

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=133186
Log:
2008-01-26  David Edelsohn  <edelsohn@gnu.org>

        PR target/34794
        * config.gcc: Separate AIX 5.3 from AIX 6.1.
        * config/rs6000/rs6000-c.c (rs6000_cpu_cpp_builtins): Define
        __LONGDOUBLE128 too.
        * config/rs6000/aix61.h: New file.

Added:
    branches/gcc-4_2-branch/gcc/config/rs6000/aix61.h
Modified:
    branches/gcc-4_2-branch/gcc/ChangeLog
    branches/gcc-4_2-branch/gcc/config.gcc
    branches/gcc-4_2-branch/gcc/config/rs6000/rs6000-c.c

Comment 21 David Edelsohn 2008-03-13 19:16:09 UTC
Backported patches to GCC 4.2 branch for GCC 4.2.4 release.