This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Fortran - trunk, committed] Use auxiliary archives to solve excessive command line lengths with libtool (libf2c).
- To: gcc-patches at gcc dot gnu dot org
- Subject: [Fortran - trunk, committed] Use auxiliary archives to solve excessive command line lengths with libtool (libf2c).
- From: Toon Moene <toon at moene dot indiv dot nluug dot nl>
- Date: Sat, 20 Oct 2001 18:01:56 +0200
- Organization: Moene Computational Physics, Maartensdijk, The Netherlands
L.S.,
This is essentially the patch [attached] that David Edelsohn proposed to
solve the problem mentioned in the subject of this mail, which occurred
specifically on AIX with its multilibbing.
Bootstrapped, checked [Fortran only] and installed on
alphaev6-unknown-linux-gnu because I couldn't get several libf2c/libF77
functions compiled on i686 due to internal errors in simplify_gen_sub of
simplify_rtx.c.
Thanks, David !
--
Toon Moene - mailto:toon@moene.indiv.nluug.nl - phoneto: +31 346 214290
Saturnushof 14, 3738 XG Maartensdijk, The Netherlands
Maintainer, GNU Fortran 77: http://gcc.gnu.org/onlinedocs/g77_news.html
Join GNU Fortran 95: http://g95.sourceforge.net/ (under construction)
2001-10-20 David Edelsohn <dje@watson.ibm.com>
* Makefile.in: Do not include SUBDIRS in objlist. Create
libg2c.so from F2CEXT and SUBDIRS archives.
* libF77/Makefile.in: Create archive.
* libI77/Makefile.in: Same.
* libU77/Makefile.in: Same.
*** Makefile.in.orig Sat Oct 20 13:50:46 2001
--- Makefile.in Sat Oct 20 13:53:25 2001
*************** $(LIBG2C): s-libi77 s-libf77 s-libu77 s-
*** 143,156 ****
rm -f objlist ;\
touch objlist ;\
- for i in $(SUBDIRS) ;\
- do \
- (cd $$i && $(MAKE) $(FLAGS_TO_PASS) objlist) ;\
- done ;\
- objs="`cat objlist`" ;\
for i in $(F2CEXT); do objs="$$objs libE77/L$$i.lo"; done ;\
echo -n $$objs > objlist
$(LIBTOOL) --mode=link $(CC) -o $@ \
-version-info $(VERSION_MAJOR):$(VERSION_MINOR):$(VERSION_SUB) \
! -rpath $(prefix)/lib `cat objlist` -lc -lm
i77:
--- 143,151 ----
rm -f objlist ;\
touch objlist ;\
for i in $(F2CEXT); do objs="$$objs libE77/L$$i.lo"; done ;\
echo -n $$objs > objlist
$(LIBTOOL) --mode=link $(CC) -o $@ \
-version-info $(VERSION_MAJOR):$(VERSION_MINOR):$(VERSION_SUB) \
! -rpath $(prefix)/lib `cat objlist` libF77.la libI77.la libU77.la -lc -lm
i77:
*** libF77/Makefile.in.orig Sat Oct 20 13:50:47 2001
--- libF77/Makefile.in Sat Oct 20 14:54:02 2001
*************** ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_D
*** 53,56 ****
--- 53,58 ----
@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
+ LINK = @LIBTOOL@ --mode=link $(CC) $(ALL_CFLAGS) -o $@
+
MISC = F77_aloc.lo VersionF.lo s_rnge.lo abort_.lo getarg_.lo iargc_.lo\
getenv_.lo signal_.lo s_stop.lo s_paus.lo system_.lo cabs.lo\
*************** OBJS = $(MISC) $(POW) $(CX) $(DCX) $(REA
*** 81,91 ****
all: ../s-libf77 ../libfrtbegin.a
! ../s-libf77: $(OBJS)
echo timestamp > ../s-libf77
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! x=`echo $$i` ;\
! objs="$$objs libF77/$$x" ;\
done ; \
echo -n $$objs > ../objlist
--- 83,95 ----
all: ../s-libf77 ../libfrtbegin.a
! ../s-libf77: ../libF77.la
echo timestamp > ../s-libf77
+ ../libF77.la: $(OBJS)
+ $(LINK) $(OBJS)
+
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! objs="$$objs libF77/$$i" ;\
done ; \
echo -n $$objs > ../objlist
*** libI77/Makefile.in.orig Sat Oct 20 13:50:47 2001
--- libI77/Makefile.in Sat Oct 20 14:54:20 2001
*************** ALL_CFLAGS = -I. -I$(srcdir) -I$(G2C_H_D
*** 52,55 ****
--- 52,57 ----
@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs -DAllow_TYQUAD $(ALL_CFLAGS) $<
+ LINK = @LIBTOOL@ --mode=link $(CC) $(ALL_CFLAGS) -o $@
+
OBJS = VersionI.lo backspace.lo close.lo dfe.lo dolio.lo due.lo endfile.lo err.lo \
fmt.lo fmtlib.lo iio.lo ilnw.lo inquire.lo lread.lo lwrite.lo open.lo \
*************** OBJS = VersionI.lo backspace.lo close.lo
*** 60,70 ****
all: ../s-libi77
! ../s-libi77: $(OBJS)
echo timestamp > ../s-libi77
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! x=`echo $$i` ;\
! objs="$$objs libI77/$$x" ;\
done ; \
echo -n $$objs > ../objlist
--- 62,74 ----
all: ../s-libi77
! ../s-libi77: ../libI77.la
echo timestamp > ../s-libi77
+ ../libI77.la: $(OBJS)
+ $(LINK) $(OBJS)
+
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! objs="$$objs libI77/$$i" ;\
done ; \
echo -n $$objs > ../objlist
*** libU77/Makefile.in.orig Sat Oct 20 13:50:47 2001
--- libU77/Makefile.in Sat Oct 20 14:54:38 2001
*************** G77DIR = ../../../gcc/
*** 56,59 ****
--- 56,61 ----
@LIBTOOL@ --mode=compile $(CC) -c -DSkip_f2c_Undefs $(ALL_CFLAGS) $<
+ LINK = @LIBTOOL@ --mode=link $(CC) $(ALL_CFLAGS) -o $@
+
OBJS = VersionU.lo gerror_.lo perror_.lo ierrno_.lo itime_.lo time_.lo \
unlink_.lo fnum_.lo getpid_.lo getuid_.lo getgid_.lo kill_.lo rand_.lo \
*************** SRCS = Version.c gerror_.c perror_.c ie
*** 79,89 ****
all: ../s-libu77
! ../s-libu77: $(OBJS)
echo timestamp > ../s-libu77
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! x=`echo $$i` ;\
! objs="$$objs libU77/$$x" ;\
done ; \
echo -n $$objs > ../objlist
--- 81,93 ----
all: ../s-libu77
! ../s-libu77: ../libU77.la
echo timestamp > ../s-libu77
+ ../libU77.la: $(OBJS)
+ $(LINK) $(OBJS)
+
objlist:
objs="`cat ../objlist`" ; for i in $(OBJS) ; do \
! objs="$$objs libU77/$$i" ;\
done ; \
echo -n $$objs > ../objlist