Commit 07064c21 authored by Matthias Klose's avatar Matthias Klose

- refresh patches

parent 89935faa
# DP: aarch64-simd: Avoid emitting dup insn by using canonical form for fnma.
diff -urpN a/src/gcc/config/aarch64/aarch64-simd.md b/src/gcc/config/aarch64/aarch64-simd.md
--- a/src/gcc/config/aarch64/aarch64-simd.md 2018-01-08 19:07:26.207492599 -0500
+++ b/src/gcc/config/aarch64/aarch64-simd.md 2018-01-08 19:22:47.451259371 -0500
@@ -1711,9 +1711,8 @@
--- a/src/gcc/config/aarch64/aarch64-simd.md
+++ b/src/gcc/config/aarch64/aarch64-simd.md
@@ -1674,9 +1674,8 @@
(define_insn "fnma<mode>4"
[(set (match_operand:VHSDF 0 "register_operand" "=w")
(fma:VHSDF
......
......@@ -19,11 +19,9 @@ Description: array index out of range in gnatlink
Ada.Text_IO.Put_Line (Boolean'Image (G (1 .. 2) = "ab"));
end A;
Index: b/src/gcc/ada/gnatlink.adb
===================================================================
--- a/src/gcc/ada/gnatlink.adb
+++ b/src/gcc/ada/gnatlink.adb
@@ -239,6 +239,9 @@ procedure Gnatlink is
@@ -238,6 +238,9 @@ procedure Gnatlink is
procedure Write_Usage;
-- Show user the program options
......@@ -33,7 +31,7 @@ Index: b/src/gcc/ada/gnatlink.adb
---------------
-- Base_Name --
---------------
@@ -525,7 +528,7 @@ procedure Gnatlink is
@@ -524,7 +527,7 @@ procedure Gnatlink is
Binder_Options.Table (Binder_Options.Last) :=
Linker_Options.Table (Linker_Options.Last);
......@@ -42,7 +40,7 @@ Index: b/src/gcc/ada/gnatlink.adb
if Arg'Length = 7 then
Exit_With_Error ("Missing argument for --LINK=");
end if;
@@ -538,7 +541,7 @@ procedure Gnatlink is
@@ -537,7 +540,7 @@ procedure Gnatlink is
("Could not locate linker: " & Arg (8 .. Arg'Last));
end if;
......@@ -51,7 +49,7 @@ Index: b/src/gcc/ada/gnatlink.adb
declare
Program_Args : constant Argument_List_Access :=
Argument_String_To_List
@@ -1259,13 +1262,9 @@ procedure Gnatlink is
@@ -1258,13 +1261,9 @@ procedure Gnatlink is
1 .. Linker_Options.Last
loop
if Linker_Options.Table (J) /= null
......@@ -68,7 +66,7 @@ Index: b/src/gcc/ada/gnatlink.adb
then
-- We have found an already
-- specified run_path_option:
@@ -1382,6 +1381,17 @@ procedure Gnatlink is
@@ -1381,6 +1380,17 @@ procedure Gnatlink is
Status := fclose (Fd);
end Process_Binder_File;
......@@ -86,7 +84,7 @@ Index: b/src/gcc/ada/gnatlink.adb
-----------
-- Usage --
-----------
@@ -1896,8 +1906,8 @@ begin
@@ -1894,8 +1904,8 @@ begin
while J <= Linker_Options.Last loop
if Linker_Options.Table (J).all = "-Xlinker"
and then J < Linker_Options.Last
......@@ -97,7 +95,7 @@ Index: b/src/gcc/ada/gnatlink.adb
then
if Stack_Op then
Linker_Options.Table (J .. Linker_Options.Last - 2) :=
@@ -1928,13 +1938,9 @@ begin
@@ -1926,13 +1936,9 @@ begin
-- Here we just check for a canonical form that matches the
-- pragma Linker_Options set in the NT runtime.
......
......@@ -41,7 +41,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
--- a/src/gcc/ada/osint.ads
+++ b/src/gcc/ada/osint.ads
@@ -137,16 +137,10 @@
@@ -137,16 +137,10 @@ package Osint is
-- path) in Name_Buffer, with the length in Name_Len.
function Program_Name (Nam : String; Prog : String) return String_Access;
......@@ -64,7 +64,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
-- Writes name of program as invoked to the current output (normally
--- a/src/gcc/ada/osint.adb
+++ b/src/gcc/ada/osint.adb
@@ -2205,51 +2205,52 @@
@@ -2199,51 +2199,52 @@ package body Osint is
------------------
function Program_Name (Nam : String; Prog : String) return String_Access is
......@@ -155,7 +155,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
------------------------------
--- a/src/gcc/ada/gnatchop.adb
+++ b/src/gcc/ada/gnatchop.adb
@@ -36,6 +36,7 @@
@@ -36,6 +36,7 @@ with GNAT.OS_Lib; use GNA
with GNAT.Heap_Sort_G;
with GNAT.Table;
......@@ -163,7 +163,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
with Switch; use Switch;
with Types;
@@ -44,12 +45,9 @@
@@ -44,12 +45,9 @@ procedure Gnatchop is
Config_File_Name : constant String_Access := new String'("gnat.adc");
-- The name of the file holding the GNAT configuration pragmas
......@@ -177,7 +177,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
Gnat_Cmd : String_Access;
-- Command to execute the GNAT compiler
@@ -222,12 +220,6 @@
@@ -222,12 +220,6 @@ procedure Gnatchop is
Integer'Image
(Maximum_File_Name_Length);
......@@ -190,7 +190,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
subtype EOL_Length is Natural range 0 .. 2;
-- Possible lengths of end of line sequence
@@ -492,76 +484,6 @@
@@ -492,76 +484,6 @@ procedure Gnatchop is
Unit.Table (Sorted_Units.Table (U + 1)).File_Name.all;
end Is_Duplicated;
......@@ -267,7 +267,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
---------------
-- Parse_EOL --
---------------
@@ -1088,8 +1010,8 @@
@@ -1088,8 +1010,8 @@ procedure Gnatchop is
exit;
when '-' =>
......@@ -278,7 +278,7 @@ Author: YunQiang Su <wzssyqa@gmail.com>
when 'c' =>
Compilation_Mode := True;
@@ -1767,9 +1689,13 @@
@@ -1767,9 +1689,13 @@ begin
-- Check presence of required executables
......
......@@ -8,7 +8,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
--- a/src/gcc/ada/ali-util.adb
+++ b/src/gcc/ada/ali-util.adb
@@ -484,8 +484,10 @@
@@ -484,8 +484,10 @@ package body ALI.Util is
for D in ALIs.Table (A).First_Sdep .. ALIs.Table (A).Last_Sdep loop
Src := Source_Id (Get_Name_Table_Int (Sdep.Table (D).Sfile));
......@@ -23,7 +23,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
-- of the source file in the table if checksums match.
--- a/src/gcc/ada/lib-writ.adb
+++ b/src/gcc/ada/lib-writ.adb
@@ -1471,7 +1471,14 @@
@@ -1471,7 +1471,14 @@ package body Lib.Writ is
Write_Info_Name_May_Be_Quoted (Fname);
Write_Info_Tab (25);
......@@ -41,7 +41,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
--- a/src/gcc/ada/osint.adb
+++ b/src/gcc/ada/osint.adb
@@ -1674,6 +1674,20 @@
@@ -1674,6 +1674,20 @@ package body Osint is
Lib_Search_Directories.Set_Last (Primary_Directory);
Lib_Search_Directories.Table (Primary_Directory) := new String'("");
......@@ -64,7 +64,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
------------------
--- a/src/gcc/ada/osint.ads
+++ b/src/gcc/ada/osint.ads
@@ -685,6 +685,17 @@
@@ -679,6 +679,17 @@ package Osint is
function Prep_Suffix return String;
-- The suffix used for pre-processed files
......@@ -84,7 +84,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
Current_Main : File_Name_Type := No_File;
--- a/src/gcc/ada/s-os_lib.adb
+++ b/src/gcc/ada/s-os_lib.adb
@@ -1153,6 +1153,41 @@
@@ -1153,6 +1153,41 @@ package body System.OS_Lib is
return Result;
end Get_Object_Suffix;
......@@ -128,7 +128,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
----------------------------------
--- a/src/gcc/ada/s-os_lib.ads
+++ b/src/gcc/ada/s-os_lib.ads
@@ -164,6 +164,13 @@
@@ -164,6 +164,13 @@ package System.OS_Lib is
-- component parts to be interpreted in the local time zone, and returns
-- an OS_Time. Returns Invalid_Time if the creation fails.
......
......@@ -4,7 +4,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
--- a/src/gcc/ada/Make-generated.in
+++ b/src/gcc/ada/Make-generated.in
@@ -28,21 +28,21 @@
@@ -28,21 +28,21 @@ $(ADA_GEN_SUBDIR)/treeprs.ads : $(ADA_GE
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/treeprs
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/treeprs/,$(notdir $^))
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/treeprs
......@@ -29,7 +29,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/sinfo/sinfo.h $(ADA_GEN_SUBDIR)/sinfo.h
$(ADA_GEN_SUBDIR)/snames.h $(ADA_GEN_SUBDIR)/snames.ads $(ADA_GEN_SUBDIR)/snames.adb : $(ADA_GEN_SUBDIR)/stamp-snames ; @true
@@ -50,7 +50,7 @@
@@ -50,7 +50,7 @@ $(ADA_GEN_SUBDIR)/stamp-snames : $(ADA_G
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/snamest
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/snamest/,$(notdir $^))
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/snamest
......@@ -38,7 +38,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.ns $(ADA_GEN_SUBDIR)/snames.ads
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nb $(ADA_GEN_SUBDIR)/snames.adb
$(MOVE_IF_CHANGE) $(ADA_GEN_SUBDIR)/bldtools/snamest/snames.nh $(ADA_GEN_SUBDIR)/snames.h
@@ -61,7 +61,7 @@
@@ -61,7 +61,7 @@ $(ADA_GEN_SUBDIR)/stamp-nmake: $(ADA_GEN
-$(MKDIR) $(ADA_GEN_SUBDIR)/bldtools/nmake
$(RM) $(addprefix $(ADA_GEN_SUBDIR)/bldtools/nmake/,$(notdir $^))
$(CP) $^ $(ADA_GEN_SUBDIR)/bldtools/nmake
......@@ -49,7 +49,7 @@ Author: Nicolas Boulenguez <nicolas@debian.org>
touch $(ADA_GEN_SUBDIR)/stamp-nmake
--- a/src/gcc/ada/gcc-interface/Makefile.in
+++ b/src/gcc/ada/gcc-interface/Makefile.in
@@ -612,7 +612,7 @@
@@ -2777,7 +2777,7 @@ OSCONS_EXTRACT=$(OSCONS_CC) $(GNATLIBCFL
-$(MKDIR) ./bldtools/oscons
$(RM) $(addprefix ./bldtools/oscons/,$(notdir $^))
$(CP) $^ ./bldtools/oscons
......
# DP: Set MULTILIB_DEFAULTS for ARM multilib builds
Index: b/src/gcc/config.gcc
===================================================================
--- a/src/gcc/config.gcc
+++ b/src/gcc/config.gcc
@@ -3774,10 +3774,18 @@ case "${target}" in
@@ -3776,10 +3776,18 @@ case "${target}" in
done
case "$with_float" in
......@@ -25,7 +23,7 @@ Index: b/src/gcc/config.gcc
*)
echo "Unknown floating point type used in --with-float=$with_float" 1>&2
exit 1
@@ -3811,6 +3819,9 @@ case "${target}" in
@@ -3813,6 +3821,9 @@ case "${target}" in
"" \
| arm | thumb )
#OK
......@@ -35,8 +33,6 @@ Index: b/src/gcc/config.gcc
;;
*)
echo "Unknown mode used in --with-mode=$with_mode"
Index: b/src/gcc/config/arm/linux-eabi.h
===================================================================
--- a/src/gcc/config/arm/linux-eabi.h
+++ b/src/gcc/config/arm/linux-eabi.h
@@ -43,7 +43,21 @@
......
# DP: Use /usr/include/<multiarch>/c++/4.x as the include directory
# DP: for host dependent c++ header files.
Index: b/src/libstdc++-v3/include/Makefile.am
===================================================================
--- a/src/libstdc++-v3/include/Makefile.am
+++ b/src/libstdc++-v3/include/Makefile.am
@@ -924,7 +924,7 @@ endif
@@ -923,7 +923,7 @@ endif
host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
host_builddir = ./${host_alias}/bits
......@@ -14,11 +12,9 @@ Index: b/src/libstdc++-v3/include/Makefile.am
host_headers = \
${host_srcdir}/ctype_base.h \
${host_srcdir}/ctype_inline.h \
Index: b/src/libstdc++-v3/include/Makefile.in
===================================================================
--- a/src/libstdc++-v3/include/Makefile.in
+++ b/src/libstdc++-v3/include/Makefile.in
@@ -1209,7 +1209,7 @@ profile_impl_headers = \
@@ -1208,7 +1208,7 @@ profile_impl_headers = \
@GLIBCXX_C_HEADERS_COMPATIBILITY_TRUE@c_compatibility_headers_extra = ${c_compatibility_headers}
host_srcdir = ${glibcxx_srcdir}/$(OS_INC_SRCDIR)
host_builddir = ./${host_alias}/bits
......@@ -27,8 +23,6 @@ Index: b/src/libstdc++-v3/include/Makefile.in
host_headers = \
${host_srcdir}/ctype_base.h \
${host_srcdir}/ctype_inline.h \
Index: b/src/gcc/Makefile.in
===================================================================
--- a/src/gcc/Makefile.in
+++ b/src/gcc/Makefile.in
@@ -1150,6 +1150,7 @@ FLAGS_TO_PASS = \
......@@ -63,8 +57,6 @@ Index: b/src/gcc/Makefile.in
-DGPLUSPLUS_BACKWARD_INCLUDE_DIR=\"$(gcc_gxx_include_dir)/backward\" \
-DLOCAL_INCLUDE_DIR=\"$(local_includedir)\" \
-DCROSS_INCLUDE_DIR=\"$(CROSS_SYSTEM_HEADER_DIR)\" \
Index: b/src/gcc/cppdefault.c
===================================================================
--- a/src/gcc/cppdefault.c
+++ b/src/gcc/cppdefault.c
@@ -49,6 +49,8 @@ const struct default_include cpp_include
......@@ -76,8 +68,6 @@ Index: b/src/gcc/cppdefault.c
#endif
#ifdef GPLUSPLUS_BACKWARD_INCLUDE_DIR
/* Pick up GNU C++ backward and deprecated include files. */
Index: b/src/gcc/incpath.c
===================================================================
--- a/src/gcc/incpath.c
+++ b/src/gcc/incpath.c
@@ -158,6 +158,18 @@ add_standard_paths (const char *sysroot,
......
......@@ -15,11 +15,9 @@ If the linker supports --push-state/--pop-state, we should IMHO use it.
--no-as-needed if ld supports it.
* configure: Regenerated.
Index: b/src/gcc/configure.ac
===================================================================
--- a/src/gcc/configure.ac
+++ b/src/gcc/configure.ac
@@ -5371,11 +5371,21 @@ if test $in_tree_ld = yes ; then
@@ -5372,11 +5372,21 @@ if test $in_tree_ld = yes ; then
if test "$gcc_cv_gld_major_version" -eq 2 -a "$gcc_cv_gld_minor_version" -ge 16 -o "$gcc_cv_gld_major_version" -gt 2 \
&& test $in_tree_ld_is_elf = yes; then
gcc_cv_ld_as_needed=yes
......
# DP: Allow to use lld with -fuse-ld=ld.lld
Index: b/src/gcc/collect2.c
===================================================================
--- a/src/gcc/collect2.c
+++ b/src/gcc/collect2.c
@@ -831,6 +831,7 @@ main (int argc, char **argv)
......@@ -22,7 +20,7 @@ Index: b/src/gcc/collect2.c
};
static const char *const real_ld_suffix = "real-ld";
static const char *const collect_ld_suffix = "collect-ld";
@@ -1004,6 +1006,8 @@ main (int argc, char **argv)
@@ -1007,6 +1009,8 @@ main (int argc, char **argv)
selected_linker = USE_BFD_LD;
else if (strcmp (argv[i], "-fuse-ld=gold") == 0)
selected_linker = USE_GOLD_LD;
......@@ -31,7 +29,7 @@ Index: b/src/gcc/collect2.c
#ifdef COLLECT_EXPORT_LIST
/* These flags are position independent, although their order
@@ -1093,7 +1097,8 @@ main (int argc, char **argv)
@@ -1096,7 +1100,8 @@ main (int argc, char **argv)
/* Maybe we know the right file to use (if not cross). */
ld_file_name = 0;
#ifdef DEFAULT_LINKER
......@@ -41,7 +39,7 @@ Index: b/src/gcc/collect2.c
{
char *linker_name;
# ifdef HOST_EXECUTABLE_SUFFIX
@@ -1307,7 +1312,7 @@ main (int argc, char **argv)
@@ -1315,7 +1320,7 @@ main (int argc, char **argv)
else if (!use_collect_ld
&& strncmp (arg, "-fuse-ld=", 9) == 0)
{
......@@ -50,8 +48,6 @@ Index: b/src/gcc/collect2.c
ld1--;
ld2--;
}
Index: b/src/gcc/common.opt
===================================================================
--- a/src/gcc/common.opt
+++ b/src/gcc/common.opt
@@ -2635,9 +2635,13 @@ Common Driver Negative(fuse-ld=gold)
......@@ -69,11 +65,9 @@ Index: b/src/gcc/common.opt
fuse-linker-plugin
Common Undocumented Var(flag_use_linker_plugin)
Index: b/src/gcc/opts.c
===================================================================
--- a/src/gcc/opts.c
+++ b/src/gcc/opts.c
@@ -2328,6 +2328,7 @@ common_handle_option (struct gcc_options
@@ -2348,6 +2348,7 @@ common_handle_option (struct gcc_options
case OPT_fuse_ld_bfd:
case OPT_fuse_ld_gold:
......
......@@ -7,7 +7,7 @@
--- a/src/gcc/config.gcc
+++ b/src/gcc/config.gcc
@@ -1339,7 +1339,7 @@
@@ -1307,7 +1307,7 @@ hppa*64*-*-linux*)
gas=yes gnu_ld=yes
;;
hppa*-*-linux*)
......
# DP: Report an ICE to apport (if apport is available
# DP: and the environment variable GCC_NOAPPORT is not set)
Index: b/src/gcc/gcc.c
===================================================================
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -6903,6 +6903,16 @@ do_report_bug (const char **new_argv, co
@@ -6922,6 +6922,16 @@ do_report_bug (const char **new_argv, co
fflush(stderr);
free(cmd);
}
......
# DP: For ICEs, dump the preprocessed source file to stderr
# DP: when in a distro build environment.
Index: b/src/gcc/gcc.c
===================================================================
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -3163,7 +3163,8 @@ execute (void)
@@ -3182,7 +3182,8 @@ execute (void)
/* For ICEs in cc1, cc1obj, cc1plus see if it is
reproducible or not. */
const char *p;
......@@ -15,7 +13,7 @@ Index: b/src/gcc/gcc.c
&& WEXITSTATUS (status) == ICE_EXIT_CODE
&& i == 0
&& (p = strrchr (commands[0].argv[0], DIR_SEPARATOR))
@@ -6885,8 +6886,23 @@ do_report_bug (const char **new_argv, co
@@ -6904,8 +6905,23 @@ do_report_bug (const char **new_argv, co
if (status == ATTEMPT_STATUS_SUCCESS)
{
......
......@@ -15,8 +15,6 @@
* config/sparc/t-linux64: Set MULTIARCH_DIRNAME.
* src/gcc/config/mips/mips.h: (/usr)/lib as default path.
Index: b/src/gcc/config/sh/t-linux
===================================================================
--- a/src/gcc/config/sh/t-linux
+++ b/src/gcc/config/sh/t-linux
@@ -1,2 +1,10 @@
......@@ -30,8 +28,6 @@ Index: b/src/gcc/config/sh/t-linux
+MULTILIB_OSDIRNAMES = .:sh3-linux-gnu sh3_nofpu-linux-gnu:sh3-linux-gnu
+MULTIARCH_DIRNAME = $(call if_multiarch,sh3-linux-gnu)
+endif
Index: b/src/gcc/config/sparc/t-linux64
===================================================================
--- a/src/gcc/config/sparc/t-linux64
+++ b/src/gcc/config/sparc/t-linux64
@@ -27,3 +27,5 @@ MULTILIB_OPTIONS = m64/m32
......@@ -40,8 +36,6 @@ Index: b/src/gcc/config/sparc/t-linux64
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:sparc-linux-gnu)
+
+MULTIARCH_DIRNAME = $(call if_multiarch,sparc$(if $(findstring 64,$(target)),64)-linux-gnu)
Index: b/src/gcc/config/s390/t-linux64
===================================================================
--- a/src/gcc/config/s390/t-linux64
+++ b/src/gcc/config/s390/t-linux64
@@ -9,3 +9,5 @@ MULTILIB_OPTIONS = m64/m31
......@@ -50,8 +44,6 @@ Index: b/src/gcc/config/s390/t-linux64
MULTILIB_OSDIRNAMES += $(if $(wildcard $(shell echo $(SYSTEM_HEADER_DIR))/../../usr/lib32),../lib32,../lib)$(call if_multiarch,:s390-linux-gnu)
+
+MULTIARCH_DIRNAME = $(call if_multiarch,s390$(if $(findstring s390x,$(target)),x)-linux-gnu)
Index: b/src/gcc/config/rs6000/t-linux64
===================================================================
--- a/src/gcc/config/rs6000/t-linux64
+++ b/src/gcc/config/rs6000/t-linux64
@@ -31,6 +31,8 @@ MULTILIB_EXTRA_OPTS :=
......@@ -63,8 +55,6 @@ Index: b/src/gcc/config/rs6000/t-linux64
rs6000-linux.o: $(srcdir)/config/rs6000/rs6000-linux.c
$(COMPILE) $<
$(POSTCOMPILE)
Index: b/src/gcc/config/i386/t-linux64
===================================================================
--- a/src/gcc/config/i386/t-linux64
+++ b/src/gcc/config/i386/t-linux64
@@ -36,3 +36,13 @@ MULTILIB_DIRNAMES = $(patsubst m%, %,
......@@ -81,8 +71,6 @@ Index: b/src/gcc/config/i386/t-linux64
+else
+ MULTIARCH_DIRNAME = $(call if_multiarch,i386-linux-gnu)
+endif
Index: b/src/gcc/config/i386/t-kfreebsd
===================================================================
--- a/src/gcc/config/i386/t-kfreebsd
+++ b/src/gcc/config/i386/t-kfreebsd
@@ -1,5 +1,9 @@
......@@ -96,8 +84,6 @@ Index: b/src/gcc/config/i386/t-kfreebsd
MULTILIB_OSDIRNAMES := $(filter-out mx32=%,$(subst linux,$(KFREEBSD_OS),$(MULTILIB_OSDIRNAMES)))
+
+MULTIARCH_DIRNAME := $(subst linux,$(KFREEBSD_OS),$(MULTIARCH_DIRNAME))
Index: b/src/gcc/config/mips/t-linux64
===================================================================
--- a/src/gcc/config/mips/t-linux64
+++ b/src/gcc/config/mips/t-linux64
@@ -18,9 +18,22 @@
......@@ -123,11 +109,9 @@ Index: b/src/gcc/config/mips/t-linux64
+MULTIARCH_DIRNAME = $(call if_multiarch,mips$(MIPS_ISA)$(MIPS_32)$(MIPS_R6)$(MIPS_EL)-linux-gnu$(MIPS_SOFT))
+endif
+endif
Index: b/src/gcc/config.gcc
===================================================================
--- a/src/gcc/config.gcc
+++ b/src/gcc/config.gcc
@@ -2113,6 +2113,11 @@ mips*-*-linux*) # Linux MIPS, either
@@ -2115,6 +2115,11 @@ mips*-*-linux*) # Linux MIPS, either
target_cpu_default=MASK_SOFT_FLOAT_ABI
enable_mips_multilibs="yes"
;;
......@@ -139,7 +123,7 @@ Index: b/src/gcc/config.gcc
mipsisa64r6*-*-linux*)
default_mips_abi=n32
default_mips_arch=mips64r6
@@ -2123,6 +2128,10 @@ mips*-*-linux*) # Linux MIPS, either
@@ -2125,6 +2130,10 @@ mips*-*-linux*) # Linux MIPS, either
default_mips_arch=mips64r2
enable_mips_multilibs="yes"
;;
......@@ -150,7 +134,7 @@ Index: b/src/gcc/config.gcc
mips64*-*-linux* | mipsisa64*-*-linux*)
default_mips_abi=n32
enable_mips_multilibs="yes"
@@ -3111,6 +3120,16 @@ powerpc*-*-* | rs6000-*-*)
@@ -3113,6 +3122,16 @@ powerpc*-*-* | rs6000-*-*)
tm_file="${tm_file} rs6000/option-defaults.h"
esac
......@@ -167,7 +151,7 @@ Index: b/src/gcc/config.gcc
# Build mkoffload tool
case ${target} in
*-intelmic-* | *-intelmicemul-*)
@@ -4558,7 +4577,7 @@ case ${target} in
@@ -4560,7 +4579,7 @@ case ${target} in
i[34567]86-*-darwin* | x86_64-*-darwin*)
;;
i[34567]86-*-linux* | x86_64-*-linux*)
......@@ -176,8 +160,6 @@ Index: b/src/gcc/config.gcc
;;
i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu)
tmake_file="$tmake_file i386/t-kfreebsd"
Index: b/src/gcc/config/aarch64/t-aarch64-linux
===================================================================
--- a/src/gcc/config/aarch64/t-aarch64-linux
+++ b/src/gcc/config/aarch64/t-aarch64-linux
@@ -22,7 +22,7 @@ LIB1ASMSRC = aarch64/lib1funcs.asm
......@@ -191,8 +173,6 @@ Index: b/src/gcc/config/aarch64/t-aarch64-linux
-MULTILIB_OSDIRNAMES += mabi.ilp32=../libilp32
+MULTIARCH_DIRNAME = $(call if_multiarch,aarch64$(AARCH_BE)-linux-gnu)
Index: b/src/gcc/config/mips/mips.h
===================================================================
--- a/src/gcc/config/mips/mips.h
+++ b/src/gcc/config/mips/mips.h
@@ -3499,16 +3499,6 @@ struct GTY(()) machine_function {
......@@ -212,8 +192,6 @@ Index: b/src/gcc/config/mips/mips.h
/* Load store bonding is not supported by micromips and fix_24k. The
performance can be degraded for those targets. Hence, do not bond for
micromips or fix_24k. */
Index: b/src/gcc/config/tilegx/t-tilegx
===================================================================
--- a/src/gcc/config/tilegx/t-tilegx
+++ b/src/gcc/config/tilegx/t-tilegx
@@ -1,6 +1,7 @@
......@@ -225,9 +203,6 @@ Index: b/src/gcc/config/tilegx/t-tilegx
LIBGCC = stmp-multilib
INSTALL_LIBGCC = install-multilib
Index: b/src/gcc/config/riscv/t-linux
===================================================================
--- a/src/gcc/config/riscv/t-linux
+++ b/src/gcc/config/riscv/t-linux
@@ -1,3 +1,5 @@
......@@ -236,8 +211,6 @@ Index: b/src/gcc/config/riscv/t-linux
MULTILIB_OSDIRNAMES := $(patsubst lib%,../lib%,$(MULTILIB_DIRNAMES))
+
+MULTIARCH_DIRNAME := $(call if_multiarch,$(firstword $(subst -, ,$(target)))-linux-gnu)
Index: b/src/gcc/Makefile.in
===================================================================
--- a/src/gcc/Makefile.in
+++ b/src/gcc/Makefile.in
@@ -521,7 +521,7 @@ SYSTEM_HEADER_DIR = `echo @SYSTEM_HEADER
......@@ -249,15 +222,11 @@ Index: b/src/gcc/Makefile.in
# Directory for prefix to system directories, for
# each of $(system_prefix)/usr/include, $(system_prefix)/usr/lib, etc.
Index: b/src/gcc/config/t-musl
===================================================================
--- /dev/null
+++ b/src/gcc/config/t-musl
@@ -0,0 +1,2 @@
+MULTIARCH_DIRNAME := $(subst -linux-gnu,-linux-musl,$(MULTIARCH_DIRNAME))
+MULTILIB_OSDIRNAMES := $(subst -linux-gnu,-linux-musl,$(MULTILIB_OSDIRNAMES))
Index: b/src/gcc/config/t-uclibc
===================================================================
--- /dev/null
+++ b/src/gcc/config/t-uclibc
@@ -0,0 +1,2 @@
......
......@@ -2,7 +2,7 @@
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -2534,6 +2534,7 @@
@@ -2533,6 +2533,7 @@ for_each_path (const struct path_prefix
{
len = paths->max_len + extra_space + 1;
len += MAX (MAX (suffix_len, multi_os_dir_len), multiarch_len);
......@@ -10,7 +10,7 @@
path = XNEWVEC (char, len);
}
@@ -2747,6 +2748,24 @@
@@ -2746,6 +2747,24 @@ file_at_path (char *path, void *data)
struct file_at_path_info *info = (struct file_at_path_info *) data;
size_t len = strlen (path);
......
# DP: This implements D language support in the GCC back end, and adds
# DP: relevant documentation about the GDC front end (code part).
Index: b/src/gcc/config/darwin.h
===================================================================
--- a/src/gcc/config/darwin.h
+++ b/src/gcc/config/darwin.h
@@ -49,6 +49,10 @@ see the files COPYING3 and COPYING.RUNTI
......@@ -16,8 +14,6 @@ Index: b/src/gcc/config/darwin.h
/* We have atexit. */
#define HAVE_ATEXIT
Index: b/src/gcc/config/i386/cygming.h
===================================================================
--- a/src/gcc/config/i386/cygming.h
+++ b/src/gcc/config/i386/cygming.h
@@ -181,6 +181,10 @@ along with GCC; see the file COPYING3.
......@@ -31,8 +27,6 @@ Index: b/src/gcc/config/i386/cygming.h
#undef TARGET_LIBC_HAS_FUNCTION
#define TARGET_LIBC_HAS_FUNCTION no_c99_libc_has_function
Index: b/src/gcc/config/linux-android.h
===================================================================
--- a/src/gcc/config/linux-android.h
+++ b/src/gcc/config/linux-android.h
@@ -57,3 +57,9 @@
......@@ -45,11 +39,9 @@ Index: b/src/gcc/config/linux-android.h
+# define THREAD_LIBRARY ""
+# define TIME_LIBRARY ""
+#endif
Index: b/src/gcc/config/rs6000/rs6000.c
===================================================================
--- a/src/gcc/config/rs6000/rs6000.c
+++ b/src/gcc/config/rs6000/rs6000.c
@@ -31629,7 +31629,8 @@ rs6000_output_function_epilogue (FILE *f
@@ -31647,7 +31647,8 @@ rs6000_output_function_epilogue (FILE *f
if (lang_GNU_C ()
|| ! strcmp (language_string, "GNU GIMPLE")
|| ! strcmp (language_string, "GNU Go")
......@@ -59,11 +51,9 @@ Index: b/src/gcc/config/rs6000/rs6000.c
i = 0;
else if (! strcmp (language_string, "GNU F77")
|| lang_GNU_Fortran ())
Index: b/src/gcc/dwarf2out.c
===================================================================
--- a/src/gcc/dwarf2out.c
+++ b/src/gcc/dwarf2out.c
@@ -5083,6 +5083,16 @@ is_ada (void)
@@ -5090,6 +5090,16 @@ is_ada (void)
return lang == DW_LANG_Ada95 || lang == DW_LANG_Ada83;
}
......@@ -80,7 +70,7 @@ Index: b/src/gcc/dwarf2out.c
/* Remove the specified attribute if present. Return TRUE if removal
was successful. */
@@ -23607,6 +23617,8 @@ gen_compile_unit_die (const char *filena
@@ -23616,6 +23626,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;
......@@ -89,7 +79,7 @@ Index: b/src/gcc/dwarf2out.c
else if (dwarf_version >= 5 || !dwarf_strict)
{
if (strcmp (language_string, "GNU Go") == 0)
@@ -25191,7 +25203,7 @@ declare_in_namespace (tree thing, dw_die
@@ -25200,7 +25212,7 @@ declare_in_namespace (tree thing, dw_die
if (ns_context != context_die)
{
......@@ -98,7 +88,7 @@ Index: b/src/gcc/dwarf2out.c
return ns_context;
if (DECL_P (thing))
gen_decl_die (thing, NULL, NULL, ns_context);
@@ -25214,7 +25226,7 @@ gen_namespace_die (tree decl, dw_die_ref
@@ -25223,7 +25235,7 @@ gen_namespace_die (tree decl, dw_die_ref
{
/* Output a real namespace or module. */
context_die = setup_namespace_context (decl, comp_unit_die ());
......@@ -107,7 +97,7 @@ Index: b/src/gcc/dwarf2out.c
? DW_TAG_module : DW_TAG_namespace,
context_die, decl);
/* For Fortran modules defined in different CU don't add src coords. */
@@ -25281,7 +25293,7 @@ gen_decl_die (tree decl, tree origin, st
@@ -25290,7 +25302,7 @@ gen_decl_die (tree decl, tree origin, st
break;
case CONST_DECL:
......@@ -116,7 +106,7 @@ Index: b/src/gcc/dwarf2out.c
{
/* The individual enumerators of an enum type get output when we output
the Dwarf representation of the relevant enum type itself. */
@@ -25834,7 +25846,7 @@ dwarf2out_decl (tree decl)
@@ -25843,7 +25855,7 @@ dwarf2out_decl (tree decl)
case CONST_DECL:
if (debug_info_level <= DINFO_LEVEL_TERSE)
return;
......@@ -125,8 +115,6 @@ Index: b/src/gcc/dwarf2out.c
return;
if (TREE_STATIC (decl) && decl_function_context (decl))
context_die = lookup_decl_die (DECL_CONTEXT (decl));
Index: b/src/gcc/gcc.c
===================================================================
--- a/src/gcc/gcc.c
+++ b/src/gcc/gcc.c
@@ -1307,6 +1307,7 @@ static const struct compiler default_com
......
......@@ -43,8 +43,6 @@ for all supported architectures. And these where appropriate:
** SPARC_HardFloat
** SPARC_SoftFloat
Index: b/src/gcc/config/aarch64/aarch64.h
===================================================================
--- a/src/gcc/config/aarch64/aarch64.h
+++ b/src/gcc/config/aarch64/aarch64.h
@@ -26,6 +26,14 @@
......@@ -62,8 +60,6 @@ Index: b/src/gcc/config/aarch64/aarch64.h
#define REGISTER_TARGET_PRAGMAS() aarch64_register_pragmas ()
Index: b/src/gcc/config/alpha/alpha.h
===================================================================
--- a/src/gcc/config/alpha/alpha.h
+++ b/src/gcc/config/alpha/alpha.h
@@ -72,6 +72,23 @@ along with GCC; see the file COPYING3.
......@@ -90,8 +86,6 @@ Index: b/src/gcc/config/alpha/alpha.h
#ifndef SUBTARGET_LANGUAGE_CPP_BUILTINS
#define SUBTARGET_LANGUAGE_CPP_BUILTINS() \
do \
Index: b/src/gcc/config/arm/arm.h
===================================================================
--- a/src/gcc/config/arm/arm.h
+++ b/src/gcc/config/arm/arm.h
@@ -47,6 +47,31 @@ extern char arm_arch_name[];
......@@ -126,8 +120,6 @@ Index: b/src/gcc/config/arm/arm.h
#include "config/arm/arm-opts.h"
/* The processor for which instructions should be scheduled. */
Index: b/src/gcc/config/i386/i386.h
===================================================================
--- a/src/gcc/config/i386/i386.h
+++ b/src/gcc/config/i386/i386.h
@@ -671,6 +671,24 @@ extern const char *host_detect_local_cpu
......@@ -155,8 +147,6 @@ Index: b/src/gcc/config/i386/i386.h
/* Target Pragmas. */
#define REGISTER_TARGET_PRAGMAS() ix86_register_pragmas ()
Index: b/src/gcc/config/ia64/ia64.h
===================================================================
--- a/src/gcc/config/ia64/ia64.h
+++ b/src/gcc/config/ia64/ia64.h
@@ -40,6 +40,13 @@ do { \
......@@ -173,8 +163,6 @@ Index: b/src/gcc/config/ia64/ia64.h
#ifndef SUBTARGET_EXTRA_SPECS
#define SUBTARGET_EXTRA_SPECS
#endif
Index: b/src/gcc/config/mips/mips.h
===================================================================
--- a/src/gcc/config/mips/mips.h
+++ b/src/gcc/config/mips/mips.h
@@ -644,6 +644,54 @@ struct mips_cpu_info {
......@@ -232,8 +220,6 @@ Index: b/src/gcc/config/mips/mips.h
/* Default target_flags if no switches are specified */
#ifndef TARGET_DEFAULT
Index: b/src/gcc/config/pa/pa.h
===================================================================
--- a/src/gcc/config/pa/pa.h
+++ b/src/gcc/config/pa/pa.h
@@ -179,6 +179,20 @@ do { \
......@@ -257,11 +243,9 @@ Index: b/src/gcc/config/pa/pa.h
/* An old set of OS defines for various BSD-like systems. */
#define TARGET_OS_CPP_BUILTINS() \
do \
Index: b/src/gcc/config/rs6000/rs6000.h
===================================================================
--- a/src/gcc/config/rs6000/rs6000.h
+++ b/src/gcc/config/rs6000/rs6000.h
@@ -822,6 +822,28 @@ extern unsigned char rs6000_recip_bits[]
@@ -824,6 +824,28 @@ extern unsigned char rs6000_recip_bits[]
#define TARGET_CPU_CPP_BUILTINS() \
rs6000_cpu_cpp_builtins (pfile)
......@@ -290,8 +274,6 @@ Index: b/src/gcc/config/rs6000/rs6000.h
/* This is used by rs6000_cpu_cpp_builtins to indicate the byte order
we're compiling for. Some configurations may need to override it. */
#define RS6000_CPU_CPP_ENDIAN_BUILTINS() \
Index: b/src/gcc/config/s390/s390.h
===================================================================
--- a/src/gcc/config/s390/s390.h
+++ b/src/gcc/config/s390/s390.h