From patchwork Mon Aug 4 21:00:07 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 376442 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id BCAFD140095 for ; Tue, 5 Aug 2014 07:01:04 +1000 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; q=dns; s=default; b=FuPtH3sOvfdgp/V1k GstQ/N8TT3BU9CCY7x/48r+TqmHhfBbdnCylRTXABVQrgB17ql5WLSE/ThsOJ1HD NNVK+xApgesKkBB1C9cuPWl4N8S2W9QgUO+iMzCHyl/+6JEiU9F0dTj37eox4r6B iOIk9SfK+WjNX7hnbM9QkgsOX4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:references :in-reply-to:content-type; s=default; bh=Or0/F2y+jbnqJvmw7orICLc VelE=; b=Vpo5ysy6NDGx6BwrLwveg9eyqA5Vw/w6E6BWY0kHeWRJxtaWT6zyt+N 16UvuKTFGvs0yCzb0ug0uux2AhcJw+BEz9XhXbxH33hO5COQo9Z+xNisUhraXp40 HMl/P5Gbj1Rj/AJr2WSxZrDGY6cxa0wOZ8UTF31teH2N8GYYiZLU= Received: (qmail 26358 invoked by alias); 4 Aug 2014 21:00:56 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Received: (qmail 26345 invoked by uid 89); 4 Aug 2014 21:00:55 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=0.2 required=5.0 tests=AWL, BAYES_00, URIBL_BLACK autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 04 Aug 2014 21:00:51 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1XEPN8-0000jv-CY from Bernd_Schmidt@mentor.com ; Mon, 04 Aug 2014 14:00:46 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 4 Aug 2014 14:00:46 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Mon, 4 Aug 2014 22:00:43 +0100 Message-ID: <53DFF457.9070908@codesourcery.com> Date: Mon, 4 Aug 2014 23:00:07 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.7.0 MIME-Version: 1.0 To: Ilya Verbin CC: Thomas Schwinge , Jakub Jelinek , Richard Biener , Kirill Yukhin , Andrey Turetskiy , Ilya Tocar , gcc-patches , Nathan Sidwell Subject: Re: Fwd: [RFC][gomp4] Offloading patches (2/3): Add tables generation References: <5310B791.1000703@codesourcery.com> <20140617182018.GA28422@msticlxl57.ims.intel.com> <53A09586.4060504@codesourcery.com> <20140618141341.GA35121@msticlxl57.ims.intel.com> <53A1A0C2.4000907@codesourcery.com> <20140619101902.GB35121@msticlxl57.ims.intel.com> <53AD1E09.4010803@codesourcery.com> <20140707145036.GA19896@msticlxl57.ims.intel.com> <53CFC3D5.9090504@codesourcery.com> <20140723143725.GA12469@msticlxl57.ims.intel.com> In-Reply-To: <20140723143725.GA12469@msticlxl57.ims.intel.com> On 07/23/2014 04:37 PM, Ilya Verbin wrote: > On 23 Jul 16:16, Bernd Schmidt wrote: >> Here's the latest version, which fixes some more issues and removes >> things that are now unnecessary. Configure scripts and toplevel >> autogenned stuff is left out and must be regenerated. >> >> Are you OK with me installing this on gomp-4_0-branch? If there's >> any other changes related to the build system that you require, >> could you send me a patch on top of this so that we can converge on >> the final shape? > > OK. > Looks like we do not need anything more for the build system. I've committed this version to gomp-4_0-branch. This also includes the additional 'g' for the sed command you noticed. Bernd Index: ChangeLog.gomp =================================================================== --- ChangeLog.gomp (revision 213606) +++ ChangeLog.gomp (working copy) @@ -1,3 +1,14 @@ +2014-08-04 Bernd Schmidt + + * Makefile.def (accel-gcc host module): Remove, and all of its + dependencies too. + * Makefile.in: Regenerate. + * configure.ac (host_tools): Remove accel-gcc. + (enable-accelerator): Remove handling for this option. + (enable-offload-targets): Handle this instead. + (configdirs): Revert previous changes. + * configure: Regenerate. + 2014-06-12 Thomas Schwinge * configure.ac (--enable-target-gcc-configure-flags) Index: Makefile.def =================================================================== --- Makefile.def (revision 213606) +++ Makefile.def (working copy) @@ -46,10 +46,6 @@ host_modules= { module= gas; bootstrap=t host_modules= { module= gcc; bootstrap=true; extra_configure_flags='@extra_target_gcc_configure_flags@'; extra_make_flags="$(EXTRA_GCC_FLAGS) $(EXTRA_TARGET_GCC_FLAGS)"; }; -host_modules= { module= accel-gcc; - module_srcdir=gcc; - extra_configure_flags='--enable-as-accelerator-for=$(target_alias) @extra_accelerator_gcc_configure_flags@'; - extra_make_flags="$(EXTRA_ACCELERATOR_GCC_FLAGS)"; }; host_modules= { module= gmp; lib_path=.libs; bootstrap=true; extra_configure_flags='--disable-shared'; no_install= true; @@ -322,7 +318,6 @@ dependencies = { module=all-gcc; on=all- dependencies = { module=all-gcc; on=all-mpfr; }; dependencies = { module=all-gcc; on=all-mpc; }; dependencies = { module=all-gcc; on=all-cloog; }; -dependencies = { module=all-gcc; on=all-accel-gcc; }; dependencies = { module=all-gcc; on=all-build-texinfo; }; dependencies = { module=all-gcc; on=all-build-bison; }; dependencies = { module=all-gcc; on=all-build-flex; }; @@ -335,24 +330,6 @@ dependencies = { module=all-gcc; on=all- dependencies = { module=all-gcc; on=all-libiberty; }; dependencies = { module=all-gcc; on=all-fixincludes; }; dependencies = { module=all-gcc; on=all-lto-plugin; }; -dependencies = { module=all-accel-gcc; on=all-libiberty; hard=true; }; -dependencies = { module=all-accel-gcc; on=all-intl; }; -dependencies = { module=all-accel-gcc; on=all-mpfr; }; -dependencies = { module=all-accel-gcc; on=all-mpc; }; -dependencies = { module=all-accel-gcc; on=all-cloog; }; -dependencies = { module=all-accel-gcc; on=all-accel-gcc; }; -dependencies = { module=all-accel-gcc; on=all-build-texinfo; }; -dependencies = { module=all-accel-gcc; on=all-build-bison; }; -dependencies = { module=all-accel-gcc; on=all-build-flex; }; -dependencies = { module=all-accel-gcc; on=all-build-libiberty; }; -dependencies = { module=all-accel-gcc; on=all-build-fixincludes; }; -dependencies = { module=all-accel-gcc; on=all-zlib; }; -dependencies = { module=all-accel-gcc; on=all-libbacktrace; hard=true; }; -dependencies = { module=all-accel-gcc; on=all-libcpp; hard=true; }; -dependencies = { module=all-accel-gcc; on=all-libdecnumber; hard=true; }; -dependencies = { module=all-accel-gcc; on=all-libiberty; }; -dependencies = { module=all-accel-gcc; on=all-fixincludes; }; -dependencies = { module=all-accel-gcc; on=all-lto-plugin; }; dependencies = { module=info-gcc; on=all-build-libiberty; }; dependencies = { module=dvi-gcc; on=all-build-libiberty; }; dependencies = { module=pdf-gcc; on=all-build-libiberty; }; Index: Makefile.in =================================================================== --- Makefile.in (revision 213606) +++ Makefile.in (working copy) @@ -899,7 +899,6 @@ configure-host: \ maybe-configure-flex \ maybe-configure-gas \ maybe-configure-gcc \ - maybe-configure-accel-gcc \ maybe-configure-gmp \ maybe-configure-mpfr \ maybe-configure-mpc \ @@ -1020,7 +1019,6 @@ all-host: maybe-all-gas @if gcc-no-bootstrap all-host: maybe-all-gcc @endif gcc-no-bootstrap -all-host: maybe-all-accel-gcc @if gmp-no-bootstrap all-host: maybe-all-gmp @endif gmp-no-bootstrap @@ -1152,7 +1150,6 @@ info-host: maybe-info-fixincludes info-host: maybe-info-flex info-host: maybe-info-gas info-host: maybe-info-gcc -info-host: maybe-info-accel-gcc info-host: maybe-info-gmp info-host: maybe-info-mpfr info-host: maybe-info-mpc @@ -1237,7 +1234,6 @@ dvi-host: maybe-dvi-fixincludes dvi-host: maybe-dvi-flex dvi-host: maybe-dvi-gas dvi-host: maybe-dvi-gcc -dvi-host: maybe-dvi-accel-gcc dvi-host: maybe-dvi-gmp dvi-host: maybe-dvi-mpfr dvi-host: maybe-dvi-mpc @@ -1322,7 +1318,6 @@ pdf-host: maybe-pdf-fixincludes pdf-host: maybe-pdf-flex pdf-host: maybe-pdf-gas pdf-host: maybe-pdf-gcc -pdf-host: maybe-pdf-accel-gcc pdf-host: maybe-pdf-gmp pdf-host: maybe-pdf-mpfr pdf-host: maybe-pdf-mpc @@ -1407,7 +1402,6 @@ html-host: maybe-html-fixincludes html-host: maybe-html-flex html-host: maybe-html-gas html-host: maybe-html-gcc -html-host: maybe-html-accel-gcc html-host: maybe-html-gmp html-host: maybe-html-mpfr html-host: maybe-html-mpc @@ -1492,7 +1486,6 @@ TAGS-host: maybe-TAGS-fixincludes TAGS-host: maybe-TAGS-flex TAGS-host: maybe-TAGS-gas TAGS-host: maybe-TAGS-gcc -TAGS-host: maybe-TAGS-accel-gcc TAGS-host: maybe-TAGS-gmp TAGS-host: maybe-TAGS-mpfr TAGS-host: maybe-TAGS-mpc @@ -1577,7 +1570,6 @@ install-info-host: maybe-install-info-fi install-info-host: maybe-install-info-flex install-info-host: maybe-install-info-gas install-info-host: maybe-install-info-gcc -install-info-host: maybe-install-info-accel-gcc install-info-host: maybe-install-info-gmp install-info-host: maybe-install-info-mpfr install-info-host: maybe-install-info-mpc @@ -1662,7 +1654,6 @@ install-pdf-host: maybe-install-pdf-fixi install-pdf-host: maybe-install-pdf-flex install-pdf-host: maybe-install-pdf-gas install-pdf-host: maybe-install-pdf-gcc -install-pdf-host: maybe-install-pdf-accel-gcc install-pdf-host: maybe-install-pdf-gmp install-pdf-host: maybe-install-pdf-mpfr install-pdf-host: maybe-install-pdf-mpc @@ -1747,7 +1738,6 @@ install-html-host: maybe-install-html-fi install-html-host: maybe-install-html-flex install-html-host: maybe-install-html-gas install-html-host: maybe-install-html-gcc -install-html-host: maybe-install-html-accel-gcc install-html-host: maybe-install-html-gmp install-html-host: maybe-install-html-mpfr install-html-host: maybe-install-html-mpc @@ -1832,7 +1822,6 @@ installcheck-host: maybe-installcheck-fi installcheck-host: maybe-installcheck-flex installcheck-host: maybe-installcheck-gas installcheck-host: maybe-installcheck-gcc -installcheck-host: maybe-installcheck-accel-gcc installcheck-host: maybe-installcheck-gmp installcheck-host: maybe-installcheck-mpfr installcheck-host: maybe-installcheck-mpc @@ -1917,7 +1906,6 @@ mostlyclean-host: maybe-mostlyclean-fixi mostlyclean-host: maybe-mostlyclean-flex mostlyclean-host: maybe-mostlyclean-gas mostlyclean-host: maybe-mostlyclean-gcc -mostlyclean-host: maybe-mostlyclean-accel-gcc mostlyclean-host: maybe-mostlyclean-gmp mostlyclean-host: maybe-mostlyclean-mpfr mostlyclean-host: maybe-mostlyclean-mpc @@ -2002,7 +1990,6 @@ clean-host: maybe-clean-fixincludes clean-host: maybe-clean-flex clean-host: maybe-clean-gas clean-host: maybe-clean-gcc -clean-host: maybe-clean-accel-gcc clean-host: maybe-clean-gmp clean-host: maybe-clean-mpfr clean-host: maybe-clean-mpc @@ -2087,7 +2074,6 @@ distclean-host: maybe-distclean-fixinclu distclean-host: maybe-distclean-flex distclean-host: maybe-distclean-gas distclean-host: maybe-distclean-gcc -distclean-host: maybe-distclean-accel-gcc distclean-host: maybe-distclean-gmp distclean-host: maybe-distclean-mpfr distclean-host: maybe-distclean-mpc @@ -2172,7 +2158,6 @@ maintainer-clean-host: maybe-maintainer- maintainer-clean-host: maybe-maintainer-clean-flex maintainer-clean-host: maybe-maintainer-clean-gas maintainer-clean-host: maybe-maintainer-clean-gcc -maintainer-clean-host: maybe-maintainer-clean-accel-gcc maintainer-clean-host: maybe-maintainer-clean-gmp maintainer-clean-host: maybe-maintainer-clean-mpfr maintainer-clean-host: maybe-maintainer-clean-mpc @@ -2312,7 +2297,6 @@ check-host: \ maybe-check-flex \ maybe-check-gas \ maybe-check-gcc \ - maybe-check-accel-gcc \ maybe-check-gmp \ maybe-check-mpfr \ maybe-check-mpc \ @@ -2423,7 +2407,6 @@ install-host-nogcc: \ maybe-install-fixincludes \ maybe-install-flex \ maybe-install-gas \ - maybe-install-accel-gcc \ maybe-install-gmp \ maybe-install-mpfr \ maybe-install-mpc \ @@ -2472,7 +2455,6 @@ install-host: \ maybe-install-flex \ maybe-install-gas \ maybe-install-gcc \ - maybe-install-accel-gcc \ maybe-install-gmp \ maybe-install-mpfr \ maybe-install-mpc \ @@ -2577,7 +2559,6 @@ install-strip-host: \ maybe-install-strip-flex \ maybe-install-strip-gas \ maybe-install-strip-gcc \ - maybe-install-strip-accel-gcc \ maybe-install-strip-gmp \ maybe-install-strip-mpfr \ maybe-install-strip-mpc \ @@ -10974,450 +10955,6 @@ maintainer-clean-gcc: -.PHONY: configure-accel-gcc maybe-configure-accel-gcc -maybe-configure-accel-gcc: -@if gcc-bootstrap -configure-accel-gcc: stage_current -@endif gcc-bootstrap -@if accel-gcc -maybe-configure-accel-gcc: configure-accel-gcc -configure-accel-gcc: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - test ! -f $(HOST_SUBDIR)/accel-gcc/Makefile || exit 0; \ - $(SHELL) $(srcdir)/mkinstalldirs $(HOST_SUBDIR)/accel-gcc ; \ - $(HOST_EXPORTS) \ - echo Configuring in $(HOST_SUBDIR)/accel-gcc; \ - \ - this_target="$(accel_target_alias)"; \ - \ - cd "$(HOST_SUBDIR)/accel-gcc" || exit 1; \ - case $(srcdir) in \ - /* | [A-Za-z]:[\\/]*) topdir=$(srcdir) ;; \ - *) topdir=`echo $(HOST_SUBDIR)/accel-gcc/ | \ - sed -e 's,\./,,g' -e 's,[^/]*/,../,g' `$(srcdir) ;; \ - esac; \ - module_srcdir=gcc; \ - $(SHELL) \ - $$s/$$module_srcdir/configure \ - --srcdir=$${topdir}/$$module_srcdir \ - $(HOST_CONFIGARGS) --build=${build_alias} --host=${host_alias} \ - --target=$${this_target} --enable-as-accelerator-for=$(target_alias) @extra_accelerator_gcc_configure_flags@ \ - || exit 1 -@endif accel-gcc - - - - - -.PHONY: all-accel-gcc maybe-all-accel-gcc -maybe-all-accel-gcc: -@if gcc-bootstrap -all-accel-gcc: stage_current -@endif gcc-bootstrap -@if accel-gcc -TARGET-accel-gcc=all -maybe-all-accel-gcc: all-accel-gcc -all-accel-gcc: configure-accel-gcc - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS) $(EXTRA_ACCELERATOR_GCC_FLAGS) \ - $(TARGET-accel-gcc)) -@endif accel-gcc - - - - -.PHONY: check-accel-gcc maybe-check-accel-gcc -maybe-check-accel-gcc: -@if accel-gcc -maybe-check-accel-gcc: check-accel-gcc - -check-accel-gcc: - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_ACCELERATOR_GCC_FLAGS) check) - -@endif accel-gcc - -.PHONY: install-accel-gcc maybe-install-accel-gcc -maybe-install-accel-gcc: -@if accel-gcc -maybe-install-accel-gcc: install-accel-gcc - -install-accel-gcc: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_ACCELERATOR_GCC_FLAGS) install) - -@endif accel-gcc - -.PHONY: install-strip-accel-gcc maybe-install-strip-accel-gcc -maybe-install-strip-accel-gcc: -@if accel-gcc -maybe-install-strip-accel-gcc: install-strip-accel-gcc - -install-strip-accel-gcc: installdirs - @: $(MAKE); $(unstage) - @r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(FLAGS_TO_PASS) $(EXTRA_ACCELERATOR_GCC_FLAGS) install-strip) - -@endif accel-gcc - -# Other targets (info, dvi, pdf, etc.) - -.PHONY: maybe-info-accel-gcc info-accel-gcc -maybe-info-accel-gcc: -@if accel-gcc -maybe-info-accel-gcc: info-accel-gcc - -info-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing info in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - info) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-dvi-accel-gcc dvi-accel-gcc -maybe-dvi-accel-gcc: -@if accel-gcc -maybe-dvi-accel-gcc: dvi-accel-gcc - -dvi-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing dvi in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - dvi) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-pdf-accel-gcc pdf-accel-gcc -maybe-pdf-accel-gcc: -@if accel-gcc -maybe-pdf-accel-gcc: pdf-accel-gcc - -pdf-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing pdf in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - pdf) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-html-accel-gcc html-accel-gcc -maybe-html-accel-gcc: -@if accel-gcc -maybe-html-accel-gcc: html-accel-gcc - -html-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing html in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - html) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-TAGS-accel-gcc TAGS-accel-gcc -maybe-TAGS-accel-gcc: -@if accel-gcc -maybe-TAGS-accel-gcc: TAGS-accel-gcc - -TAGS-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing TAGS in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - TAGS) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-install-info-accel-gcc install-info-accel-gcc -maybe-install-info-accel-gcc: -@if accel-gcc -maybe-install-info-accel-gcc: install-info-accel-gcc - -install-info-accel-gcc: \ - configure-accel-gcc \ - info-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-info in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-info) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-install-pdf-accel-gcc install-pdf-accel-gcc -maybe-install-pdf-accel-gcc: -@if accel-gcc -maybe-install-pdf-accel-gcc: install-pdf-accel-gcc - -install-pdf-accel-gcc: \ - configure-accel-gcc \ - pdf-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-pdf in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-pdf) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-install-html-accel-gcc install-html-accel-gcc -maybe-install-html-accel-gcc: -@if accel-gcc -maybe-install-html-accel-gcc: install-html-accel-gcc - -install-html-accel-gcc: \ - configure-accel-gcc \ - html-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing install-html in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - install-html) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-installcheck-accel-gcc installcheck-accel-gcc -maybe-installcheck-accel-gcc: -@if accel-gcc -maybe-installcheck-accel-gcc: installcheck-accel-gcc - -installcheck-accel-gcc: \ - configure-accel-gcc - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing installcheck in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - installcheck) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-mostlyclean-accel-gcc mostlyclean-accel-gcc -maybe-mostlyclean-accel-gcc: -@if accel-gcc -maybe-mostlyclean-accel-gcc: mostlyclean-accel-gcc - -mostlyclean-accel-gcc: - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing mostlyclean in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - mostlyclean) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-clean-accel-gcc clean-accel-gcc -maybe-clean-accel-gcc: -@if accel-gcc -maybe-clean-accel-gcc: clean-accel-gcc - -clean-accel-gcc: - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing clean in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - clean) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-distclean-accel-gcc distclean-accel-gcc -maybe-distclean-accel-gcc: -@if accel-gcc -maybe-distclean-accel-gcc: distclean-accel-gcc - -distclean-accel-gcc: - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing distclean in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - distclean) \ - || exit 1 - -@endif accel-gcc - -.PHONY: maybe-maintainer-clean-accel-gcc maintainer-clean-accel-gcc -maybe-maintainer-clean-accel-gcc: -@if accel-gcc -maybe-maintainer-clean-accel-gcc: maintainer-clean-accel-gcc - -maintainer-clean-accel-gcc: - @: $(MAKE); $(unstage) - @[ -f ./accel-gcc/Makefile ] || exit 0; \ - r=`${PWD_COMMAND}`; export r; \ - s=`cd $(srcdir); ${PWD_COMMAND}`; export s; \ - $(HOST_EXPORTS) \ - for flag in $(EXTRA_HOST_FLAGS) $(EXTRA_ACCELERATOR_GCC_FLAGS); do \ - eval `echo "$$flag" | sed -e "s|^\([^=]*\)=\(.*\)|\1='\2'; export \1|"`; \ - done; \ - echo "Doing maintainer-clean in accel-gcc" ; \ - (cd $(HOST_SUBDIR)/accel-gcc && \ - $(MAKE) $(BASE_FLAGS_TO_PASS) "AR=$${AR}" "AS=$${AS}" \ - "CC=$${CC}" "CXX=$${CXX}" "LD=$${LD}" "NM=$${NM}" \ - "RANLIB=$${RANLIB}" \ - "DLLTOOL=$${DLLTOOL}" "WINDRES=$${WINDRES}" "WINDMC=$${WINDMC}" \ - maintainer-clean) \ - || exit 1 - -@endif accel-gcc - - - .PHONY: configure-gmp maybe-configure-gmp maybe-configure-gmp: @if gcc-bootstrap @@ -48846,7 +48383,6 @@ all-stage3-gcc: maybe-all-stage3-cloog all-stage4-gcc: maybe-all-stage4-cloog all-stageprofile-gcc: maybe-all-stageprofile-cloog all-stagefeedback-gcc: maybe-all-stagefeedback-cloog -all-gcc: maybe-all-accel-gcc all-gcc: maybe-all-build-texinfo all-stage1-gcc: maybe-all-build-texinfo @@ -48943,24 +48479,6 @@ all-stage3-gcc: maybe-all-stage3-lto-plu all-stage4-gcc: maybe-all-stage4-lto-plugin all-stageprofile-gcc: maybe-all-stageprofile-lto-plugin all-stagefeedback-gcc: maybe-all-stagefeedback-lto-plugin -all-accel-gcc: all-libiberty -all-accel-gcc: maybe-all-intl -all-accel-gcc: maybe-all-mpfr -all-accel-gcc: maybe-all-mpc -all-accel-gcc: maybe-all-cloog -all-accel-gcc: maybe-all-accel-gcc -all-accel-gcc: maybe-all-build-texinfo -all-accel-gcc: maybe-all-build-bison -all-accel-gcc: maybe-all-build-flex -all-accel-gcc: maybe-all-build-libiberty -all-accel-gcc: maybe-all-build-fixincludes -all-accel-gcc: maybe-all-zlib -all-accel-gcc: all-libbacktrace -all-accel-gcc: all-libcpp -all-accel-gcc: all-libdecnumber -all-accel-gcc: maybe-all-libiberty -all-accel-gcc: maybe-all-fixincludes -all-accel-gcc: maybe-all-lto-plugin info-gcc: maybe-all-build-libiberty info-stage1-gcc: maybe-all-build-libiberty Index: configure =================================================================== --- configure (revision 213606) +++ configure (working copy) @@ -754,7 +754,7 @@ ospace_frag' ac_user_opts=' enable_option_checking with_build_libsubdir -enable_accelerator +enable_offload_targets enable_target_gcc_configure_flags enable_accelerator_gcc_configure_flags enable_gold @@ -1476,9 +1476,8 @@ Optional Features: --disable-option-checking ignore unrecognized --enable/--with options --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no) --enable-FEATURE[=ARG] include FEATURE [ARG=yes] - --enable-accelerator[=ARG] - build accelerator - [ARG={no,auto-device-triplet,device-triplet}] + --enable-offload-targets=LIST + enable offloading to devices from LIST --enable-target-gcc-configure-flags=FLAGS additional flags for configuring the target GCC [none] @@ -2789,7 +2788,7 @@ host_libs="intl libiberty opcodes bfd re # binutils, gas and ld appear in that order because it makes sense to run # "make check" in that particular order. # If --enable-gold is used, "gold" may replace "ld". -host_tools="texinfo flex bison binutils gas ld fixincludes accel-gcc gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools" +host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools" # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ @@ -2954,38 +2953,19 @@ case ${with_newlib} in yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; esac -# Handle --enable-accelerator. This is in top-level because both libgomp and -# GCC proper need this information. -# --disable-accelerator -# Default. Do not build accelerator pieces, only support host execution. -# --enable-accelerator=auto-device-triplet -# If possible, build accelerator pieces for 'device-triplet'. -# --enable-accelerator=device-triplet -# Build accelerator pieces for 'device-triplet'. -# Check whether --enable-accelerator was given. -if test "${enable_accelerator+set}" = set; then : - enableval=$enable_accelerator; ENABLE_ACCELERATOR=$enableval +offload_targets= + +# Check whether --enable-offload-targets was given. +if test "${enable_offload_targets+set}" = set; then : + enableval=$enable_offload_targets; + if test x$enable_offload_targets = x; then + as_fn_error "no offload targets specified" "$LINENO" 5 + fi + else - ENABLE_ACCELERATOR=no + enable_offload_targets= fi -accel_target_noncanonical=NONE -case "${ENABLE_ACCELERATOR}" in - yes) - as_fn_error "--enable-accelerators must name accelerator" "$LINENO" 5 - skipdirs="${skipdirs} accel-gcc" - ;; - no) - skipdirs="${skipdirs} accel-gcc" - ;; - auto-nvptx*|nvptx*) - accel_target_noncanonical=`echo "$ENABLE_ACCELERATOR" | sed -e s/auto-//g` - ;; - *) - as_fn_error "unrecognized accelerator" "$LINENO" 5 - skipdirs="${skipdirs} accel-gcc" - ;; -esac { $as_echo "$as_me:${as_lineno-$LINENO}: checking accelerator target system type" >&5 $as_echo_n "checking accelerator target system type... " >&6; } @@ -6770,15 +6750,7 @@ done configdirs_all="$configdirs" configdirs= for i in ${configdirs_all} ; do - case $i in - accel-gcc) - confsrcdir=gcc - ;; - *) - confsrcdir=$i - ;; - esac - if test -f ${srcdir}/${confsrcdir}/configure ; then + if test -f ${srcdir}/$i/configure ; then configdirs="${configdirs} $i" fi done Index: configure.ac =================================================================== --- configure.ac (revision 213606) +++ configure.ac (working copy) @@ -141,7 +141,7 @@ host_libs="intl libiberty opcodes bfd re # binutils, gas and ld appear in that order because it makes sense to run # "make check" in that particular order. # If --enable-gold is used, "gold" may replace "ld". -host_tools="texinfo flex bison binutils gas ld fixincludes accel-gcc gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools" +host_tools="texinfo flex bison binutils gas ld fixincludes gcc cgen sid sim gdb gprof etc expect dejagnu m4 utils guile fastjar gnattools" # libgcj represents the runtime libraries only used by gcj. libgcj="target-libffi \ @@ -286,36 +286,16 @@ case ${with_newlib} in yes) skipdirs=`echo " ${skipdirs} " | sed -e 's/ target-newlib / /'` ;; esac -# Handle --enable-accelerator. This is in top-level because both libgomp and -# GCC proper need this information. -# --disable-accelerator -# Default. Do not build accelerator pieces, only support host execution. -# --enable-accelerator=auto-device-triplet -# If possible, build accelerator pieces for 'device-triplet'. -# --enable-accelerator=device-triplet -# Build accelerator pieces for 'device-triplet'. -AC_ARG_ENABLE(accelerator, -[AS_HELP_STRING([[--enable-accelerator[=ARG]]], - [build accelerator @<:@ARG={no,auto-device-triplet,device-triplet}@:>@])], -ENABLE_ACCELERATOR=$enableval, -ENABLE_ACCELERATOR=no) -accel_target_noncanonical=NONE -case "${ENABLE_ACCELERATOR}" in - yes) - AC_MSG_ERROR([--enable-accelerators must name accelerator]) - skipdirs="${skipdirs} accel-gcc" - ;; - no) - skipdirs="${skipdirs} accel-gcc" - ;; - auto-nvptx*|nvptx*) - accel_target_noncanonical=`echo "$ENABLE_ACCELERATOR" | sed -e s/auto-//g` - ;; - *) - AC_MSG_ERROR([unrecognized accelerator]) - skipdirs="${skipdirs} accel-gcc" - ;; -esac +offload_targets= + +AC_ARG_ENABLE(offload-targets, +[AS_HELP_STRING([--enable-offload-targets=LIST], + [enable offloading to devices from LIST])], +[ + if test x$enable_offload_targets = x; then + AC_MSG_ERROR([no offload targets specified]) + fi +], [enable_offload_targets=]) ACX_CANONICAL_ACCEL_TARGET @@ -2187,15 +2167,7 @@ done configdirs_all="$configdirs" configdirs= for i in ${configdirs_all} ; do - case $i in - accel-gcc) - confsrcdir=gcc - ;; - *) - confsrcdir=$i - ;; - esac - if test -f ${srcdir}/${confsrcdir}/configure ; then + if test -f ${srcdir}/$i/configure ; then configdirs="${configdirs} $i" fi done Index: gcc/ChangeLog.gomp =================================================================== --- gcc/ChangeLog.gomp (revision 213606) +++ gcc/ChangeLog.gomp (working copy) @@ -1,3 +1,12 @@ +2014-08-04 Bernd Schmidt + + * Makefile.in (tool_prefix): Remove. + (unlibsubdir): Change depending on enable_as_accelerator. + (GCC_TARGET_INSTALL_NAME): Revert previous change. + (install_driver): Rework offloading changes. + * configure.ac (tool_prefix): Remove. + (enable-as-accelerator-for): Don't require --enable-as-accelerator. + Update the program_transform_name 2014-07-28 Cesar Philippidis * omp-low.c (get_base_type): New function. Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (revision 213606) +++ gcc/Makefile.in (working copy) @@ -69,7 +69,6 @@ program_transform_name := @program_trans # Normally identical to target_noncanonical, except for compilers built # as accelerator targets. -tool_prefix = @tool_prefix@ accel_dir_suffix = @accel_dir_suffix@ # Directory where sources are, from where we are. @@ -604,7 +603,11 @@ plugin_includedir = $(plugin_resourcesdi # Directory in which plugin specific executables are installed plugin_bindir = $(libexecsubdir)/plugin # Used to produce a relative $(gcc_tooldir) in gcc.o +ifeq ($(enable_as_accelerator),yes) +unlibsubdir = ../../../../.. +else unlibsubdir = ../../.. +endif # $(prefix), expressed as a path relative to $(libsubdir). # # An explanation of the sed strings: @@ -774,7 +777,7 @@ BUILD_CPPFLAGS= -I. -I$(@D) -I$(srcdir) # Actual name to use when installing a native compiler. GCC_INSTALL_NAME := $(shell echo gcc|sed '$(program_transform_name)') -GCC_TARGET_INSTALL_NAME := $(tool_prefix)-$(shell echo gcc|sed '$(program_transform_name)') +GCC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gcc|sed '$(program_transform_name)') CPP_INSTALL_NAME := $(shell echo cpp|sed '$(program_transform_name)') GCOV_INSTALL_NAME := $(shell echo gcov|sed '$(program_transform_name)') @@ -3227,25 +3230,21 @@ install-common: native lang.install-comm # Install the driver program as $(target_noncanonical)-gcc, # $(target_noncanonical)-gcc-$(version), and also as gcc if native. install-driver: installdirs xgcc$(exeext) - -install_name=$(GCC_INSTALL_NAME); \ - if test "@enable_as_accelerator@" = "yes" ; then \ - install_name=$(GCC_TARGET_INSTALL_NAME); \ - fi; \ - rm -f $(DESTDIR)$(bindir)/$${install_name}$(exeext); \ - $(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$${install_name}$(exeext) + -rm -f $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) + -$(INSTALL_PROGRAM) xgcc$(exeext) $(DESTDIR)$(bindir)/$(GCC_INSTALL_NAME)$(exeext) -if test "@enable_as_accelerator@" != "yes" ; then \ - if [ "$(GCC_INSTALL_NAME)" != "$(tool_prefix)-gcc-$(version)" ]; then \ - rm -f $(DESTDIR)$(bindir)/$(tool_prefix)-gcc-$(version)$(exeext); \ - ( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(tool_prefix)-gcc-$(version)$(exeext) ); \ - fi; \ - if [ ! -f gcc-cross$(exeext) ] \ - && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ - rm -f $(DESTDIR)$(bindir)/$(tool_prefix)-gcc-tmp$(exeext); \ - ( cd $(DESTDIR)$(bindir) && \ - $(LN) $(GCC_INSTALL_NAME)$(exeext) $(tool_prefix)-gcc-tmp$(exeext) && \ - mv -f $(tool_prefix)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ - fi; \ + if [ "$(GCC_INSTALL_NAME)" != "$(target_noncanonical)-gcc-$(version)" ]; then \ + rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-$(version)$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-$(version)$(exeext) ); \ + fi; \ + if [ ! -f gcc-cross$(exeext) ] \ + && [ "$(GCC_INSTALL_NAME)" != "$(GCC_TARGET_INSTALL_NAME)" ]; then \ + rm -f $(DESTDIR)$(bindir)/$(target_noncanonical)-gcc-tmp$(exeext); \ + ( cd $(DESTDIR)$(bindir) && \ + $(LN) $(GCC_INSTALL_NAME)$(exeext) $(target_noncanonical)-gcc-tmp$(exeext) && \ + mv -f $(target_noncanonical)-gcc-tmp$(exeext) $(GCC_TARGET_INSTALL_NAME)$(exeext) ); \ + fi; \ fi # Install the info files. Index: gcc/configure =================================================================== --- gcc/configure (revision 213606) +++ gcc/configure (working copy) @@ -612,7 +612,6 @@ GMPINC GMPLIBS accel_dir_suffix real_target_noncanonical -tool_prefix target_cpu_default fortran_target_objs cxx_target_objs @@ -3209,7 +3208,6 @@ esac # Used for constructing correct paths for offload compilers. real_target_noncanonical=${target_noncanonical} -tool_prefix=$target_noncanonical accel_dir_suffix= # Determine the target- and build-specific subdirectories @@ -7429,15 +7427,12 @@ fi # Check whether --enable-as-accelerator-for was given. if test "${enable_as_accelerator_for+set}" = set; then : enableval=$enable_as_accelerator_for; - if test $enable_accelerator = no; then - echo "--enable-as-accelerator-for requires --enable-accelerator" - exit 1; - fi $as_echo "#define ACCEL_COMPILER 1" >>confdefs.h enable_as_accelerator=yes - tool_prefix=${enable_as_accelerator_for}-accel-${enable_accelerator} + sedscript="s#${target_noncanonical}#${enable_as_accelerator_for}-accel-${target_noncanonical}#" + program_transform_name=`echo $program_transform_name | sed $sedscript` accel_dir_suffix=/accel/${target_noncanonical} real_target_noncanonical=${enable_as_accelerator_for} @@ -7465,7 +7460,7 @@ else fi -offload_targets=`echo $offload_targets | sed -e 's#,#:#'` +offload_targets=`echo $offload_targets | sed -e 's#,#:#g'` cat >>confdefs.h <<_ACEOF #define OFFLOAD_TARGETS "$offload_targets" @@ -18119,7 +18114,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18122 "configure" +#line 18117 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -18225,7 +18220,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 18228 "configure" +#line 18223 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -27892,7 +27887,6 @@ fi - Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (revision 213606) +++ gcc/configure.ac (working copy) @@ -40,7 +40,6 @@ ACX_NONCANONICAL_TARGET # Used for constructing correct paths for offload compilers. real_target_noncanonical=${target_noncanonical} -tool_prefix=$target_noncanonical accel_dir_suffix= # Determine the target- and build-specific subdirectories @@ -904,15 +903,12 @@ AC_SUBST(enable_accelerator) AC_ARG_ENABLE(as-accelerator-for, [AS_HELP_STRING([--enable-as-accelerator-for], [build compiler as accelerator target for given host])], [ - if test $enable_accelerator = no; then - echo "--enable-as-accelerator-for requires --enable-accelerator" - exit 1; - fi AC_DEFINE(ACCEL_COMPILER, 1, [Define if this compiler should be built and used as the target device compiler for OpenACC.]) enable_as_accelerator=yes - tool_prefix=${enable_as_accelerator_for}-accel-${enable_accelerator} + sedscript="s#${target_noncanonical}#${enable_as_accelerator_for}-accel-${target_noncanonical}#" + program_transform_name=`echo $program_transform_name | sed $sedscript` accel_dir_suffix=/accel/${target_noncanonical} real_target_noncanonical=${enable_as_accelerator_for} ], [enable_as_accelerator=no]) @@ -933,7 +929,7 @@ AC_ARG_ENABLE(offload-targets, fi ], [enable_accelerator=no]) AC_SUBST(enable_accelerator) -offload_targets=`echo $offload_targets | sed -e 's#,#:#'` +offload_targets=`echo $offload_targets | sed -e 's#,#:#g'` AC_DEFINE_UNQUOTED(OFFLOAD_TARGETS, "$offload_targets", [Define to hold the list of target names suitable for offloading.]) if test x$offload_targets != x; then @@ -5546,7 +5542,6 @@ AC_SUBST(c_target_objs) AC_SUBST(cxx_target_objs) AC_SUBST(fortran_target_objs) AC_SUBST(target_cpu_default) -AC_SUBST(tool_prefix) AC_SUBST(real_target_noncanonical) AC_SUBST(accel_dir_suffix)