public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.
@ 2022-05-16 17:05 ibuclaw
  2022-05-18 14:40 ` Rainer Orth
  0 siblings, 1 reply; 3+ messages in thread
From: ibuclaw @ 2022-05-16 17:05 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 2832 bytes --]

Hi,

Upstream dmd has now released v2.100.0, this patch merges in the
latest bug fixes since the last sync-up of the release branch, as well
as all new feature changes on development branch.

D front-end changes:

    - Import dmd v2.100.0.
    - Add bit fields to D, enabled via the -fpreview=bitfields switch.
    - Removed the -ftransition=markdown and -frevert=markdown switches.
    - Added new trait `__traits(classInstanceAlignment)' to provide the
      required data alignment for classes.
    - The check for `pragma(crt_constructor)' and `pragma(crt_destructor)'
      linkage has been relaxed to allow all `void()' signatures.
    - ImportC parser now recognizes the `typeof(...)' operator.

D runtime changes:

    - Import druntime v2.100.0.

Phobos changes:

    - Import phobos v2.100.0.
    - To comply with dip1000, `std.socket.Socket` methods now accept only
      `scope' arrays.
    - The `fill', `alignSize', `align2', and `align4' methods of
      `std.outbuffer.OutBuffer' have been extended to allow specifying a custom
      value when pre-filling or padding the buffer.

Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and
committed to mainline.

Regards,
Iain.

---
gcc/d/ChangeLog:

        * dmd/MERGE: Merge upstream dmd 60bfa0ee7.
        * dmd/VERSION: Update version to v2.100.0.
        * d-builtins.cc (d_init_versions): Update for new front-end interface.
        * d-codegen.cc (d_decl_context): Use resolvedLinkage to get
        declaration linkage.
        (build_struct_literal): Track offset in bits.
        * d-gimplify.cc (d_gimplify_modify_expr): Check both operands for a
        bit-field reference.
        * d-lang.cc (d_handle_option): Handle -fpreview=bitfields, remove
        -frevert=markdown and -ftransition=vmarkdown.
        (d_post_options): Set flag_rtti and flag_exceptions if -fno-druntime
        was seen on command-line.
        (d_parse_file): Update for new front-end interface.
        (d_type_promotes_to): Use resolvedLinkage to get declaration linkage.
        * decl.cc (make_thunk): Likewise.
        * expr.cc (ExprVisitor::visit (CatAssignExp *)): Remove lowering for
        appending of an element or array to another array.
        * lang.opt (fpreview=bitfields): New option.
        (frevert=markdown): Remove.
        (ftransition=vmarkdown): Remove.
        * types.cc (layout_aggregate_members): Ignore anonymous fields in
        total count.

libphobos/ChangeLog:

        * libdruntime/MERGE: Merge upstream druntime 94bd5bcb.
        * libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Add
        $(DRUNTIME_DSOURCES_ELF).
        (ALL_DRUNTIME_SOURCES): Likewise.
        (DRUNTIME_DSOURCES_ELF): New variable.
        * libdruntime/Makefile.in: Regenerate.
        * src/MERGE: Merge upstream phobos 3a1cd9a01.
---

[-- Attachment #2: 0001-d-Merge-upstream-dmd-60bfa0ee7-druntime-94bd5bcb-pho.patch.xz --]
[-- Type: application/x-xz, Size: 102052 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.
  2022-05-16 17:05 [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01 ibuclaw
@ 2022-05-18 14:40 ` Rainer Orth
  2022-05-27 23:04   ` Iain Buclaw
  0 siblings, 1 reply; 3+ messages in thread
From: Rainer Orth @ 2022-05-18 14:40 UTC (permalink / raw)
  To: ibuclaw--- via Gcc-patches

[-- Attachment #1: Type: text/plain, Size: 1658 bytes --]

Hi Iain,

> Upstream dmd has now released v2.100.0, this patch merges in the
> latest bug fixes since the last sync-up of the release branch, as well
> as all new feature changes on development branch.
[...]
> D runtime changes:
>
>     - Import druntime v2.100.0.
>
> Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and
> committed to mainline.

this patch broke Solaris bootstrap:

/vol/gcc/src/hg/master/local/libphobos/libdruntime/core/sys/solaris/link.d-mixin-162:162:7: error: struct 'core.sys.elf.Elf32_Dyn' at /vol/gcc/src/hg/master/local/libphobos/libdruntime/core/sys/elf/package.d:620:1 conflicts with struct 'core.sys.solaris.sys.link.Elf32_Dyn' at /vol/gcc/src/hg/master/local/libphobos/libdruntime/core/sys/solaris/sys/link.d:15:1
/vol/gcc/src/hg/master/local/libphobos/libdruntime/gcc/sections/elf.d:743:9: error: template instance 'core.sys.solaris.link.ElfW!"Dyn"' error instantiating
  743 |         ElfW!"Dyn"[] dyns;
      |         ^

and similarly for Elf64_Dyn.

There were also redefinition errors for DT_NEEDED, DT_STRTAB,
DT_AUXILIARY, and DT_FILTER.

The following patch avoids those by removing the Elf??_Dyn declarations
from core/sys/solaris/sys/link.d resp. adding the missing d_off field in
core/sys/elf/package.d, as well as the duplicate DT_* definitions.  I've
not yet fully checked if there are other duplicates or declarations in
current Solaris <sys/link.h> etc. that are missing from the D headers.

This was enough to restore bootstrap for now.

	Rainer

-- 
-----------------------------------------------------------------------------
Rainer Orth, Center for Biotechnology, Bielefeld University



[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: sol2-libphobos-elf.patch --]
[-- Type: text/x-patch, Size: 1576 bytes --]

diff --git a/libphobos/libdruntime/core/sys/elf/package.d b/libphobos/libdruntime/core/sys/elf/package.d
--- a/libphobos/libdruntime/core/sys/elf/package.d
+++ b/libphobos/libdruntime/core/sys/elf/package.d
@@ -624,6 +624,7 @@ struct Elf32_Dyn
   {
       Elf32_Word d_val;
       Elf32_Addr d_ptr;
+      Elf32_Off  d_off;
   } _d_un d_un;
 }
 
diff --git a/libphobos/libdruntime/core/sys/solaris/sys/link.d b/libphobos/libdruntime/core/sys/solaris/sys/link.d
--- a/libphobos/libdruntime/core/sys/solaris/sys/link.d
+++ b/libphobos/libdruntime/core/sys/solaris/sys/link.d
@@ -10,35 +10,13 @@ extern (C):
 nothrow:
 
 public import core.sys.solaris.sys.elftypes;
+public import core.sys.elf;
 import core.stdc.config;
 
-struct Elf32_Dyn
-{
-    Elf32_Sword d_tag;
-    union _d_un
-    {
-        Elf32_Word d_val;
-        Elf32_Addr d_ptr;
-        Elf32_Off  d_off;
-    } _d_un d_un;
-}
-
-struct Elf64_Dyn
-{
-    Elf64_Xword d_tag;
-    union _d_un
-    {
-        Elf64_Xword d_val;
-        Elf64_Addr  d_ptr;
-    } _d_un d_un;
-}
-
 enum DT_NULL         = 0;
-enum DT_NEEDED       = 1;
 enum DT_PLTRELSZ     = 2;
 enum DT_PLTGOT       = 3;
 enum DT_HASH         = 4;
-enum DT_STRTAB       = 5;
 enum DT_SYMTAB       = 6;
 enum DT_RELA         = 7;
 enum DT_RELASZ       = 8;
@@ -138,9 +116,7 @@ enum DT_VERNEED    = 0x6ffffffe;
 enum DT_VERNEEDNUM = 0x6fffffff;
 
 enum DT_LOPROC    = 0x70000000;
-enum DT_AUXILIARY = 0x7ffffffd;
 enum DT_USED      = 0x7ffffffe;
-enum DT_FILTER    = 0x7fffffff;
 enum DT_HIPROC    = 0x7fffffff;
 
 enum DF_ORIGIN     = 0x00000001;

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01.
  2022-05-18 14:40 ` Rainer Orth
