On Tue, 16 Oct 2018 at 19:01, Richard Sandiford
<richard.sandif...@arm.com> wrote:
>
> Iain Buclaw <ibuc...@gdcproject.org> 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.
>
> > +# 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.
>
> > +  # 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.
>
> > --- /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.
>
> > 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.
>
> > +// { 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.
>
> OK otherwise, thanks.
>
> I think that's the last of the unreviewed patches.  Let me know
> if I missed one.
>

Attaching updates as per above comments.

Regards
--
Iain
diff --git a/libphobos/configure b/libphobos/configure
index 42be84d394d..3f6522f0fe3 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -4562,7 +4562,7 @@ $as_echo "no" >&6; }
        as_fn_error "can't compile D sources!" "$LINENO" 5
 fi
 rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext
-      ac_ext=c
+  ac_ext=c
 ac_cpp='$CPP $CPPFLAGS'
 ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
 ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
diff --git a/libphobos/d_rules.am b/libphobos/d_rules.am
index b16cf5052d2..958b7c1209b 100644
--- a/libphobos/d_rules.am
+++ b/libphobos/d_rules.am
@@ -1,5 +1,19 @@
-# This file contains some common rules for D source compilation
-# used for libdruntime and libphobos
+## Common rules for D source compilation used in all Makefile.am's.
+## Copyright (C) 2016-2018 Free Software Foundation, Inc.
+##
+## GCC is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3, or (at your option)
+## any later version.
+##
+## GCC is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GCC; see the file COPYING3.  If not see
+## <http://www.gnu.org/licenses/>.
 
 # If there are no sources with known extension (i.e. only D sources)
 # automake forgets to set this
diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in
index eb8290c1b5c..70389263c2d 100644
--- a/libphobos/libdruntime/Makefile.in
+++ b/libphobos/libdruntime/Makefile.in
@@ -32,9 +32,6 @@
 # along with GCC; see the file COPYING3.  If not see
 # <http://www.gnu.org/licenses/>.
 
