From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25136 invoked by alias); 3 Dec 2002 16:31:30 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 25109 invoked from network); 3 Dec 2002 16:31:24 -0000 Received: from unknown (HELO mailout6-0.nyroc.rr.com) (24.92.226.125) by sources.redhat.com with SMTP; 3 Dec 2002 16:31:24 -0000 Received: from doctormoo (syr-24-24-16-193.twcny.rr.com [24.24.16.193]) by mailout6-0.nyroc.rr.com (8.11.6/RoadRunner 1.20) with ESMTP id gB3GVHk15802; Tue, 3 Dec 2002 11:31:17 -0500 (EST) Received: from neroden by doctormoo with local (Exim 3.36 #1 (Debian)) id 18JFwP-00024r-00; Tue, 03 Dec 2002 11:30:33 -0500 Date: Tue, 03 Dec 2002 08:31:00 -0000 To: gcc-patches@gcc.gnu.org, gdb-patches@sources.redhat.com, binutils@sources.redhat.com, dj@redhat.com Subject: (toplevel patch) Real make targets for configure-target-* Message-ID: <20021203163033.GA7829@doctormoo> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i From: Nathanael Nerode X-SW-Source: 2002-12/txt/msg00069.txt.bz2 Real targets for configure-target-*. More complicated than the configure-build-* case because of: - multilibs; configuration depends on multilib.out, which depends on (BASE_)CC_FOR_TARGET. - dependencies: depending lines must change to match Tested on i686-pc-linux-gnu. * configure.in: Introduce BASE_CC_FOR_TARGET. * Makefile.tpl: Realize configure-target-* targets. * Makefile.in: Regenerate. Index: configure.in =================================================================== RCS file: /cvs/gcc/gcc/configure.in,v retrieving revision 1.177.4.13 diff -u -r1.177.4.13 configure.in --- configure.in 3 Dec 2002 03:42:19 -0000 1.177.4.13 +++ configure.in 3 Dec 2002 16:23:08 -0000 @@ -1653,6 +1653,12 @@ qqCXX_FOR_TARGET=`echo "$qCXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` qqRAW_CXX_FOR_TARGET=`echo "$qRAW_CXX_FOR_TARGET" | sed -e 's,[$][$],$$$$,g'` +# BASE_CC_FOR_TARGET is the actual program file of CC_FOR_TARGET, +# for use in dependencies. Replace $$r with a relative +# path if it's present. +set dummy $CC_FOR_TARGET; cc_for_target_first_word=$2 +BASE_CC_FOR_TARGET=`echo "$cc_for_target_first_word" | sed -e 's,[$][$]r,.,'` + sedtemp=sed.$$ cat >$sedtemp < $(TARGET_SUBDIR)/[+module+]/tmpmulti.out 2> /dev/null; \ - if [ -s $(TARGET_SUBDIR)/[+module+]/tmpmulti.out ]; then \ - if [ -f $(TARGET_SUBDIR)/[+module+]/multilib.out ]; then \ - if cmp $(TARGET_SUBDIR)/[+module+]/multilib.out $(TARGET_SUBDIR)/[+module+]/tmpmulti.out > /dev/null; then \ - rm -f $(TARGET_SUBDIR)/[+module+]/tmpmulti.out; \ - else \ - echo "Multilibs changed for [+module+], reconfiguring"; \ - rm -f $(TARGET_SUBDIR)/[+module+]/multilib.out $(TARGET_SUBDIR)/[+module+]/Makefile; \ - mv $(TARGET_SUBDIR)/[+module+]/tmpmulti.out $(TARGET_SUBDIR)/[+module+]/multilib.out; \ - fi; \ - else \ - mv $(TARGET_SUBDIR)/[+module+]/tmpmulti.out $(TARGET_SUBDIR)/[+module+]/multilib.out; \ - fi; \ - fi; exit 0 # break command into two pieces - @if [ -d $(srcdir)/[+module+] ]; then \ - [ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\ + echo "Configuring multilibs for [+module+]"; \ + $(CC_FOR_TARGET) --print-multi-lib > $(TARGET_SUBDIR)/[+module+]/multilib.out 2> /dev/null + +$(TARGET_SUBDIR)/[+module+]/Makefile: config.status $(TARGET_SUBDIR)/[+module+]/multilib.out + @[ -d $(TARGET_SUBDIR)/[+module+] ] || mkdir $(TARGET_SUBDIR)/[+module+];\ r=`${PWD}`; export r; \ s=`cd $(srcdir); ${PWD}`; export s; \ $(SET_LIB_PATH) \ @@ -1007,10 +999,7 @@ CONFIG_SITE=no-such-file $(SHELL) $${libsrcdir}/configure \ $(TARGET_CONFIGARGS) $${srcdiroption} \ --with-target-subdir="$(TARGET_SUBDIR)" \ - || exit 1; \ - else \ - true; \ - fi + || exit 1 .PHONY: all-target-[+module+] maybe-all-target-[+module+] maybe-all-target-[+module+]: @@ -1266,34 +1255,34 @@ ALL_GCC_CXX = $(ALL_GCC_C) maybe-all-target-libstdc++-v3 # Target modules specific to gcc. -configure-target-boehm-gc: $(ALL_GCC_C) maybe-configure-target-qthreads -configure-target-fastjar: maybe-configure-target-zlib +$(TARGET_SUBDIR)/boehm-gc/Makefile: $(ALL_GCC_C) maybe-configure-target-qthreads +$(TARGET_SUBDIR)/fastjar/Makefile: maybe-configure-target-zlib all-target-fastjar: maybe-all-target-zlib maybe-all-target-libiberty -configure-target-libf2c: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libf2c/Makefile: $(ALL_GCC_C) all-target-libf2c: maybe-all-target-libiberty -configure-target-libffi: $(ALL_GCC_C) -configure-target-libjava: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi +$(TARGET_SUBDIR)/libffi/Makefile: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libjava/Makefile: $(ALL_GCC_C) maybe-configure-target-zlib maybe-configure-target-boehm-gc maybe-configure-target-qthreads maybe-configure-target-libffi all-target-libjava: maybe-all-fastjar maybe-all-target-zlib maybe-all-target-boehm-gc maybe-all-target-qthreads maybe-all-target-libffi -configure-target-libobjc: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libobjc/Makefile: $(ALL_GCC_C) all-target-libobjc: maybe-all-target-libiberty -configure-target-libstdc++-v3: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libstdc++-v3/Makefile: $(ALL_GCC_C) all-target-libstdc++-v3: maybe-all-target-libiberty -configure-target-zlib: $(ALL_GCC_C) +$(TARGET_SUBDIR)/zlib/Makefile: $(ALL_GCC_C) # Target modules in the 'src' repository. -configure-target-examples: $(ALL_GCC_C) -configure-target-libgloss: $(ALL_GCC) +$(TARGET_SUBDIR)/examples/Makefile: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libgloss/Makefile: $(ALL_GCC) all-target-libgloss: maybe-configure-target-newlib -configure-target-libiberty: $(ALL_GCC_C) -configure-target-libtermcap: $(ALL_GCC_C) -configure-target-newlib: $(ALL_GCC) -configure-target-winsup: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libiberty/Makefile: $(ALL_GCC_C) +$(TARGET_SUBDIR)/libtermcap/Makefile: $(ALL_GCC_C) +$(TARGET_SUBDIR)/newlib/Makefile: $(ALL_GCC) +$(TARGET_SUBDIR)/winsup/Makefile: $(ALL_GCC_C) all-target-winsup: maybe-all-target-libiberty maybe-all-target-libtermcap # Other target modules. Warning, these are not well tested. -configure-target-gperf: $(ALL_GCC_CXX) +$(TARGET_SUBDIR)/gperf/Makefile: $(ALL_GCC_CXX) all-target-gperf: maybe-all-target-libiberty maybe-all-target-libstdc++-v3 -configure-target-qthreads: $(ALL_GCC_C) +$(TARGET_SUBDIR)/qthreads/Makefile: $(ALL_GCC_C) # Dependencies of maybe-foo on foo. These are used because, for example, # all-gcc only depends on all-gas if gas is present and being configured.