Skip to content
This repository was archived by the owner on Jun 20, 2019. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion gcc.version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
gcc-9-20180715
gcc-9-20180729
6 changes: 6 additions & 0 deletions gcc/d/ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
2018-07-23 Eugene Wissner <belka@caraus.de>

* d-lang.cc (d_handle_option): Change function argument to HOST_WIDE_INT.
* lang.opt (Walloca-larger-than=, Wno-alloca-larger-than): New options.
* opt.texi (Walloca-larger-than=, Wno-alloca-larger-than): Likewise.

2018-07-21 Iain Buclaw <ibuclaw@gdcproject.org>

* decl.cc (get_symbol_decl): Set all generated static symbols as
Expand Down
2 changes: 1 addition & 1 deletion gcc/d/d-lang.cc
Original file line number Diff line number Diff line change
Expand Up @@ -386,7 +386,7 @@ d_init_ts (void)
Handles D specific options. Return false if we didn't do anything. */

static bool
d_handle_option (size_t scode, const char *arg, int value,
d_handle_option (size_t scode, const char *arg, HOST_WIDE_INT value,
int kind ATTRIBUTE_UNUSED,
location_t loc ATTRIBUTE_UNUSED,
const cl_option_handlers *handlers ATTRIBUTE_UNUSED)
Expand Down
13 changes: 13 additions & 0 deletions gcc/d/gdc.texi
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,19 @@ Turns on all warnings messages. Warnings are not a defined part of
the D language, and all constructs for which this may generate a
warning message are legal code.

@item -Walloca
@cindex @option{-Walloca}
This option warns on all uses of "alloca" in the source.

@item -Walloca-larger-than=@var{n}
@cindex @option{-Walloca-larger-than}
@cindex @option{-Wno-alloca-larger-than}
Warn on unbounded uses of alloca, and on bounded uses of alloca
whose bound can be larger than @var{n} bytes.
@option{-Wno-alloca-larger-than} disables
@option{-Walloca-larger-than} warning and is equivalent to
@option{-Walloca-larger-than=@var{SIZE_MAX}} or larger.

@item -Wcast-result
@cindex @option{-Wcast-result}
@cindex @option{-Wno-cast-result}
Expand Down
12 changes: 12 additions & 0 deletions gcc/d/lang.opt
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,18 @@ Werror
D
; Documented in common.opt

Walloca
D
; Documented in C

Walloca-larger-than=
D
; Documented in C

Wno-alloca-larger-than
D
; Documented in C

Wspeculative
D
Warn from speculative compiles such as __traits(compiles).
Expand Down
24 changes: 12 additions & 12 deletions gcc/d/patches/patch-gcc-9.patch
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ relevant documentation about the GDC front end.

--- a/gcc/config/powerpcspe/powerpcspe.c
+++ b/gcc/config/powerpcspe/powerpcspe.c
@@ -32035,11 +32035,12 @@ rs6000_output_function_epilogue (FILE *f
@@ -32025,11 +32025,12 @@ rs6000_output_function_epilogue (FILE *f
use language_string.
C is 0. Fortran is 1. Pascal is 2. Ada is 3. C++ is 9.
Java is 13. Objective-C is 14. Objective-C++ isn't assigned
Expand All @@ -21,7 +21,7 @@ relevant documentation about the GDC front end.
else if (! strcmp (language_string, "GNU F77")
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -28490,11 +28490,12 @@ rs6000_output_function_epilogue (FILE *f
@@ -28146,11 +28146,12 @@ rs6000_output_function_epilogue (FILE *f
use language_string.
C is 0. Fortran is 1. Pascal is 2. Ada is 3. C++ is 9.
Java is 13. Objective-C is 14. Objective-C++ isn't assigned
Expand Down Expand Up @@ -93,7 +93,7 @@ relevant documentation about the GDC front end.
in the @file{gcc} subdirectory of the object directory. You can also
--- a/gcc/doc/invoke.texi
+++ b/gcc/doc/invoke.texi
@@ -1406,6 +1406,15 @@ Go source code.
@@ -1424,6 +1424,15 @@ Go source code.
@item @var{file}.brig
BRIG files (binary representation of HSAIL).

Expand All @@ -109,7 +109,7 @@ relevant documentation about the GDC front end.
@item @var{file}.ads
Ada source code file that contains a library unit declaration (a
declaration of a package, subprogram, or generic, or a generic
@@ -1452,6 +1461,7 @@ objective-c objective-c-header objecti
@@ -1470,6 +1479,7 @@ objective-c objective-c-header objecti
objective-c++ objective-c++-header objective-c++-cpp-output
assembler assembler-with-cpp
ada
Expand Down Expand Up @@ -164,7 +164,7 @@ relevant documentation about the GDC front end.
/* Remove the specified attribute if present. Return TRUE if removal
was successful. */

@@ -24437,6 +24447,8 @@ gen_compile_unit_die (const char *filena
@@ -24438,6 +24448,8 @@ gen_compile_unit_die (const char *filena
language = DW_LANG_ObjC;
else if (strcmp (language_string, "GNU Objective-C++") == 0)
language = DW_LANG_ObjC_plus_plus;
Expand All @@ -173,7 +173,7 @@ relevant documentation about the GDC front end.
else if (dwarf_version >= 5 || !dwarf_strict)
{
if (strcmp (language_string, "GNU Go") == 0)
@@ -26037,7 +26049,7 @@ declare_in_namespace (tree thing, dw_die
@@ -26038,7 +26050,7 @@ declare_in_namespace (tree thing, dw_die

if (ns_context != context_die)
{
Expand All @@ -182,7 +182,7 @@ relevant documentation about the GDC front end.
return ns_context;
if (DECL_P (thing))
gen_decl_die (thing, NULL, NULL, ns_context);
@@ -26060,7 +26072,7 @@ gen_namespace_die (tree decl, dw_die_ref
@@ -26061,7 +26073,7 @@ gen_namespace_die (tree decl, dw_die_ref
{
/* Output a real namespace or module. */
context_die = setup_namespace_context (decl, comp_unit_die ());
Expand All @@ -191,7 +191,7 @@ relevant documentation about the GDC front end.
? DW_TAG_module : DW_TAG_namespace,
context_die, decl);
/* For Fortran modules defined in different CU don't add src coords. */
@@ -26126,7 +26138,7 @@ gen_decl_die (tree decl, tree origin, st
@@ -26127,7 +26139,7 @@ gen_decl_die (tree decl, tree origin, st
break;

case CONST_DECL:
Expand All @@ -200,7 +200,7 @@ relevant documentation about the GDC front end.
{
/* The individual enumerators of an enum type get output when we output
the Dwarf representation of the relevant enum type itself. */
@@ -26723,7 +26735,7 @@ dwarf2out_decl (tree decl)
@@ -26727,7 +26739,7 @@ dwarf2out_decl (tree decl)
case CONST_DECL:
if (debug_info_level <= DINFO_LEVEL_TERSE)
return;
Expand All @@ -209,23 +209,23 @@ relevant documentation about the GDC front end.
return;
if (TREE_STATIC (decl) && decl_function_context (decl))
context_die = lookup_decl_die (DECL_CONTEXT (decl));
@@ -29118,6 +29130,7 @@ prune_unused_types_walk_local_classes (d
@@ -29122,6 +29134,7 @@ prune_unused_types_walk_local_classes (d
case DW_TAG_structure_type:
case DW_TAG_union_type:
case DW_TAG_class_type:
+ case DW_TAG_interface_type:
break;

case DW_TAG_subprogram:
@@ -29151,6 +29164,7 @@ prune_unused_types_walk (dw_die_ref die)
@@ -29155,6 +29168,7 @@ prune_unused_types_walk (dw_die_ref die)
case DW_TAG_structure_type:
case DW_TAG_union_type:
case DW_TAG_class_type:
+ case DW_TAG_interface_type:
if (die->die_perennial_p)
break;

@@ -29177,7 +29191,6 @@ prune_unused_types_walk (dw_die_ref die)
@@ -29181,7 +29195,6 @@ prune_unused_types_walk (dw_die_ref die)
case DW_TAG_volatile_type:
case DW_TAG_typedef:
case DW_TAG_array_type:
Expand Down
24 changes: 12 additions & 12 deletions gcc/d/patches/patch-targetdm-9.patch
Original file line number Diff line number Diff line change
Expand Up @@ -92,15 +92,15 @@ The following OS versions are implemented:
# Target specific, Fortran specific object file
FORTRAN_TARGET_OBJS=@fortran_target_objs@

@@ -1786,6 +1794,7 @@ bconfig.h: cs-bconfig.h ; @true
@@ -1789,6 +1797,7 @@ bconfig.h: cs-bconfig.h ; @true
tconfig.h: cs-tconfig.h ; @true
tm.h: cs-tm.h ; @true
tm_p.h: cs-tm_p.h ; @true
+tm_d.h: cs-tm_d.h ; @true

cs-config.h: Makefile
TARGET_CPU_DEFAULT="" \
@@ -1812,6 +1821,11 @@ cs-tm_p.h: Makefile
@@ -1815,6 +1824,11 @@ cs-tm_p.h: Makefile
HEADERS="$(tm_p_include_list)" DEFINES="" \
$(SHELL) $(srcdir)/mkconfig.sh tm_p.h

Expand All @@ -112,7 +112,7 @@ The following OS versions are implemented:
# Don't automatically run autoconf, since configure.ac might be accidentally
# newer than configure. Also, this writes into the source directory which
# might be on a read-only file system. If configured for maintainer mode
@@ -2178,6 +2192,12 @@ default-c.o: config/default-c.c
@@ -2181,6 +2195,12 @@ default-c.o: config/default-c.c
CFLAGS-prefix.o += -DPREFIX=\"$(prefix)\" -DBASEVER=$(BASEVER_s)
prefix.o: $(BASEVER)

Expand All @@ -125,7 +125,7 @@ The following OS versions are implemented:
# Language-independent files.

DRIVER_DEFINES = \
@@ -2473,6 +2493,15 @@ s-common-target-hooks-def-h: build/genho
@@ -2477,6 +2497,15 @@ s-common-target-hooks-def-h: build/genho
common/common-target-hooks-def.h
$(STAMP) s-common-target-hooks-def-h

Expand All @@ -141,15 +141,15 @@ The following OS versions are implemented:
# check if someone mistakenly only changed tm.texi.
# We use a different pathname here to avoid a circular dependency.
s-tm-texi: $(srcdir)/doc/../doc/tm.texi
@@ -2496,6 +2525,7 @@ s-tm-texi: build/genhooks$(build_exeext)
@@ -2500,6 +2529,7 @@ s-tm-texi: build/genhooks$(build_exeext)
&& ( test $(srcdir)/doc/tm.texi -nt $(srcdir)/target.def \
|| test $(srcdir)/doc/tm.texi -nt $(srcdir)/c-family/c-target.def \
|| test $(srcdir)/doc/tm.texi -nt $(srcdir)/common/common-target.def \
+ || test $(srcdir)/doc/tm.texi -nt $(srcdir)/d/d-target.def \
); then \
echo >&2 ; \
echo You should edit $(srcdir)/doc/tm.texi.in rather than $(srcdir)/doc/tm.texi . >&2 ; \
@@ -2633,14 +2663,15 @@ s-gtype: build/gengtype$(build_exeext) $
@@ -2637,14 +2667,15 @@ s-gtype: build/gengtype$(build_exeext) $
-r gtype.state
$(STAMP) s-gtype

Expand All @@ -167,7 +167,7 @@ The following OS versions are implemented:
cfn-operators.pd

#
@@ -2784,7 +2815,7 @@ build/genrecog.o : genrecog.c $(RTL_BASE
@@ -2788,7 +2819,7 @@ build/genrecog.o : genrecog.c $(RTL_BASE
$(CORETYPES_H) $(GTM_H) errors.h $(READ_MD_H) $(GENSUPPORT_H) \
$(HASH_TABLE_H) inchash.h
build/genhooks.o : genhooks.c $(TARGET_DEF) $(C_TARGET_DEF) \
Expand Down Expand Up @@ -374,7 +374,7 @@ The following OS versions are implemented:
/* Uninitialized common symbols in non-PIE executables, even with
--- a/gcc/config/aarch64/aarch64-protos.h
+++ b/gcc/config/aarch64/aarch64-protos.h
@@ -554,6 +554,9 @@ enum aarch64_parse_opt_result aarch64_pa
@@ -570,6 +570,9 @@ enum aarch64_parse_opt_result aarch64_pa
std::string aarch64_get_extension_string_for_isa_flags (unsigned long,
unsigned long);

Expand Down Expand Up @@ -1210,7 +1210,7 @@ The following OS versions are implemented:
+}
--- a/gcc/config/rs6000/rs6000-protos.h
+++ b/gcc/config/rs6000/rs6000-protos.h
@@ -226,6 +226,9 @@ extern void rs6000_target_modify_macros
@@ -224,6 +224,9 @@ extern void rs6000_target_modify_macros
extern void (*rs6000_target_modify_macros_ptr) (bool, HOST_WIDE_INT,
HOST_WIDE_INT);

Expand All @@ -1222,7 +1222,7 @@ The following OS versions are implemented:
#endif
--- a/gcc/config/rs6000/rs6000.h
+++ b/gcc/config/rs6000/rs6000.h
@@ -756,6 +756,9 @@ extern unsigned char rs6000_recip_bits[]
@@ -743,6 +743,9 @@ extern unsigned char rs6000_recip_bits[]
#define TARGET_CPU_CPP_BUILTINS() \
rs6000_cpu_cpp_builtins (pfile)

Expand Down Expand Up @@ -1564,7 +1564,7 @@ The following OS versions are implemented:
@node Driver
@section Controlling the Compilation Driver, @file{gcc}
@cindex driver
@@ -10643,6 +10652,22 @@ unloaded. The default is to return false
@@ -10619,6 +10628,22 @@ unloaded. The default is to return false
Return target-specific mangling context of @var{decl} or @code{NULL_TREE}.
@end deftypefn

Expand Down Expand Up @@ -1612,7 +1612,7 @@ The following OS versions are implemented:
@node Driver
@section Controlling the Compilation Driver, @file{gcc}
@cindex driver
@@ -7279,6 +7288,16 @@ floating-point support; they are not inc
@@ -7271,6 +7280,16 @@ floating-point support; they are not inc

@hook TARGET_CXX_DECL_MANGLING_CONTEXT

Expand Down
23 changes: 4 additions & 19 deletions libphobos/configure
Original file line number Diff line number Diff line change
Expand Up @@ -649,8 +649,6 @@ DRUNTIME_OS_UNIX_FALSE
DRUNTIME_OS_UNIX_TRUE
DRUNTIME_GC_ENABLE_FALSE
DRUNTIME_GC_ENABLE_TRUE
DRUNTIME_WERROR_FALSE
DRUNTIME_WERROR_TRUE
libphobos_srcdir
libphobos_builddir
get_gcc_base_ver
Expand Down Expand Up @@ -1423,7 +1421,7 @@ Optional Features:
--enable-fast-install[=PKGS]
optimize for fast installation [default=yes]
--disable-libtool-lock avoid locking (might break parallel builds)
--enable-werror turns on -Werror [default=yes]
--enable-werror turns on -Werror [default=no]
--enable-druntime-gc enable D runtime garbage collector (default: yes)
--enable-unix enables Unix runtime (default: yes, for Unix
targets)
Expand Down Expand Up @@ -11208,7 +11206,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11211 "configure"
#line 11209 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -11314,7 +11312,7 @@ else
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
#line 11317 "configure"
#line 11315 "configure"
#include "confdefs.h"

#if HAVE_DLFCN_H
Expand Down Expand Up @@ -13550,18 +13548,9 @@ if test "${enable_werror+set}" = set; then :
fi

WERROR_FLAG=""
if test "x$enable_werror" != "xno"; then
enable_werror="yes"
if test "x$enable_werror" = "xyes"; then
WERROR_FLAG="-Werror"
fi
if test "$enable_werror" = "yes"; then
DRUNTIME_WERROR_TRUE=
DRUNTIME_WERROR_FALSE='#'
else
DRUNTIME_WERROR_TRUE='#'
DRUNTIME_WERROR_FALSE=
fi



# Check whether --enable-druntime-gc was given.
Expand Down Expand Up @@ -14725,10 +14714,6 @@ if test -z "${ENABLE_STATIC_TRUE}" && test -z "${ENABLE_STATIC_FALSE}"; then
as_fn_error "conditional \"ENABLE_STATIC\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DRUNTIME_WERROR_TRUE}" && test -z "${DRUNTIME_WERROR_FALSE}"; then
as_fn_error "conditional \"DRUNTIME_WERROR\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
fi
if test -z "${DRUNTIME_GC_ENABLE_TRUE}" && test -z "${DRUNTIME_GC_ENABLE_FALSE}"; then
as_fn_error "conditional \"DRUNTIME_GC_ENABLE\" was never defined.
Usually this means the macro was only invoked conditionally." "$LINENO" 5
Expand Down
9 changes: 3 additions & 6 deletions libphobos/m4/druntime.m4
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,15 @@

# DRUNTIME_WERROR
# ---------------
# Add the --enable-werror option and create the
# DRUNTIME_WERROR conditional
# Check to see if -Werror is enabled.
AC_DEFUN([DRUNTIME_WERROR],
[
AC_ARG_ENABLE(werror, [AS_HELP_STRING([--enable-werror],
[turns on -Werror @<:@default=yes@:>@])])
[turns on -Werror @<:@default=no@:>@])])
WERROR_FLAG=""
if test "x$enable_werror" != "xno"; then
enable_werror="yes"
if test "x$enable_werror" = "xyes"; then
WERROR_FLAG="-Werror"
fi
AM_CONDITIONAL([DRUNTIME_WERROR], [test "$enable_werror" = "yes"])
])


Expand Down