From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 100823 invoked by alias); 18 Oct 2018 22:27:34 -0000 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Received: (qmail 100810 invoked by uid 89); 18 Oct 2018 22:27:33 -0000 Authentication-Results: sourceware.org; auth=none X-Spam-SWARE-Status: No, score=-24.4 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,GIT_PATCH_0,GIT_PATCH_1,GIT_PATCH_2,GIT_PATCH_3,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=ham version=3.3.2 spammy=dark, EXPECT, partly, hoped X-HELO: mail-qt1-f193.google.com Received: from mail-qt1-f193.google.com (HELO mail-qt1-f193.google.com) (209.85.160.193) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Thu, 18 Oct 2018 22:27:31 +0000 Received: by mail-qt1-f193.google.com with SMTP id l41-v6so36204328qtl.8 for ; Thu, 18 Oct 2018 15:27:31 -0700 (PDT) MIME-Version: 1.0 References: <874ldlg70e.fsf@arm.com> In-Reply-To: <874ldlg70e.fsf@arm.com> From: Iain Buclaw Date: Thu, 18 Oct 2018 23:19:00 -0000 Message-ID: Subject: Re: [PATCH 14/14] Add D Phobos config, makefiles, and testsuite. To: gcc-patches , richard.sandiford@arm.com Content-Type: text/plain; charset="UTF-8" X-IsSubscribed: yes X-SW-Source: 2018-10/txt/msg01157.txt.bz2 On Tue, 16 Oct 2018 at 19:01, Richard Sandiford wrote: > > Iain Buclaw writes: > > diff --git a/libphobos/d_rules.am b/libphobos/d_rules.am > > new file mode 100644 > > index 00000000000..b16cf5052d2 > > --- /dev/null > > +++ b/libphobos/d_rules.am > > @@ -0,0 +1,60 @@ > > +# This file contains some common rules for D source compilation > > +# used for libdruntime and libphobos > > + > > +# If there are no sources with known extension (i.e. only D sources) > > +# automake forgets to set this > > Needs a copyright notice and licence. > OK. > > +# AC_LANG(D) > > +# ----------- > > +# (we have to use GDC as variable prefix as our GCC patches set GDC > > +# GDC_FOR_BUILD etc. If we ever want to support other D compilers all > > +# names need to be changed to DC) > > Seems like this is still talking about GDC as a separate project. > Will remove. > > + # This checks to see if the host supports the compiler-generated builtins > > + # for atomic operations for various integral sizes. Note, this is intended > > + # to be an all-or-nothing switch, so all the atomic operations that are > > + # used should be checked. > > + AC_MSG_CHECKING([for atomic builtins for byte]) > > + AC_CACHE_VAL(druntime_cv_atomic_byte, [ > > + AC_TRY_LINK( > > + [import gcc.builtins;], [ > > + shared(byte) c1; > > + byte c2, c3; > > + __atomic_compare_exchange_1(&c1, &c2, c3, false, 5, 5); > > + __atomic_load_1(&c1, 5); > > + __atomic_store_1(&c1, c2, 5); > > + return 0; > > + ], > > + [druntime_cv_atomic_byte=yes], > > + [druntime_cv_atomic_byte=no]) > > + ]) > > + AC_MSG_RESULT($druntime_cv_atomic_byte) > > Link tests generally don't work for newlib targets, since they often > require a specific command-line option to specify the target system. > But perhaps you don't support newlib targets anyway. Either way, > it shouldn't hold up acceptance. > Targets using newlib are definitely not supported. First off, there would need to be relevant C bindings added to the druntime library where appropriate. > > --- /dev/null > > +++ b/libphobos/src/Makefile.am > > @@ -0,0 +1,211 @@ > > +# Makefile for the Phobos standard library. > > +# Copyright (C) 2012-2017 Free Software Foundation, Inc. > > 2012-2018. > I will follow this up with a patch to contrib/update_copyrights.py so that this is never missed in future. > > diff --git a/libphobos/testsuite/Makefile.am b/libphobos/testsuite/Makefile.am > > new file mode 100644 > > index 00000000000..dd99d9d871e > > --- /dev/null > > +++ b/libphobos/testsuite/Makefile.am > > @@ -0,0 +1,15 @@ > > +## Process this file with automake to produce Makefile.in. > > + > > +AUTOMAKE_OPTIONS = foreign dejagnu > > + > > +# Setup the testing framework, if you have one > > +EXPECT = $(shell if test -f $(top_builddir)/../expect/expect; then \ > > + echo $(top_builddir)/../expect/expect; else echo expect; fi) > > + > > +_RUNTEST = $(shell if test -f $(top_srcdir)/../dejagnu/runtest; then \ > > + echo $(top_srcdir)/../dejagnu/runtest; else echo runtest; fi) > > +RUNTEST = "$(_RUNTEST) $(AM_RUNTESTFLAGS)" > > + > > +AM_MAKEFLAGS = "EXEEXT=$(EXEEXT)" > > + > > +CLEANFILES = *.log *.sum > > Should probably have a copyright & licence here too, even though > it's small, since it could grow in future. > OK, done. > > +// { dg-shouldfail "static_dtor_exception" } > > +// { dg-output "object.Exception@.*: static_dtor_exception" } > > +// Issue 16594 > > +import core.stdc.stdio; > > Which bug tracker is this referring to? Maybe a URI would be better, > to avoid confusion with GCC's bugzilla. Same for other bugzilla > references in later tests. Or just remove if the tracker isn't public. > They are referring to upstream bug-tracker http://issues.dlang.org/ I'll fix them up accordingly here, will also send them upstream too as clickable links are generally favoured. > > I think that's the last of the unreviewed patches. Let me know > if I missed one. > Addressing these comments has taken a little longer than I hoped, partly due to time constraints on my side leaving me to go through this during the dark hours of the night. What else would be left to do here once all has been addressed? Thanks. -- Iain