This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Problem bootstrapping egcs on powerpc-ibm-aix4.2.1.0


Hi,
after a major blunder i have to install egcs and all aother GNU utilities
from scratch, using the native cc for bootstrapping. This isn't all that
easy because somehow the alloca substitution ceased to work (it worked
with the 981130 snapshot):

        cc  -DIN_GCC -DHAIFA       -DHAVE_CONFIG_H  -o cccp cccp.o cexp.o intl.o prefix.o version.o  mbchar.o  obstack.o
alloca.o      -lld ../libiberty/libiberty.a
ld: 0711-317 ERROR: Undefined symbol: .alloca
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more information.
make: 1254-004 The error code from the last command is 8.

Indeed, alloca.o does not contain any public symbols, and definitely no .alloca.
I worked around this by specifying CFLAGS='-ma', an excerpt from `man cc' for
information:

        -ma       Generate inline calls to the "alloca" function as if
                  "#pragma alloca" directives were in the source file.

This almost works (generates a lot of stupid warnings from cc), until xgcc is
invoked, cc1 is of course unwilling to accept the `-ma' flag:

 echo ${name};  ./xgcc -B./ -B/home/lis5p/t384/gnu/powerpc-ibm-aix4.2.1.0/bin/
-I/home/lis5p/t384/gnu/powerpc-ibm-aix4.2.1.0/include -O2   -DIN_GCC -DHAIFA    -ma -I./include   -g1  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED    -I. -I. -I./config -I./../include -c -DL${name}  -DUSE_COLLECT2 ./libgcc2.c -o ${name}.o; 
if [ $? -eq 0 ] ; then true; else exit 1; fi;  ar rc tmplibgcc2.a ${name}.o;  rm -f ${name}.o;  done
_muldi3
cc1: Invalid option `a'
make: 1254-004 The error code from the last command is 1.

I hope i can finally finish the bootstrapping with alternately using
CFLAGS=-ma and CFLAGS=''.

The correct solution would be to create a separate set of flags for the
compiler used in bootstrapping and for the freshly compiled gcc itself.
I havn't checked whether the *_FOR_TARGET set would do this, however, i believe
CFLAGS will be used in the second and third pass unchanged.


Just for information (the AIX tools suck):

        if [ -d /usr/include ];  then  CC="./xgcc -B./ -B/home/lis5p/t384/gnu/powerpc-ibm-aix4.2.1.0/bin/
-I/home/lis5p/t384/gnu/powerpc-ibm-aix4.2.1.0/include  -DIN_GCC -DHAIFA    -ma -I./include     -I. -I. -Iinclude
-I/usr/include";  export CC;  /bin/sh ./scan-types.sh "." >tmp-deduced.h;  mv tmp-deduced.h deduced.h;  else  touch
deduced.h;  fi
grep: 0652-226 Maximum line length of 2048 exceeded.


Regards

J.Pietschmann
-- 

----------------------------------------------------------------------
Zuercher Kantonalbank ZKB        Internet : joerg.pietschmann@zkb.ch
Neue Hard 9                      Telefon  : ++41 01-275 85 03 
Postfach                         Fax      : ++41 01-275 80 34
CH-8010 Zuerich
----------------------------------------------------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]