From patchwork Fri Jun 27 07:32:25 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Bernd Schmidt X-Patchwork-Id: 364800 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 CF3801400B5 for ; Fri, 27 Jun 2014 17:33:26 +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=PrpVxgbMeWd0/678U k+uX6x3th+lTsCH8rWGW0MqcbAOvJOo2Uo0ryJEv4/oE7LczL8eW4lwWv9npCsrf 8t9XwQKHpn/UpaL005yGaQnKMGkQmHPVb8/QkqspFtVwNyaqPvtUq+r+fFgYPL0f kIKDLXREfLwKWSmbMrSUnwfv18= 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=2jska/8tCsBNQIZyB221Wrk +LJ4=; b=vc69n1tabyQ5FY3G3WNf6ozO2MS3Jgdp183HobInZBDhoYLB15ADLj4 8xVnWHuq4IJN3w5w8bdsiRi3AoN67MgEAQkkdCGpl0LIrD5OQBm6Prj4M9zVMI4T WOFpp267XUkj+Ppjoy4upkdRAyZmqrLfRp/S4pfAEilRRbqAA0/A= Received: (qmail 2310 invoked by alias); 27 Jun 2014 07:33:20 -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 2294 invoked by uid 89); 27 Jun 2014 07:33:19 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.8 required=5.0 tests=AWL, BAYES_00 autolearn=ham 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; Fri, 27 Jun 2014 07:33:17 +0000 Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1X0Qel-00040H-Bw from Bernd_Schmidt@mentor.com ; Fri, 27 Jun 2014 00:33:11 -0700 Received: from SVR-IES-FEM-03.mgc.mentorg.com ([137.202.0.108]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 27 Jun 2014 00:33:11 -0700 Received: from [127.0.0.1] (137.202.0.76) by SVR-IES-FEM-03.mgc.mentorg.com (137.202.0.108) with Microsoft SMTP Server id 14.2.247.3; Fri, 27 Jun 2014 08:33:09 +0100 Message-ID: <53AD1E09.4010803@codesourcery.com> Date: Fri, 27 Jun 2014 09:32:25 +0200 From: Bernd Schmidt User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.6.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: <52E9137C.4020706@codesourcery.com> <530648F8.2010409@codesourcery.com> <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> In-Reply-To: <20140619101902.GB35121@msticlxl57.ims.intel.com> On 06/19/2014 12:19 PM, Ilya Verbin wrote: > On 18 Jun 16:22, Bernd Schmidt wrote: >> What I think you need to do is >> For the first compiler: >> --enable-as-accelerator-for=x86_64-pc-linux-gnu >> --target=x86_64-intelmic-linux-gnu --prefix=/somewhere >> >> No --enable-accelerator options at all. This should work, if it >> doesn't let me know what you find in /somewhere after installation >> for both compilers. > > It doesn't work without --enable-accelerator: > > --enable-as-accelerator-for requires --enable-accelerator > make[1]: *** [configure-gcc] Error 1 Sorry for the delayed reply, I was travelling. There seem to be some thinkos in the configure script and Makefile; can you try the following (don't forget to regenerate configure)? It seems to work for ptx (with some additional changes to allow ptx builds without --enable-accelerator). Bernd Index: configure.ac =================================================================== --- configure.ac (revision 435407) +++ configure.ac (working copy) @@ -905,15 +905,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} ALL_ACCEL=all-accel Index: Makefile.in =================================================================== --- Makefile.in (revision 435407) +++ 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. @@ -777,7 +776,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)') @@ -3247,25 +3246,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.