-# This file contains some common rules for D source compilation
-# used for libdruntime and libphobos
-
 VPATH = @srcdir@
 am__make_dryrun = \
   { \
diff --git a/libphobos/m4/autoconf.m4 b/libphobos/m4/autoconf.m4
index 54e64dfac54..e1ed4a80042 100644
--- a/libphobos/m4/autoconf.m4
+++ b/libphobos/m4/autoconf.m4
@@ -9,9 +9,6 @@
 
 # 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)
 AC_LANG_DEFINE([D], [d], [GDC], [],
 [ac_ext=d
 ac_compile='$GDC -c $GDCFLAGS conftest.$ac_ext >&AS_MESSAGE_LOG_FD'
diff --git a/libphobos/m4/druntime/os.m4 b/libphobos/m4/druntime/os.m4
index b67acb3cb45..76d35c8ccbc 100644
--- a/libphobos/m4/druntime/os.m4
+++ b/libphobos/m4/druntime/os.m4
@@ -48,7 +48,6 @@ AC_DEFUN([DRUNTIME_OS_DETECT],
     [[druntime_cv_target_os=`echo $target_os | sed 's/^\([A-Za-z_]+\)/\1/'`]])
     AS_IF([[test -z "$druntime_cv_target_os"]],
       [AC_MSG_ERROR([[can't detect target OS]])],
-      dnl fix vi syntax highlight bug. '
       [])
 ])
 
diff --git a/libphobos/m4/gcc_support.m4 b/libphobos/m4/gcc_support.m4
index 24c01b2b308..0903ed4b45f 100644
--- a/libphobos/m4/gcc_support.m4
+++ b/libphobos/m4/gcc_support.m4
@@ -17,7 +17,6 @@ AC_DEFUN([PHOBOS_ABS_SRCDIR], [
     AS_IF([[test -d "$phobos_cv_abs_srcdir"]],
       [],
       [AC_MSG_ERROR([[can't find absolute libphobos source path]])])
-      dnl fix vi syntax highlight bug. '
 ])
 
 
diff --git a/libphobos/m4/gdc.m4 b/libphobos/m4/gdc.m4
index 99a5c4ea43a..1ba8834975a 100644
--- a/libphobos/m4/gdc.m4
+++ b/libphobos/m4/gdc.m4
@@ -14,6 +14,5 @@ AC_DEFUN([GDC_CHECK_COMPILE],
       [AC_MSG_RESULT([[yes]])],
       [AC_MSG_RESULT([[no]])
        AC_MSG_ERROR([[can't compile D sources!]])])
-    dnl fix vi syntax highlight bug. '
   AC_LANG_POP(D)
 ])
diff --git a/libphobos/src/Makefile.am b/libphobos/src/Makefile.am
index 6f9aeeb207a..950631723ae 100644
--- a/libphobos/src/Makefile.am
+++ b/libphobos/src/Makefile.am
@@ -1,19 +1,19 @@
-# Makefile for the Phobos standard library.
-# Copyright (C) 2012-2017 Free Software Foundation, Inc.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
+## Makefile for the Phobos standard library.
+## Copyright (C) 2012-2018 Free Software Foundation, Inc.
+##
+## GCC is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3, or (at your option)
+## any later version.
+##
+## GCC is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GCC; see the file COPYING3.  If not see
+## <http://www.gnu.org/licenses/>.
 
 # Include D build rules
 include $(top_srcdir)/d_rules.am
diff --git a/libphobos/src/Makefile.in b/libphobos/src/Makefile.in
index f99a1056543..2b3b10e3552 100644
--- a/libphobos/src/Makefile.in
+++ b/libphobos/src/Makefile.in
@@ -15,26 +15,6 @@
 
 @SET_MAKE@
 
-# Makefile for the Phobos standard library.
-# Copyright (C) 2012-2017 Free Software Foundation, Inc.
-#
-# GCC is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 3, or (at your option)
-# any later version.
-#
-# GCC is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with GCC; see the file COPYING3.  If not see
-# <http://www.gnu.org/licenses/>.
-
-# This file contains some common rules for D source compilation
-# used for libdruntime and libphobos
-
 
 VPATH = @srcdir@
 am__make_dryrun = \
diff --git a/libphobos/testsuite/Makefile.am b/libphobos/testsuite/Makefile.am
index dd99d9d871e..d640c0bb643 100644
--- a/libphobos/testsuite/Makefile.am
+++ b/libphobos/testsuite/Makefile.am
@@ -1,4 +1,21 @@
-## Process this file with automake to produce Makefile.in.
+## Makefile for the testsuite subdirectory of the D Standard library.
+## Copyright (C) 2016-2018 Free Software Foundation, Inc.
+##
+## GCC is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 3, or (at your option)
+## any later version.
+##
+## GCC is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+## GNU General Public License for more details.
+##
+## You should have received a copy of the GNU General Public License
+## along with GCC; see the file COPYING3.  If not see
+## <http://www.gnu.org/licenses/>.
+
+# Process this file with automake to produce Makefile.in.
 
 AUTOMAKE_OPTIONS = foreign dejagnu
 
diff --git a/libphobos/testsuite/Makefile.in b/libphobos/testsuite/Makefile.in
index 5529eddd8c1..ab18deb4666 100644
--- a/libphobos/testsuite/Makefile.in
+++ b/libphobos/testsuite/Makefile.in
@@ -14,6 +14,8 @@
 # PARTICULAR PURPOSE.
 
 @SET_MAKE@
+
+# Process this file with automake to produce Makefile.in.
 VPATH = @srcdir@
 am__make_dryrun = \
   { \
diff --git a/libphobos/testsuite/libphobos.exceptions/static_dtor.d b/libphobos/testsuite/libphobos.exceptions/static_dtor.d
index 1a03ee01a0d..37a49b458ad 100644
--- a/libphobos/testsuite/libphobos.exceptions/static_dtor.d
+++ b/libphobos/testsuite/libphobos.exceptions/static_dtor.d
@@ -1,6 +1,6 @@
 // { dg-shouldfail "static_dtor_exception" }
 // { dg-output "object.Exception@.*: static_dtor_exception" }
-// Issue 16594
+// https://issues.dlang.org/show_bug.cgi?id=16594
 import core.stdc.stdio;
 
 shared static ~this()

Reply via email to