On Tue, 22 Jan 2019 at 17:29, Maya Rashish <co...@sdf.org> wrote: > > libphobos/libdruntime changes were contributed upstream: > https://github.com/dlang/druntime/pull/2472 > (caveat: pending a change to netbsd/execinfo.d) > > One missing patch is needed for GDC to work. > > gcc/config.gcc (*-*-netbsd*): add netbsd-d.o > gcc/config/t-netbsd: add netbsd-d.o > > gcc/d/d-builtins.cc: add NetBSD > gcc/d/d-system.h: NetBSD is POSIX > gcc/d/dmd/globals.h: add isNetBSD > > libphobos/configure.tgt: Mark netbsd/x86 as supported > > --- > gcc/config.gcc | 2 ++ > gcc/config/t-netbsd | 4 ++++ > gcc/d/d-builtins.cc | 2 ++ > gcc/d/d-system.h | 3 ++- > gcc/d/dmd/globals.h | 1 + > libphobos/configure.tgt | 2 ++ > 6 files changed, 13 insertions(+), 1 deletion(-) >
Thanks. > diff --git a/gcc/d/d-builtins.cc b/gcc/d/d-builtins.cc > index b0a315a3ed9..ca105c7635d 100644 > --- a/gcc/d/d-builtins.cc > +++ b/gcc/d/d-builtins.cc > @@ -382,6 +382,8 @@ d_add_builtin_version (const char* ident) > global.params.isWindows = true; > else if (strcmp (ident, "FreeBSD") == 0) > global.params.isFreeBSD = true; > + else if (strcmp (ident, "NetBSD") == 0) > + global.params.isNetBSD = true; > else if (strcmp (ident, "OpenBSD") == 0) > global.params.isOpenBSD = true; > else if (strcmp (ident, "Solaris") == 0) Is this necessary? I'd prefer to not set this field if it can be avoided. The same goes for the others, I intend to remove them at soonest convenience once the problematic parts of the front-end logic has been abstracted away. Other than that, looks reasonable to me. Iain.