Hi,
trying to build gcc-4.4.0 breaks on AIX-5.3 (4.3.3 build worked fine with same
setup),
the small patch below works around the AIX limitations:
/usr/local/bin/bash ./libtool --tag=CC --mode=link
/scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/./gcc/xgcc ...
libtool: link: /scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/./gcc/nm -B
-X32_64 -BCpg .libs/backtrace.o .libs/compile_options.o ...
libtool: link: /scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/./gcc/xgcc
-B/scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/./gcc/ ...
./libtool: line 7838:
/scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/./gcc/xgcc: Arg list too long
gmake[3]: *** [libgfortran.la] Error 126
gmake[3]: Leaving directory
`/scr/os-aix53/koenig/gcc-4.4.0-1/ARENA/32/powerpc-ibm-aix5.3.0.0/libgfortran'
the actual command line is ~11 Kbytes.
part of the problem is the large amount of environment variables
which sum up with the arg list on AIX (from within make/build):
env | wc
232 540 15090
here is a list of the environment vars before calling libtool in make
with the lenght of this var first, sorted
...
345 CC_FOR_TARGET=...
355 GFORTRAN_FOR_TARGET=...
917 CXX=...
928 CXX_FOR_TARGET=...
4668 MAKEFLAGS=w -- DESTDIR= RPATH_ENVVAR=LD_LIBRARY_PATH
TARGET_SUBDIR=powerpc-ibm-aix5.3.0.0 bindir=/usr/local/gcc-4.4.0/bin ...
just cleaning up MAKEFLAGS (saving 4.5K) is enough (for now;) to get libtool/gcc
running and exec'ing with that long arg list:
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
--- gcc-4.4.0-1/ARENA/32/powerpc-ibm-aix5.3.0.0/libgfortran/Makefile~
2009-04-21 23:47:30.464236803 +0200
+++ gcc-4.4.0-1/ARENA/32/powerpc-ibm-aix5.3.0.0/libgfortran/Makefile
2009-04-22 11:34:28.867828549 +0200
@@ -1776,9 +1776,9 @@
rm -f "$${dir}/so_locations"; \
done
libgfortran.la: $(libgfortran_la_OBJECTS) $(libgfortran_la_DEPENDENCIES)
- $(libgfortran_la_LINK) -rpath $(toolexeclibdir)
$(libgfortran_la_LDFLAGS) $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD)
$(LIBS)
+ MAKEFLAGS="" $(libgfortran_la_LINK) -rpath $(toolexeclibdir)
$(libgfortran_la_LDFLAGS) $(libgfortran_la_OBJECTS) $(libgfortran_la_LIBADD)
$(LIBS)
libgfortranbegin.la: $(libgfortranbegin_la_OBJECTS)
$(libgfortranbegin_la_DEPENDENCIES)
- $(LINK) -rpath $(myexeclibdir) $(libgfortranbegin_la_LDFLAGS)
$(libgfortranbegin_la_OBJECTS) $(libgfortranbegin_la_LIBADD) $(LIBS)
+ MAKEFLAGS="" $(LINK) -rpath $(myexeclibdir)
$(libgfortranbegin_la_LDFLAGS) $(libgfortranbegin_la_OBJECTS)
$(libgfortranbegin_la_LIBADD) $(LIBS)
mostlyclean-compile:
-rm -f *.$(OBJEXT)
--- 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ------ 8< ---
thanks,
Harald Koenig
--
"I hope to die ___ _____
before I *have* to use Microsoft Word.", 0--,| /OOOOOOO\
Donald E. Knuth, 02-Oct-2001 in Tuebingen. <_/ / /OOOOOOOOOOO\
\ \/OOOOOOOOOOOOOOO\
\ OOOOOOOOOOOOOOOOO|//
Harald Koenig \/\/\/\/\/\/\/\/\/
science+computing ag // / \\ \
[email protected] ^^^^^ ^^^^^
--
Vorstand/Board of Management:
Dr. Bernd Finkbeiner, Dr. Roland Niemeier,
Dr. Arno Steitz, Dr. Ingrid Zech
Vorsitzender des Aufsichtsrats/
Chairman of the Supervisory Board:
Michel Lepert
Sitz/Registered Office: Tuebingen
Registergericht/Registration Court: Stuttgart
Registernummer/Commercial Register No.: HRB 382196