diff options
author | Doug Evans <dje@gnu.org> | 1994-06-15 08:03:05 +0000 |
---|---|---|
committer | Doug Evans <dje@gnu.org> | 1994-06-15 08:03:05 +0000 |
commit | f6cdc7ea0f386764375769723f9693d8f9db9355 (patch) | |
tree | 486fbf1eab9f784404e6a1352d84fed39c9e7e06 | |
parent | 08b28cd3a28cb9e95f14968cfd16f666e025c6a3 (diff) | |
download | gcc-f6cdc7ea0f386764375769723f9693d8f9db9355.zip gcc-f6cdc7ea0f386764375769723f9693d8f9db9355.tar.gz gcc-f6cdc7ea0f386764375769723f9693d8f9db9355.tar.bz2 |
(multilib.h, stmp-multilib, install-multilib): New targets.
(gcc.o): Depend on multilib.h.
(clean): Remove multilib.h and tmpmultilib*.
From-SVN: r7490
-rw-r--r-- | gcc/Makefile.in | 59 |
1 files changed, 58 insertions, 1 deletions
diff --git a/gcc/Makefile.in b/gcc/Makefile.in index 28c1c2a..00c0a17 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -819,6 +819,50 @@ libgcc.a: $(LIBGCC1) $(LIBGCC2) # so that libgcc.a itself remains nonexistent if compilation is aborted. mv tmplibgcc.a libgcc.a +# Use the genmultilib shell script to generate the information the gcc +# driver program needs to select the library directory based on the +# switches. +multilib.h: $(srcdir)/genmultilib config.status + $(SHELL) $(srcdir)/genmultilib "$(MULTILIB_OPTIONS)" \ + "$(MULTILIB_DIRNAMES)" "$(MULTILIB_MATCHES)" > multilib.h + +# Build multiple copies of libgcc.a, one for each target switch. +stmp-multilib: $(LIBGCC1) libgcc2.c libgcc2.ready $(CONFIG_H) \ + $(LIB2FUNCS_EXTRA) machmode.h longlong.h gbl-ctors.h config.status + for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ + dir=`echo $$i | sed -e 's/;.*$$//'`; \ + flags=`echo $$i | sed -e 's/^[^;]*;//' -e 's/@/ -/g'`; \ + rm -f $${dir}/libgcc.a $(LIBGCC2); \ + $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ + AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ + HOST_PREFIX="$(HOST_PREFIX)" HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" $(LIBGCC2); \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + if [ x$(LIBGCC1) != xlibgcc1-asm.a ]; \ + then true; \ + else (rm -f $(LIBGCC1); \ + $(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ + AR="$(AR)" AR_FLAGS="$(AR_FLAGS)" \ + HOST_PREFIX="$(HOST_PREFIX)" \ + HOST_PREFIX_1="$(HOST_PREFIX_1)" \ + LIBGCC2_CFLAGS="$(LIBGCC2_CFLAGS) $${flags}" $(LIBGCC1) ) \ + fi; \ + if [ $$? -eq 0 ] ; then true; else exit 1; fi; \ + rm -rf tmpcopy; \ + mkdir tmpcopy; \ + if [ x$(LIBGCC1) != x ]; \ + then (cd tmpcopy; $(AR) x ../$(LIBGCC1)); \ + else true; \ + fi; \ + (cd tmpcopy; $(AR) x ../$(LIBGCC2)); \ + (cd tmpcopy; $(AR) $(AR_FLAGS) ../tmplibgcc.a *.o); \ + rm -rf libgcc2.a tmpcopy; \ + if $(RANLIB_TEST) ; then $(RANLIB) tmplibgcc.a; else true; fi; \ + if [ -d $${dir} ]; then true; else mkdir $${dir}; fi; \ + mv tmplibgcc.a $${dir}/libgcc.a; \ + done + touch stmp-multilib + objc-runtime: libobjc.a # Build the Objective C runtime library. @@ -924,7 +968,7 @@ c-common.o : c-common.c $(CONFIG_H) $(TREE_H) c-tree.h c-lex.h flags.h # Language-independent files. -gcc.o: gcc.c $(CONFIG_H) config.status +gcc.o: gcc.c $(CONFIG_H) multilib.h config.status $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \ -DSTANDARD_STARTFILE_PREFIX=\"$(libdir)/\" \ -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-lib/\" \ @@ -1726,6 +1770,7 @@ clean: mostlyclean bytecode.clean lang.clean # Delete the include directory. -rm -rf stmp-* include objc-headers -rm -f */stmp-* + -rm -f multilib.h tmpmultilib* # Delete all files that users would normally create # while building and installing GCC. @@ -1901,6 +1946,18 @@ install-libgcc: libgcc.a install-dir chmod a-x $(libsubdir)/libgcc.a; \ else true; fi +# Install multiple versions of libgcc.a. +install-multilib: stmp-multilib install-dir + for i in `$(GCC_FOR_TARGET) --print-multi-lib`; do \ + dir=`echo $$i | sed -e 's/;.*$$//'`; \ + if [ -d $(libsubdir)/$${dir} ]; then true; else mkdir $(libsubdir)/$${dir}; fi; \ + rm -f $(libsubdir)/$${dir}/libgcc.a; \ + $(INSTALL_DATA) $${dir}/libgcc.a $(libsubdir)/$${dir}/libgcc.a; \ + if $(RANLIB_TEST); then \ + (cd $(libsubdir)/$${dir}; $(RANLIB) libgcc.a); else true; fi; \ + chmod a-x $(libsubdir)/$${dir}/libgcc.a; \ + done + # Install the objc run time library. install-libobjc: libobjc.a install-dir -if [ -f libobjc.a ] ; then \ |