From patchwork Tue Dec 1 06:02:34 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gary Funck X-Patchwork-Id: 550689 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 99AFC1401E7 for ; Tue, 1 Dec 2015 17:06:47 +1100 (AEDT) Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; unprotected) header.d=gcc.gnu.org header.i=@gcc.gnu.org header.b=xIP1CW32; dkim-atps=neutral DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender:date :from:to:cc:subject:message-id:mime-version:content-type; q=dns; s=default; b=GgPv1P1qpCL+iGKkz1tbH+C2An02ug90qZ9cs7pK/FAA4HZrW4 dPUy+B9uwenWbeiR3UPfcRY51fxdLlcMKQRPhZYXYhU4zJ0WtHaZuTPT2LWBz+cl neq4B7ah1nHs85s2FB+wg4KESxrAHU6WazNfXHp39PCDS04WLPnBzVicI= 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:date :from:to:cc:subject:message-id:mime-version:content-type; s= default; bh=Ph3QPd3XECq+JUiSAWDHPLOeD/Y=; b=xIP1CW32Nj6UgzG1N24m 4DBRJM5vVj0IV1lx+LaZ32TbCzvdLTKPqjADFugGjkNh4yhBYrdOHdiQaDPyWUuC VbM24oTPqzRoMmgGmRt6LzfDIfmwGyur48tM8npMLB7EMx/oCAYnp+BA8Et9eV8M /aNIenTdIIcwJktl4KQadwc= Received: (qmail 81236 invoked by alias); 1 Dec 2015 06:03:29 -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 80896 invoked by uid 89); 1 Dec 2015 06:03:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-0.4 required=5.0 tests=AWL, BAYES_50, KAM_ASCII_DIVIDERS, RCVD_IN_DNSWL_LOW autolearn=no version=3.3.2 X-HELO: mail-qg0-f99.google.com Received: from mail-qg0-f99.google.com (HELO mail-qg0-f99.google.com) (209.85.192.99) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with (AES128-GCM-SHA256 encrypted) ESMTPS; Tue, 01 Dec 2015 06:02:39 +0000 Received: by qgeb1 with SMTP id b1so11994871qge.0 for ; Mon, 30 Nov 2015 22:02:37 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:date:from:to:cc:subject:message-id:mime-version :content-type:content-disposition:user-agent; bh=7JLGw/wSj7PdRNGQGNCd0bwmhyhBTZhyYpaH8nwL3N4=; b=UQf5+5AABaMU0dJRCztIEVxV60iFkafhWZuR9Hgx6PQxseeJCgbakzsAsf2xG4Mh/9 qCQA2dpDFd2UIl4vb2XSexiHICHG3KRD2sTWqUx7PK38HWBH/82otLqXRoXDuk0rYLtU By+CdU1q2JABP4NE8RInObCi4HQz21q86Sk5IkSM0uJPnMRnWDNsy5DTokBVL7UCWFMW NKxFcZZM5ywH3fhtJ88Mn/bWWzhK9IYXxULCIfRyPN+FwqMt4jqMX9SCvWp+IYgDe0o6 CzXdp/iJCHPYZOm31teKxzRP7NTV/0s/UrzIhydEPKAQ4Zguiw/RrwLcttLFm27ZQyW8 xuWA== X-Gm-Message-State: ALoCoQnBy2Zz2XDILioyO88Q7LYmdLAWCcZhbt/3ck02rXfKiLro7ExAu5NifgHTQ3Zw5Fuv23o9DUHofIhY7dDSHJR02ITvmQ== X-Received: by 10.107.44.71 with SMTP id s68mr2107958ios.58.1448949757140; Mon, 30 Nov 2015 22:02:37 -0800 (PST) Received: from intrepid.com (74-95-8-117-SFBA.hfc.comcastbusiness.net. [74.95.8.117]) by smtp-relay.gmail.com with ESMTPS id xg3sm2437335igb.5.2015.11.30.22.02.36 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 30 Nov 2015 22:02:37 -0800 (PST) X-Relaying-Domain: intrepid.com Received: from corp.local (localhost [127.0.0.1]) by corp.local (8.14.8/8.14.8) with ESMTP id tB162aWg031075; Mon, 30 Nov 2015 22:02:36 -0800 Received: (from gary@localhost) by corp.local (8.14.8/8.14.8/Submit) id tB162YGF031073; Mon, 30 Nov 2015 22:02:34 -0800 Date: Mon, 30 Nov 2015 22:02:34 -0800 From: Gary Funck To: Gcc Patches Cc: Alexandre Oliva , DJ Delorie , Jason Merrill , Joseph Myers , Nathanael Nerode , Paolo Bonzini , Ralf Wildenhues , Richard Sandiford , Tobias Burnus , Nenad Vukicevic Subject: [UPC 04/22] Make, Config changes Message-ID: <20151201060234.GA31060@intrepid.com> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.23 (2014-03-12) X-IsSubscribed: yes Background ---------- An overview email, describing the UPC-related changes is here: https://gcc.gnu.org/ml/gcc-patches/2015-12/msg00005.html The GUPC branch is described here: http://gcc.gnu.org/projects/gupc.html The UPC-related source code differences are summarized here: http://gccupc.org/gupc-changes All languages (c, c++, fortran, go, lto, objc, obj-c++) have been bootstrapped; no test suite regressions were introduced, relative to the GCC trunk. If you are on the cc-list, your name was chosen either because you are listed as a maintainer for the area that applies to the patches described in this email, or you were a frequent contributor of patches made to files listed in this email. In the change log entries included in each patch, the directory containing the affected files is listed, followed by the files. When the patches are applied, the change log entries will be distributed to the appropriate ChangeLog file. Overview -------- UPC introduces a new runtime library, libgupc and a new compiler driver, gupc. These are defined in the top-level Makefile.def and Makefile.tpl files. The top-level configure script will disable building the libgupc runtime library on unsupported targets. For builds where the target is the same as the host, configure will check if "UPC linker scripts" can be supported; this check can be over-ridden by the --enable-upc-linker-script switch. This check runs a 'perl' script, it will only be run if the host has perl installed. 2015-11-30 Gary Funck * Makefile.def (libgupc): New. Define libgupc module. * Makefile.in: Re-generate. * Makefile.tpl (BUILD_EXPORTS, EXTRA_TARGET_FLAGS): Add GUPC and GUPCFLAGS. (BASE_TARGET_EXPORTS, EXTRA_HOST_FLAGS): Add GUPC. (GUPC_FOR_BUILD, GUPCFLAGS, GUPC_FOR_TARGET, GUPCFLAGS_FOR_TARGET): New. * configure: Re-generate. * configure.ac (target_libraries): Add target-libgupc. Disable libgupc on unsupported systems. Add check for 'gupc' as target tool. (GUPC_FOR_BUILD): New. Define 'gupc' as a target tool. contrib/ * gcc_update (libgupc/aclocal.m4, libgupc/config.h.in, libgupc/configure, libgupc/Makefile.in, libgupc/testsuite/Makefile.in): New. Define libgupc targets. * update-copyright.py: Add libgupc library to copyright scan list. (skip_extensions): Add .upc. (GCCCopyright): Add external authors for contributors to UPC-related additions. gcc/ * config.in (HAVE_UPC_LINK_SCRIPT): New. Re-generate. * configure: Re-generate. * configure.ac (enable-upc-link-script): Add check for UPC linker script support. * Makefile.in (INFOFILES): Add doc/gupc.info. (MANFILES): Add doc/gupc.1. gcc/c/ * Make-lang.in (gupc): Add rules to build and install the 'gupc' executable. Add rule to symlink 'upc' to 'gupc' executable. * config-lang.in (gtfiles): Add UPC garbage collection support files to gtfiles. Index: Makefile.def =================================================================== --- Makefile.def (.../trunk) (revision 231059) +++ Makefile.def (.../branches/gupc) (revision 231080) @@ -154,6 +154,7 @@ target_modules = { module= libbacktrace; target_modules = { module= libquadmath; }; target_modules = { module= libgfortran; }; target_modules = { module= libobjc; }; +target_modules = { module= libgupc; }; target_modules = { module= libgo; }; target_modules = { module= libtermcap; no_check=true; missing=mostlyclean; @@ -284,6 +285,8 @@ flags_to_pass = { flag= GCJ_FOR_TARGET ; flags_to_pass = { flag= GFORTRAN_FOR_TARGET ; }; flags_to_pass = { flag= GOC_FOR_TARGET ; }; flags_to_pass = { flag= GOCFLAGS_FOR_TARGET ; }; +flags_to_pass = { flag= GUPC_FOR_TARGET ; }; +flags_to_pass = { flag= GUPCFLAGS_FOR_TARGET ; }; flags_to_pass = { flag= LD_FOR_TARGET ; }; flags_to_pass = { flag= LIPO_FOR_TARGET ; }; flags_to_pass = { flag= LDFLAGS_FOR_TARGET ; }; @@ -561,6 +564,8 @@ dependencies = { module=all-target-libja dependencies = { module=all-target-libjava; on=all-target-libffi; }; dependencies = { module=configure-target-libobjc; on=configure-target-boehm-gc; }; dependencies = { module=all-target-libobjc; on=all-target-boehm-gc; }; +dependencies = { module=all-target-libgupc; on=all-target-libbacktrace; }; +dependencies = { module=all-target-libgupc; on=all-target-libatomic; }; dependencies = { module=configure-target-libstdc++-v3; on=configure-target-libgomp; }; dependencies = { module=configure-target-liboffloadmic; on=configure-target-libgomp; }; dependencies = { module=configure-target-libsanitizer; on=all-target-libstdc++-v3; }; @@ -569,6 +574,9 @@ dependencies = { module=configure-target // generated by the libgomp configure. Unfortunately, due to the use of // recursive make, we can't be that specific. dependencies = { module=all-target-libstdc++-v3; on=configure-target-libgomp; }; +// Installing UPC headers must follow gcc install because +// gcc removes and then recreates the include directory. +dependencies = { module=install-target-libgupc; on=install-gcc; }; dependencies = { module=all-target-liboffloadmic; on=all-target-libgomp; }; dependencies = { module=install-target-libgo; on=install-target-libatomic; }; @@ -585,6 +593,7 @@ dependencies = { module=install-target-l dependencies = { module=install-target-libjava; on=install-target-libgcc; }; dependencies = { module=install-target-libitm; on=install-target-libgcc; }; dependencies = { module=install-target-libobjc; on=install-target-libgcc; }; +dependencies = { module=install-target-libgupc; on=install-target-libgcc; }; dependencies = { module=install-target-libstdc++-v3; on=install-target-libgcc; }; // Target modules in the 'src' repository. Index: Makefile.tpl =================================================================== --- Makefile.tpl (.../trunk) (revision 231059) +++ Makefile.tpl (.../branches/gupc) (revision 231080) @@ -160,6 +160,8 @@ BUILD_EXPORTS = \ GFORTRAN="$(GFORTRAN_FOR_BUILD)"; export GFORTRAN; \ GOC="$(GOC_FOR_BUILD)"; export GOC; \ GOCFLAGS="$(GOCFLAGS_FOR_BUILD)"; export GOCFLAGS; \ + GUPC="$(GUPC_FOR_BUILD)"; export GUPC; \ + GUPCFLAGS="$(GUPCFLAGS_FOR_BUILD)"; export GUPCFLAGS; \ DLLTOOL="$(DLLTOOL_FOR_BUILD)"; export DLLTOOL; \ LD="$(LD_FOR_BUILD)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_BUILD)"; export LDFLAGS; \ @@ -197,6 +199,7 @@ HOST_EXPORTS = \ GCJ="$(GCJ)"; export GCJ; \ GFORTRAN="$(GFORTRAN)"; export GFORTRAN; \ GOC="$(GOC)"; export GOC; \ + GUPC="$(GUPC)"; export GUPC; \ AR="$(AR)"; export AR; \ AS="$(AS)"; export AS; \ CC_FOR_BUILD="$(CC_FOR_BUILD)"; export CC_FOR_BUILD; \ @@ -283,6 +286,7 @@ BASE_TARGET_EXPORTS = \ GCJ="$(GCJ_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GCJ; \ GFORTRAN="$(GFORTRAN_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GFORTRAN; \ GOC="$(GOC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GOC; \ + GUPC="$(GUPC_FOR_TARGET) $(XGCC_FLAGS_FOR_TARGET) $$TFLAGS"; export GUPC; \ DLLTOOL="$(DLLTOOL_FOR_TARGET)"; export DLLTOOL; \ LD="$(COMPILER_LD_FOR_TARGET)"; export LD; \ LDFLAGS="$(LDFLAGS_FOR_TARGET)"; export LDFLAGS; \ @@ -350,6 +354,7 @@ DLLTOOL_FOR_BUILD = @DLLTOOL_FOR_BUILD@ GCJ_FOR_BUILD = @GCJ_FOR_BUILD@ GFORTRAN_FOR_BUILD = @GFORTRAN_FOR_BUILD@ GOC_FOR_BUILD = @GOC_FOR_BUILD@ +GUPC_FOR_BUILD = @GUPC_FOR_BUILD@ LDFLAGS_FOR_BUILD = @LDFLAGS_FOR_BUILD@ LD_FOR_BUILD = @LD_FOR_BUILD@ NM_FOR_BUILD = @NM_FOR_BUILD@ @@ -414,6 +419,7 @@ LIBCFLAGS = $(CFLAGS) CXXFLAGS = @CXXFLAGS@ LIBCXXFLAGS = $(CXXFLAGS) -fno-implicit-templates GOCFLAGS = $(CFLAGS) +GUPCFLAGS = $(CFLAGS) TFLAGS = @@ -480,6 +486,7 @@ RAW_CXX_FOR_TARGET=$(STAGE_CC_WRAPPER) @ GCJ_FOR_TARGET=$(STAGE_CC_WRAPPER) @GCJ_FOR_TARGET@ GFORTRAN_FOR_TARGET=$(STAGE_CC_WRAPPER) @GFORTRAN_FOR_TARGET@ GOC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GOC_FOR_TARGET@ +GUPC_FOR_TARGET=$(STAGE_CC_WRAPPER) @GUPC_FOR_TARGET@ DLLTOOL_FOR_TARGET=@DLLTOOL_FOR_TARGET@ LD_FOR_TARGET=@LD_FOR_TARGET@ @@ -504,6 +511,7 @@ LIBCFLAGS_FOR_TARGET = $(CFLAGS_FOR_TARG LIBCXXFLAGS_FOR_TARGET = $(CXXFLAGS_FOR_TARGET) -fno-implicit-templates LDFLAGS_FOR_TARGET = @LDFLAGS_FOR_TARGET@ GOCFLAGS_FOR_TARGET = -O2 -g +GUPCFLAGS_FOR_TARGET = -O2 -g FLAGS_FOR_TARGET = @FLAGS_FOR_TARGET@ SYSROOT_CFLAGS_FOR_TARGET = @SYSROOT_CFLAGS_FOR_TARGET@ @@ -605,6 +613,7 @@ EXTRA_HOST_FLAGS = \ 'GCJ=$(GCJ)' \ 'GFORTRAN=$(GFORTRAN)' \ 'GOC=$(GOC)' \ + 'GUPC=$(GUPC)' \ 'LD=$(LD)' \ 'LIPO=$(LIPO)' \ 'NM=$(NM)' \ @@ -661,6 +670,8 @@ EXTRA_TARGET_FLAGS = \ 'GFORTRAN=$$(GFORTRAN_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GOC=$$(GOC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ 'GOCFLAGS=$$(GOCFLAGS_FOR_TARGET)' \ + 'GUPC=$$(GUPC_FOR_TARGET) $$(XGCC_FLAGS_FOR_TARGET) $$(TFLAGS)' \ + 'GUPCFLAGS=$$(GUPCFLAGS_FOR_TARGET)' \ 'LD=$(COMPILER_LD_FOR_TARGET)' \ 'LDFLAGS=$$(LDFLAGS_FOR_TARGET)' \ 'LIBCFLAGS=$$(LIBCFLAGS_FOR_TARGET)' \ Index: configure.ac =================================================================== --- configure.ac (.../trunk) (revision 231059) +++ configure.ac (.../branches/gupc) (revision 231080) @@ -169,6 +169,7 @@ target_libraries="target-libgcc \ target-boehm-gc \ ${libgcj} \ target-libobjc \ + target-libgupc \ target-libada \ target-libgo" @@ -561,6 +562,22 @@ if test x$enable_libgomp = x ; then esac fi +# Disable libgupc on unsupported systems. +if test -d ${srcdir}/libgupc; then + if test x$enable_libgupc = x; then + AC_MSG_CHECKING([for libgupc support]) + if (srcdir=${srcdir}/libgupc; \ + . ${srcdir}/configure.tgt; \ + test -n "$UNSUPPORTED") + then + AC_MSG_RESULT([no]) + noconfigdirs="$noconfigdirs target-libgupc" + else + AC_MSG_RESULT([yes]) + fi + fi +fi + # Disable libatomic on unsupported systems. if test -d ${srcdir}/libatomic; then if test x$enable_libatomic = x; then @@ -1362,6 +1379,7 @@ if test "${build}" != "${host}" ; then GCJ_FOR_BUILD=${GCJ_FOR_BUILD-gcj} GFORTRAN_FOR_BUILD=${GFORTRAN_FOR_BUILD-gfortran} GOC_FOR_BUILD=${GOC_FOR_BUILD-gccgo} + GUPC_FOR_BUILD=${GUPC_FOR_BUILD-gupc} DLLTOOL_FOR_BUILD=${DLLTOOL_FOR_BUILD-dlltool} LD_FOR_BUILD=${LD_FOR_BUILD-ld} NM_FOR_BUILD=${NM_FOR_BUILD-nm} @@ -1376,6 +1394,7 @@ else GCJ_FOR_BUILD="\$(GCJ)" GFORTRAN_FOR_BUILD="\$(GFORTRAN)" GOC_FOR_BUILD="\$(GOC)" + GUPC_FOR_BUILD="\$(GUPC)" DLLTOOL_FOR_BUILD="\$(DLLTOOL)" LD_FOR_BUILD="\$(LD)" NM_FOR_BUILD="\$(NM)" @@ -3302,6 +3321,7 @@ AC_SUBST(DLLTOOL_FOR_BUILD) AC_SUBST(GCJ_FOR_BUILD) AC_SUBST(GFORTRAN_FOR_BUILD) AC_SUBST(GOC_FOR_BUILD) +AC_SUBST(GUPC_FOR_BUILD) AC_SUBST(LDFLAGS_FOR_BUILD) AC_SUBST(LD_FOR_BUILD) AC_SUBST(NM_FOR_BUILD) @@ -3412,6 +3432,7 @@ NCN_STRICT_CHECK_TARGET_TOOLS(GCC_FOR_TA NCN_STRICT_CHECK_TARGET_TOOLS(GCJ_FOR_TARGET, gcj) NCN_STRICT_CHECK_TARGET_TOOLS(GFORTRAN_FOR_TARGET, gfortran) NCN_STRICT_CHECK_TARGET_TOOLS(GOC_FOR_TARGET, gccgo) +NCN_STRICT_CHECK_TARGET_TOOLS(GUPC_FOR_TARGET, gupc) ACX_CHECK_INSTALLED_TARGET_TOOL(AR_FOR_TARGET, ar) ACX_CHECK_INSTALLED_TARGET_TOOL(AS_FOR_TARGET, as) @@ -3447,6 +3468,8 @@ GCC_TARGET_TOOL(gfortran, GFORTRAN_FOR_T [gcc/gfortran -B$$r/$(HOST_SUBDIR)/gcc/], fortran) GCC_TARGET_TOOL(gccgo, GOC_FOR_TARGET, GOC, [gcc/gccgo -B$$r/$(HOST_SUBDIR)/gcc/], go) +GCC_TARGET_TOOL(gupc, GUPC_FOR_TARGET, GUPC, + [gcc/gupc -B$$r/$(HOST_SUBDIR)/gcc/], upc) GCC_TARGET_TOOL(ld, LD_FOR_TARGET, LD, [ld/ld-new]) GCC_TARGET_TOOL(lipo, LIPO_FOR_TARGET, LIPO) GCC_TARGET_TOOL(nm, NM_FOR_TARGET, NM, [binutils/nm-new]) Index: contrib/gcc_update =================================================================== --- contrib/gcc_update (.../trunk) (revision 231059) +++ contrib/gcc_update (.../branches/gupc) (revision 231080) @@ -145,6 +145,11 @@ libgomp/testsuite/Makefile.in: libgomp/t libgomp/configure.ac: libgomp/plugin/configfrag.ac libgomp/configure: libgomp/configure.ac libgomp/aclocal.m4 libgomp/config.h.in: libgomp/configure.ac libgomp/aclocal.m4 +libgupc/aclocal.m4: libgupc/configure.ac libgupc/acinclude.m4 +libgupc/config.h.in: libgupc/configure.ac +libgupc/configure: libgupc/configure.ac libgupc/aclocal.m4 libgupc/acinclude.m4 +libgupc/Makefile.in: libgupc/Makefile.am libgupc/aclocal.m4 +libgupc/testsuite/Makefile.in: libgupc/Makefile.am libgupc/aclocal.m4 libitm/aclocal.m4: libitm/configure.ac libitm/acinclude.m4 libitm/Makefile.in: libitm/Makefile.am libitm/aclocal.m4 libitm/testsuite/Makefile.in: libitm/testsuite/Makefile.am libitm/aclocal.m4 Index: contrib/update-copyright.py =================================================================== --- contrib/update-copyright.py (.../trunk) (revision 231059) +++ contrib/update-copyright.py (.../branches/gupc) (revision 231080) @@ -578,6 +578,7 @@ class TestsuiteFilter (GenericFilter): '.go', '.inc', '.java', + '.upc', ]) def skip_file (self, dir, filename): @@ -710,6 +711,10 @@ class GCCCopyright (Copyright): self.add_external_author ('The Regents of the University of California.') self.add_external_author ('Unicode, Inc.') self.add_external_author ('University of Toronto.') + self.add_external_author ('Michigan Technological University') + self.add_external_author ('Jeff Muizelaar') + self.add_external_author ('Sandia Corporation.') + self.add_external_author ('Oren Ben-Kiki') class GCCCmdLine (CmdLine): def __init__ (self): @@ -733,6 +738,7 @@ class GCCCmdLine (CmdLine): self.add_dir ('libgcc', LibGCCFilter()) self.add_dir ('libgfortran') self.add_dir ('libgomp') + self.add_dir ('libgupc') self.add_dir ('libiberty') self.add_dir ('libitm') self.add_dir ('libjava', LibJavaFilter()) Index: gcc/Makefile.in =================================================================== --- gcc/Makefile.in (.../trunk) (revision 231059) +++ gcc/Makefile.in (.../branches/gupc) (revision 231080) @@ -2948,7 +2948,7 @@ install-no-fixedincludes: doc: $(BUILD_INFO) $(GENERATED_MANPAGES) -INFOFILES = doc/cpp.info doc/gcc.info doc/gccint.info \ +INFOFILES = doc/cpp.info doc/gcc.info doc/gupc.info doc/gccint.info \ doc/gccinstall.info doc/cppinternals.info info: $(INFOFILES) lang.info @GENINSRC@ srcinfo lang.srcinfo @@ -2980,6 +2980,8 @@ TEXI_GCCINT_FILES = gccint.texi gcc-comm loop.texi generic.texi gimple.texi plugins.texi optinfo.texi \ match-and-simplify.texi +TEXI_GUPC_FILES = gupc.texi gcc-common.texi gcc-vers.texi + TEXI_GCCINSTALL_FILES = install.texi install-old.texi fdl.texi \ gcc-common.texi gcc-vers.texi @@ -3006,6 +3008,7 @@ gcc-vers.texi: $(BASEVER) $(DEVPHASE) doc/cpp.info: $(TEXI_CPP_FILES) doc/gcc.info: $(TEXI_GCC_FILES) +doc/gupc.info: $(TEXI_GUPC_FILES) doc/gccint.info: $(TEXI_GCCINT_FILES) doc/cppinternals.info: $(TEXI_CPPINT_FILES) @@ -3086,7 +3089,7 @@ $(build_htmldir)/gccinstall/index.html: DESTDIR=$(@D) \ $(SHELL) $(srcdir)/doc/install.texi2html -MANFILES = doc/gcov.1 doc/cpp.1 doc/gcc.1 doc/gfdl.7 doc/gpl.7 \ +MANFILES = doc/gcov.1 doc/cpp.1 doc/gcc.1 doc/gupc.1 doc/gfdl.7 doc/gpl.7 \ doc/fsf-funding.7 doc/gcov-tool.1 generated-manpages: man Index: gcc/configure.ac =================================================================== --- gcc/configure.ac (.../trunk) (revision 231059) +++ gcc/configure.ac (.../branches/gupc) (revision 231080) @@ -1493,6 +1493,78 @@ AC_DEFINE_UNQUOTED(HAVE_GNU_LD, $gnu_ld_ gnu_as_bool=`if test x"$gas" = x"yes"; then echo 1; else echo 0; fi` AC_DEFINE_UNQUOTED(HAVE_GNU_AS, $gnu_as_bool, [Define to 1 if using GNU as.]) +# +# UPC linker script check. +# (Placed here because depends upon the previous checks for GNU ld.) +# +AC_ARG_ENABLE(upc-link-script, +AS_HELP_STRING( + [--enable-upc-link-script], + [enable UPC's use of a custom linker script; + this will define the UPC shared section as a no load section on + targets where this feature is supported (requires GNU LD)]), +[ + case $enableval in + yes | no) ;; + *) + AC_MSG_ERROR([--enable-upc-link-script accepts only yes or no.]) + ;; + esac +], +[ + # Assume that by default UPC link scripts aren't supported. + enable_upc_link_script=no + if test -n "$gnu_ld" && test x$host = x$target; then + case "$target" in + # disable linker script for Apple Mac OS X + *-*-darwin*) ;; + *) + # Fedora Linux reports as: + # GNU ld version 2.20.51.0.7-8.fc14 20100318 + # SuSE (IA64) Linux reports as: + # GNU ld (GNU Binutils; SUSE Linux Enterprise 11) + # 2.20.0.20100122-0.7.9 +changequote(,)dnl + ld_version=`${LD} --version | \ + sed -ne ' + /^GNU ld version \([0-9][0-9]*\.[0-9][0-9]*\)/ \ + {s/^GNU ld version \([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p; q} + /^GNU ld ([^)]*) \([0-9][0-9]*\.[0-9][0-9]*\)/ \ + {s/^GNU ld ([^)]*) \([0-9][0-9]*\.[0-9][0-9]*\).*$/\1/p; q}'` +changequote([,])dnl + # Get the major/minor version number. + ld_major=`echo $ld_version | sed -e 's/\..*//'` + ld_minor=`echo $ld_version | sed -e 's/.*\.//'` + # Only GNU ld versions 2.18 and up are supported. + if (test $ld_major -eq 2 && test $ld_minor -ge 18) \ + || test $ld_major -gt 2; then + # Tentatively enable the UPC link script. + enable_upc_link_script=yes + fi + ;; + esac + fi +]) +# Perl is required for checking the linker script. +AC_CHECK_PROG(PERL, perl, perl) +if test "$enable_upc_link_script" = yes; then + libgupc_srcdir=`cd ${srcdir}/../libgupc 2>/dev/null && pwd` + gen_ld_script="${libgupc_srcdir}/gen-upc-ld-script.pl" + if ! (test -f "${gen_ld_script}" \ + && test -n "$PERL" \ + && ${LD} --verbose | ${PERL} "${gen_ld_script}" >/dev/null 2>&1); then + # if gen-upc-ld-script did not accept the output of the linker + # then disable UPC link script support. + AC_MSG_WARN([Cannot parse 'ld' output. Disabling UPC link scripts.]) + enable_upc_link_script=no + fi +fi +AC_MSG_CHECKING([for UPC link script support]) +AC_MSG_RESULT($enable_upc_link_script) +if test "$enable_upc_link_script" = yes; then + AC_DEFINE(HAVE_UPC_LINK_SCRIPT, 1, [Define to 1 if UPC link script is supported.]) +fi + count=a for f in $host_xm_file; do count=${count}x Index: gcc/c/Make-lang.in =================================================================== --- gcc/c/Make-lang.in (.../trunk) (revision 231059) +++ gcc/c/Make-lang.in (.../branches/gupc) (revision 231080) @@ -36,7 +36,7 @@ # # Define the names for selecting c in LANGUAGES. -c: cc1$(exeext) +c: cc1$(exeext) gupc$(exeext) # Tell GNU make to ignore these if they exist. .PHONY: c gcc @@ -46,12 +46,35 @@ c: cc1$(exeext) # is to cc1 as e.g. g++ is to cc1plus, or gfortran is to f951). CFLAGS-c/gccspec.o += $(DRIVER_DEFINES) +# The UPC compiler driver: gupc. + +GUPC_INSTALL_NAME := $(shell echo gupc|sed '$(program_transform_name)') +UPC_INSTALL_NAME := $(shell echo upc|sed '$(program_transform_name)') +GUPC_TARGET_INSTALL_NAME := $(target_noncanonical)-$(shell echo gupc|sed '$(program_transform_name)') + +gupcspec.o: $(srcdir)/c/gupcspec.c $(SYSTEM_H) $(TM_H) $(GCC_H) \ + $(CONFIG_H) coretypes.h intl.h $(OPTS_H) + (SHLIB='$(SHLIB)'; \ + $(COMPILER) -c $(ALL_COMPILERFLAGS) $(ALL_CPPFLAGS) $(DRIVER_DEFINES) \ + $(INCLUDES) $(srcdir)/c/gupcspec.c) + +GUPC_D_OBJS = gupcspec.o $(GCC_OBJS) +gupc$(exeext): $(GUPC_D_OBJS) $(EXTRA_GCC_OBJS) \ + libcommon-target.a $(LIBDEPS) + $(LINKER) $(ALL_LINKERFLAGS) $(LDFLAGS) -o $@ \ + $(GUPC_D_OBJS) $(EXTRA_GCC_OBJS) libcommon-target.a \ + $(EXTRA_GCC_LIBS) $(LIBS) + +# UPC specific object files. Presently, available only for C. +UPC_OBJS = c/c-upc-gasp.o c/c-upc-lang.o c/c-upc-low.o \ + c/c-upc-pts-ops.o c/c-upc.o + # The C compiler itself. # Language-specific object files for C and Objective C. C_AND_OBJC_OBJS = attribs.o c/c-errors.o c/c-decl.o c/c-typeck.o \ c/c-convert.o c/c-aux-info.o c/c-objc-common.o c/c-parser.o \ - c/c-array-notation.o $(C_COMMON_OBJS) $(C_TARGET_OBJS) + c/c-array-notation.o $(C_COMMON_OBJS) $(UPC_OBJS) $(C_TARGET_OBJS) # Language-specific object files for C. C_OBJS = c/c-lang.o c-family/stub-objc.o $(C_AND_OBJC_OBJS) @@ -105,7 +128,14 @@ check-c : check-gcc # Install hooks: # cc1 is installed elsewhere as part of $(COMPILERS). -c.install-common: +c.install-common: gupc$(exeext) installdirs + -rm -f $(DESTDIR)$(bindir)/$(GUPC_INSTALL_NAME)$(exeext) + $(INSTALL_PROGRAM) -m 755 gupc$(exeext) $(DESTDIR)$(bindir)/$(GUPC_INSTALL_NAME)$(exeext) + -rm -f $(DESTDIR)$(bindir)/$(GUPC_TARGET_INSTALL_NAME)$(exeext) + cd $(DESTDIR)$(bindir) && \ + $(LN) $(GUPC_INSTALL_NAME)$(exeext) $(GUPC_TARGET_INSTALL_NAME)$(exeext) + -rm -f $(DESTDIR)$(bindir)/$(UPC_INSTALL_NAME)$(exeext) + cd $(DESTDIR)$(bindir) && $(LN_S) $(GUPC_INSTALL_NAME)$(exeext) $(UPC_INSTALL_NAME)$(exeext) c.install-man: c.install-plugin: c.uninstall: Index: gcc/c/config-lang.in =================================================================== --- gcc/c/config-lang.in (.../trunk) (revision 231059) +++ gcc/c/config-lang.in (.../branches/gupc) (revision 231080) @@ -29,4 +29,4 @@ compilers="cc1\$(exeext)" target_libs= -gtfiles="\$(srcdir)/c/c-lang.c \$(srcdir)/c/c-tree.h \$(srcdir)/c/c-decl.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/c/c-objc-common.c \$(srcdir)/c/c-parser.c \$(srcdir)/c/c-lang.h" +gtfiles="\$(srcdir)/c/c-lang.c \$(srcdir)/c/c-tree.h \$(srcdir)/c/c-decl.c \$(srcdir)/c/c-upc-lang.c \$(srcdir)/c/c-upc-low.c \$(srcdir)/c-family/c-common.c \$(srcdir)/c-family/c-common.h \$(srcdir)/c-family/c-objc.h \$(srcdir)/c-family/c-cppbuiltin.c \$(srcdir)/c-family/c-pragma.h \$(srcdir)/c-family/c-pragma.c \$(srcdir)/c/c-objc-common.c \$(srcdir)/c/c-parser.c \$(srcdir)/c/c-lang.h"