@ 2022-05-27 23:04   ` Iain Buclaw
  0 siblings, 0 replies; 3+ messages in thread
From: Iain Buclaw @ 2022-05-27 23:04 UTC (permalink / raw)
  To: ibuclaw--- via Gcc-patches, Rainer Orth

Excerpts from Rainer Orth's message of Mai 18, 2022 4:40 pm:
> Hi Iain,
> 
>> Upstream dmd has now released v2.100.0, this patch merges in the
>> latest bug fixes since the last sync-up of the release branch, as well
>> as all new feature changes on development branch.
> [...]
>> D runtime changes:
>>
>>     - Import druntime v2.100.0.
>>
>> Bootstrapped and regression tested on x86_64-linux-gnu/-m32/-mx32, and
>> committed to mainline.
> 
> this patch broke Solaris bootstrap:
> 

Hi Rainer,

Thanks for the hint. I've sent an upstream patch to remove all
definitions that conflict with core.sys.elf, and checked that
libdruntime bootstraps successfully again.

Will downstream the patch once its in.

Iain.

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-05-27 23:04 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-05-16 17:05 [committed] d: Merge upstream dmd 60bfa0ee7, druntime 94bd5bcb, phobos 3a1cd9a01 ibuclaw
2022-05-18 14:40 ` Rainer Orth
2022-05-27 23:04   ` Iain Buclaw

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).