[arch-commits] Commit in gcc/trunk (5 files)

Bartłomiej Piotrowski bpiotrowski at archlinux.org
Wed Oct 30 16:33:08 UTC 2019


    Date: Wednesday, October 30, 2019 @ 16:33:08
  Author: bpiotrowski
Revision: 366100

9.2.0-4: more D wizardry (thanks Daniel Kozak!)

Added:
  gcc/trunk/gdc_artificial_decl.patch
  gcc/trunk/gdc_phobos_path.patch
    (from rev 366099, gcc/trunk/phobos_path.patch)
  gcc/trunk/gdc_thunk_weak_ref.patch
Modified:
  gcc/trunk/PKGBUILD
Deleted:
  gcc/trunk/phobos_path.patch

---------------------------+
 PKGBUILD                  |   23 +++++++++++++++--------
 gdc_artificial_decl.patch |   43 +++++++++++++++++++++++++++++++++++++++++++
 gdc_phobos_path.patch     |   14 ++++++++++++++
 gdc_thunk_weak_ref.patch  |   14 ++++++++++++++
 phobos_path.patch         |   14 --------------
 5 files changed, 86 insertions(+), 22 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2019-10-30 15:14:25 UTC (rev 366099)
+++ PKGBUILD	2019-10-30 16:33:08 UTC (rev 366100)
@@ -1,5 +1,6 @@
 # Maintainer:  Bartłomiej Piotrowski <bpiotrowski at archlinux.org>
 # Contributor: Allan McRae <allan at archlinux.org>
+# Contributor: Daniel Kozak <kozzi11 at gmail.com>
 
 # toolchain build order: linux-api-headers->glibc->binutils->gcc->binutils->glibc
 # NOTE: libtool requires rebuilt with each new gcc version
@@ -8,7 +9,7 @@
 pkgver=9.2.0
 _majorver=${pkgver:0:1}
 _islver=0.21
-pkgrel=3
+pkgrel=4
 pkgdesc='The GNU Compiler Collection'
 arch=(x86_64)
 license=(GPL LGPL FDL custom)
@@ -20,8 +21,10 @@
 source=(https://ftp.gnu.org/gnu/gcc/gcc-$pkgver/gcc-$pkgver.tar.xz{,.sig}
 #source=(gcc::svn://gcc.gnu.org/svn/gcc/branches/gcc-${_majorver}-branch
         http://isl.gforge.inria.fr/isl-${_islver}.tar.xz
-        phobos_path.patch
-        c89 c99)
+        c89 c99
+        gdc_phobos_path.patch
+        gdc_artificial_decl.patch
+        gdc_thunk_weak_ref.patch)
 validpgpkeys=(F3691687D867B81B51CE07D9BBE43771487328A9  # bpiotrowski at archlinux.org
               86CFFCA918CF3AF47147588051E8B148A9999C34  # evangelos at foutrelis.com
               13975A70E63C361C73AE69EF6EEB81F8981C74C7  # richard.guenther at gmail.com
@@ -29,9 +32,11 @@
 sha256sums=('ea6ef08f121239da5695f76c9b33637a118dcf63e24164422231917fa61fb206'
             'SKIP'
             '777058852a3db9500954361e294881214f6ecd4b594c00da5eee974cd6a54960'
+            'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
+            '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a'
             'c86372c207d174c0918d4aedf1cb79f7fc093649eb1ad8d9450dccc46849d308'
-            'de48736f6e4153f03d0a5d38ceb6c6fdb7f054e8f47ddd6af0a3dbf14f27b931'
-            '2513c6d9984dd0a2058557bf00f06d8d5181734e41dcfe07be7ed86f2959622a')
+            '3862757491160700ac2fb723096f6f636f30320cccc6efd9537149ed348b57d1'
+            '9699d7105375754f0dcf6abff87d09b270565bfc6578a13641770f3fc62d678a')
 
 _svnrev=264010
 _svnurl=svn://gcc.gnu.org/svn/gcc/branches/gcc-${_majorver}-branch
@@ -72,7 +77,9 @@
   sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
 
   # D hacks
-  patch -p1 -i "$srcdir/phobos_path.patch"
+  patch -p1 -i "$srcdir/gdc_phobos_path.patch"
+  patch -p1 -i "$srcdir/gdc_artificial_decl.patch"
+  patch -p1 -i "$srcdir/gdc_thunk_weak_ref.patch"
   #sed -i "/GDCFLAGSX=/s/-Wall/-shared-libphobos -Wall/" libphobos/configure
 
   mkdir -p "$srcdir/gcc-build"
@@ -416,8 +423,8 @@
   install -Dm755 gcc/d21 "$pkgdir"/"$_libdir"/d21
 
   make -C $CHOST/libphobos DESTDIR="$pkgdir" install
-  rm -f "$pkgdir/usr/lib/"lib{gphobos,gdruntime}.{so,a}*
-  rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.{so,a}*
+  rm -f "$pkgdir/usr/lib/"lib{gphobos,gdruntime}.so*
+  rm -f "$pkgdir/usr/lib32/"lib{gphobos,gdruntime}.so*
 
   install -d "$pkgdir"/usr/include/dlang
   ln -s /"${_libdir}"/include/d "$pkgdir"/usr/include/dlang/gdc

Added: gdc_artificial_decl.patch
===================================================================
--- gdc_artificial_decl.patch	                        (rev 0)
+++ gdc_artificial_decl.patch	2019-10-30 16:33:08 UTC (rev 366100)
@@ -0,0 +1,43 @@
+diff --git a/gcc/d/d-tree.h b/gcc/d/d-tree.h
+index a514bc3902f..303d52390c2 100644
+--- a/gcc/d/d-tree.h
++++ b/gcc/d/d-tree.h
+@@ -600,6 +600,7 @@ extern tree d_signed_type (tree);
+ extern void d_keep (tree);
+ 
+ /* In decl.cc.  */
++extern const char *mangle_decl (Dsymbol *);
+ extern tree mangle_internal_decl (Dsymbol *, const char *, const char *);
+ extern void build_decl_tree (Dsymbol *);
+ extern tree get_symbol_decl (Declaration *);
+diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc
+index 49723649230..90871b4c90b 100644
+--- a/gcc/d/decl.cc
++++ b/gcc/d/decl.cc
+@@ -59,7 +59,7 @@ along with GCC; see the file COPYING3.  If not see
+ 
+ /* Return identifier for the external mangled name of DECL.  */
+ 
+-static const char *
++const char *
+ mangle_decl (Dsymbol *decl)
+ {
+   if (decl->isFuncDeclaration ())
+diff --git a/gcc/d/typeinfo.cc b/gcc/d/typeinfo.cc
+index bbd3961181d..a678b7938a6 100644
+--- a/gcc/d/typeinfo.cc
++++ b/gcc/d/typeinfo.cc
+@@ -1107,8 +1107,12 @@ public:
+ 	CONSTRUCTOR_APPEND_ELT (elms, size_int (i),
+ 				build_typeinfo (d->loc, arg->type));
+       }
++
++    const char *prefix = concat (GDC_PREFIX ("__tuple"),
++          mangle_decl (Module::rootModule), NULL);
++
+     tree ctor = build_constructor (build_ctype (satype), elms);
+-    tree decl = build_artificial_decl (TREE_TYPE (ctor), ctor);
++    tree decl = build_artificial_decl (TREE_TYPE (ctor), ctor, prefix);
+ 
+     /* The internal pointer reference should be public, but not visible outside
+        the compilation unit, as it's referencing COMDAT decls.  */

Copied: gcc/trunk/gdc_phobos_path.patch (from rev 366099, gcc/trunk/phobos_path.patch)
===================================================================
--- gdc_phobos_path.patch	                        (rev 0)
+++ gdc_phobos_path.patch	2019-10-30 16:33:08 UTC (rev 366100)
@@ -0,0 +1,14 @@
+diff -Naur a/gcc/d/d-incpath.cc b/gcc/d/d-incpath.cc
+--- a/gcc/d/d-incpath.cc	2019-01-01 13:31:55.000000000 +0100
++++ b/gcc/d/d-incpath.cc	2019-06-28 08:32:00.326241502 +0200
+@@ -140,7 +140,7 @@
+ 	    path = xstrdup (p->fname);
+ 
+ 	  /* Add D-specific suffix.  */
+-	  path = concat (path, "/d", NULL);
++	  path = concat (path, "/dlang/gdc", NULL);
+ 
+ 	  /* Ignore duplicate entries.  */
+ 	  bool found = false;
+
+ 

Added: gdc_thunk_weak_ref.patch
===================================================================
--- gdc_thunk_weak_ref.patch	                        (rev 0)
+++ gdc_thunk_weak_ref.patch	2019-10-30 16:33:08 UTC (rev 366100)
@@ -0,0 +1,14 @@
+diff --git a/gcc/d/decl.cc b/gcc/d/decl.cc
+index 49723649230..d31f6bef8d4 100644
+--- a/gcc/d/decl.cc
++++ b/gcc/d/decl.cc
+@@ -1817,6 +1817,9 @@ make_thunk (FuncDeclaration *decl, int offset)
+   DECL_COMDAT (thunk) = DECL_COMDAT (function);
+   DECL_WEAK (thunk) = DECL_WEAK (function);
+ 
++  if (DECL_VISIBILITY (function) == 0)
++    DECL_WEAK (thunk) = 1;
++
+   tree target_name = DECL_ASSEMBLER_NAME (function);
+   unsigned identlen = IDENTIFIER_LENGTH (target_name) + 14;
+   const char *ident = XNEWVEC (const char, identlen);

Deleted: phobos_path.patch
===================================================================
--- phobos_path.patch	2019-10-30 15:14:25 UTC (rev 366099)
+++ phobos_path.patch	2019-10-30 16:33:08 UTC (rev 366100)
@@ -1,14 +0,0 @@
-diff -Naur a/gcc/d/d-incpath.cc b/gcc/d/d-incpath.cc
---- a/gcc/d/d-incpath.cc	2019-01-01 13:31:55.000000000 +0100
-+++ b/gcc/d/d-incpath.cc	2019-06-28 08:32:00.326241502 +0200
-@@ -140,7 +140,7 @@
- 	    path = xstrdup (p->fname);
- 
- 	  /* Add D-specific suffix.  */
--	  path = concat (path, "/d", NULL);
-+	  path = concat (path, "/dlang/gdc", NULL);
- 
- 	  /* Ignore duplicate entries.  */
- 	  bool found = false;
-
- 



More information about the arch-commits mailing list