gcc: update from 4.8.2 to 4.9.1

This commit is contained in:
martell
2014-10-03 21:15:33 +01:00
parent 3548472581
commit 81a123e79c
22 changed files with 490 additions and 1915 deletions

View File

@@ -188,9 +188,9 @@
MULTISUBDIR =
RTSDIR = rts$(subst /,_,$(MULTISUBDIR))
@@ -1583,6 +1590,12 @@ ifeq ($(strip $(filter-out avr none powe
endif
ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
# Cygwin/Mingw32
ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
+ # Set target pair suffix for mingw or cygwin
+ W32_TARG=mingw
+ ifneq ($(strip $(filter cygwin%,$(osys))),)
@@ -232,7 +232,7 @@
@@ -1677,7 +1690,14 @@ ifeq ($(strip $(filter-out cygwin% mingw
s-win32.o s-winext.o g-regist.o g-sse.o g-ssvety.o
EXTRA_GNATRTL_TASKING_OBJS = a-exetim.o
EXTRA_LIBGNAT_SRCS+=mingw32.h
- MISCLIB = -lws2_32
+ # Which install goal to use.
+ INSTALL_GNATLIB_MAIN = unused-install-gnatlib

View File

@@ -158,19 +158,15 @@
#include "common.h"
@@ -281,10 +283,10 @@ struct gtm_thread
#define UPFX1(t) UPFX(t)
#define UPFX(t) #t
@@ -281,7 +283,7 @@ struct gtm_thread
// Invoked from assembly language, thus the "asm" specifier on
// the name, avoiding complex name mangling.
static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
- __asm__(UPFX1(__USER_LABEL_PREFIX__) "GTM_begin_transaction") ITM_REGPARM;
+ __asm__(UPFX1(__USER_LABEL_PREFIX__) "GTM_begin_transaction") ITM_REGPARM ITM_SYSV;
#else
static uint32_t begin_transaction(uint32_t, const gtm_jmpbuf *)
- __asm__("GTM_begin_transaction") ITM_REGPARM;
+ __asm__("GTM_begin_transaction") ITM_REGPARM ITM_SYSV;
#endif
- __asm__(UPFX "GTM_begin_transaction") ITM_REGPARM;
+ __asm__(UPFX "GTM_begin_transaction") ITM_REGPARM ITM_SYSV;
// In eh_cpp.cc
void revert_cpp_exceptions (gtm_transaction_cp *cp = 0);
@@ -318,7 +320,7 @@ namespace GTM HIDDEN {
extern uint64_t gtm_spin_count_var;

View File

@@ -1,34 +0,0 @@
--- origsrc/gcc-4.8-20130310/libstdc++-v3/configure 2013-03-15 02:47:51.930826600 -0500
+++ src/gcc-4.8-20130310/libstdc++-v3/configure 2013-03-17 00:43:35.146679400 -0500
@@ -46017,7 +46017,7 @@ $as_echo "#define HAVE_TLS 1" >>confdefs
;;
esac
;;
- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*)
# All these tests are for C++; save the language and the compiler flags.
# The CXXFLAGS thing is suspicious, but based on similar bits previously
--- origsrc/gcc-4.8-20130310/libstdc++-v3/crossconfig.m4 2013-03-15 02:47:51.723814700 -0500
+++ src/gcc-4.8-20130310/libstdc++-v3/crossconfig.m4 2013-03-17 00:40:59.084753200 -0500
@@ -141,7 +141,7 @@ case "${host}" in
;;
esac
;;
- *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu)
+ *-linux* | *-uclinux* | *-gnu* | *-kfreebsd*-gnu | *-knetbsd*-gnu | *-cygwin*)
GLIBCXX_CHECK_COMPILER_FEATURES
GLIBCXX_CHECK_LINKER_FEATURES
GLIBCXX_CHECK_MATH_SUPPORT
--- origsrc/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2012-08-06 22:34:27.000000000 +0800
+++ src/gcc-4.7.2/libstdc++-v3/testsuite/lib/libstdc++.exp 2013-02-26 19:31:07.934763700 +0800
@@ -146,6 +146,9 @@ proc libstdc++_init { testfile } {
set gccdir [file dirname $gccdir]
append ld_library_path_tmp ":${gccdir}"
}
+ if { [string match "*-*-cygwin*" $target_triplet] } {
+ append ld_library_path_tmp ":${blddir}/../libgcc"
+ }
v3track gccdir 3
# Locate libgomp. This is only required for parallel mode.

View File

@@ -1,592 +0,0 @@
Index: gcc/config/i386/predicates.md
===================================================================
--- gcc/config/i386/predicates.md (revision 196791)
+++ gcc/config/i386/predicates.md (working copy)
@@ -137,6 +137,8 @@
switch (XINT (XEXP (op, 0), 1))
{
case UNSPEC_GOTPCREL:
+ if (DEFAULT_ABI == MS_ABI)
+ break;
case UNSPEC_DTPOFF:
case UNSPEC_GOTNTPOFF:
case UNSPEC_NTPOFF:
@@ -436,6 +438,9 @@
if (SYMBOL_REF_TLS_MODEL (op))
return false;
+ /* Dll-imported symbols are always external. */
+ if (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op))
+ return false;
if (SYMBOL_REF_LOCAL_P (op))
return true;
Index: gcc/config/i386/winnt.c
===================================================================
--- gcc/config/i386/winnt.c (revision 196791)
+++ gcc/config/i386/winnt.c (working copy)
@@ -646,8 +646,18 @@
int is_data; /* used to type tag exported symbols. */
};
+/* Keep a list of stub symbols. */
+
+struct GTY(()) stub_list
+{
+ struct stub_list *next;
+ const char *name;
+};
+
static GTY(()) struct export_list *export_head;
+static GTY(()) struct stub_list *stub_head;
+
/* Assemble an export symbol entry. We need to keep a list of
these, so that we can output the export list at the end of the
assembly. We used to output these export symbols in each function,
@@ -678,6 +688,21 @@
export_head = p;
}
+void
+i386_pe_record_stub (const char *name)
+{
+ struct stub_list *p;
+
+ if (!name || *name == 0)
+ return;
+
+ p = ggc_alloc_stub_list ();
+ p->next = stub_head;
+ p->name = name;
+ stub_head = p;
+}
+
+
#ifdef CXX_WRAP_SPEC_LIST
/* Hash table equality helper function. */
@@ -781,6 +806,30 @@
(q->is_data ? ",data" : ""));
}
}
+
+ if (stub_head)
+ {
+ struct stub_list *q;
+
+ for (q = stub_head; q != NULL; q = q->next)
+ {
+ const char *name = q->name;
+ const char *oname;
+
+ if (name[0] == '*')
+ ++name;
+ oname = name;
+ if (name[0] == '.')
+ ++name;
+ if (strncmp (name, "refptr.", 7) != 0)
+ continue;
+ name += 7;
+ fprintf (asm_out_file, "\t.section\t.rdata$%s, \"dr\"\n"
+ "\t.globl\t%s\n"
+ "\t.linkonce\tdiscard\n", oname, oname);
+ fprintf (asm_out_file, "%s:\n\t.quad\t%s\n", oname, name);
+ }
+ }
}
Index: gcc/config/i386/xm-mingw32.h
===================================================================
--- gcc/config/i386/xm-mingw32.h (revision 196791)
+++ gcc/config/i386/xm-mingw32.h (working copy)
@@ -29,6 +29,12 @@
/* The st_ino field of struct stat is always 0. */
#define HOST_LACKS_INODE_NUMBERS
+#ifdef __MINGW32__
+#undef __USE_MINGW_ANSI_STDIO
+#define __USE_MINGW_ANSI_STDIO 1
+#else
/* MSVCRT does not support the "ll" format specifier for printing
"long long" values. Instead, we use "I64". */
#define HOST_LONG_LONG_FORMAT "I64"
+#endif
+
Index: gcc/config/i386/i386-protos.h
===================================================================
--- gcc/config/i386/i386-protos.h (revision 196791)
+++ gcc/config/i386/i386-protos.h (working copy)
@@ -260,6 +260,7 @@
extern void i386_pe_assemble_visibility (tree, int);
extern tree i386_pe_mangle_decl_assembler_name (tree, tree);
extern tree i386_pe_mangle_assembler_name (const char *);
+extern void i386_pe_record_stub (const char *);
extern void i386_pe_seh_init (FILE *);
extern void i386_pe_seh_end_prologue (FILE *);
Index: gcc/config/i386/i386.c
===================================================================
--- gcc/config/i386/i386.c (revision 196791)
+++ gcc/config/i386/i386.c (working copy)
@@ -64,6 +64,8 @@
#include "tree-flow.h"
static rtx legitimize_dllimport_symbol (rtx, bool);
+static rtx legitimize_faraddr_symbol (rtx, bool);
+static rtx legitimize_pe_coff_symbol (rtx, bool);
#ifndef CHECK_STACK_LIMIT
#define CHECK_STACK_LIMIT (-1)
@@ -3234,7 +3236,11 @@
would otherwise be needed if this object is to be placed in a
DLL, and is essentially just as efficient as direct addressing. */
if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
- ix86_cmodel = CM_SMALL_PIC, flag_pic = 1;
+#ifdef TARGET_CYGWIN64
+ ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
+#else
+ ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
+#endif
else if (TARGET_64BIT && TARGET_RDOS)
ix86_cmodel = CM_MEDIUM_PIC, flag_pic = 1;
else if (TARGET_64BIT)
@@ -10575,7 +10581,9 @@
ix86_emit_save_sse_regs_using_mov (frame.sse_reg_save_offset);
pic_reg_used = false;
+ /* We don't use pic-register for x64 pe-coff target. */
if (pic_offset_table_rtx
+ && DEFAULT_ABI != MS_ABI
&& (df_regs_ever_live_p (REAL_PIC_OFFSET_TABLE_REGNUM)
|| crtl->profile))
{
@@ -11380,7 +11388,8 @@
use_reg (&call_fusage, rax);
}
- if (ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
+ if ((ix86_cmodel == CM_LARGE || ix86_cmodel == CM_LARGE_PIC)
+ && DEFAULT_ABI != MS_ABI)
{
HOST_WIDE_INT argval;
@@ -11998,7 +12007,20 @@
return !ix86_legitimate_constant_p (mode, x);
}
+/* Nonzero if the symbol is marked as dllimport, or as stub-variable,
+ otherwise zero. */
+static bool
+is_imported_p (rtx x)
+{
+ if (!TARGET_DLLIMPORT_DECL_ATTRIBUTES
+ || GET_CODE (x) != SYMBOL_REF)
+ return false;
+
+ return SYMBOL_REF_DLLIMPORT_P (x) || SYMBOL_REF_STUBVAR_P (x);
+}
+
+
/* Nonzero if the constant value X is a legitimate general operand
when generating PIC code. It is given that flag_pic is on and
that X satisfies CONSTANT_P or is a CONST_DOUBLE. */
@@ -12086,11 +12108,39 @@
/* FALLTHRU */
case SYMBOL_REF:
- /* TLS references should always be enclosed in UNSPEC. */
- if (SYMBOL_REF_TLS_MODEL (op0))
+ /* TLS references should always be enclosed in UNSPEC.
+ The dllimported symbol needs always to be resolved. */
+ if (SYMBOL_REF_TLS_MODEL (op0)
+ || (TARGET_DLLIMPORT_DECL_ATTRIBUTES && SYMBOL_REF_DLLIMPORT_P (op0)))
return false;
- if (!SYMBOL_REF_FAR_ADDR_P (op0) && SYMBOL_REF_LOCAL_P (op0)
- && ix86_cmodel != CM_LARGE_PIC)
+
+ if (DEFAULT_ABI == MS_ABI)
+ {
+ if (is_imported_p (op0))
+ return true;
+
+ if (SYMBOL_REF_FAR_ADDR_P (op0)
+ || !SYMBOL_REF_LOCAL_P (op0))
+ break;
+
+ /* Function-symbols need to be resolved only for
+ large-model.
+ For the small-model we don't need to resolve anything
+ here. */
+ if ((ix86_cmodel != CM_LARGE_PIC
+ && SYMBOL_REF_FUNCTION_P (op0))
+ || ix86_cmodel == CM_SMALL_PIC)
+ return true;
+ /* Non-external symbols don't need to be resolved for
+ large, and medium-model. */
+ if ((ix86_cmodel == CM_LARGE_PIC
+ || ix86_cmodel == CM_MEDIUM_PIC)
+ && !SYMBOL_REF_EXTERNAL_P (op0))
+ return true;
+ }
+ else if (!SYMBOL_REF_FAR_ADDR_P (op0)
+ && SYMBOL_REF_LOCAL_P (op0)
+ && ix86_cmodel != CM_LARGE_PIC)
return true;
break;
@@ -12151,7 +12201,7 @@
if ((GET_CODE (XVECEXP (disp, 0, 0)) == SYMBOL_REF
|| GET_CODE (XVECEXP (disp, 0, 0)) == LABEL_REF)
&& !TARGET_64BIT)
- return gotoff_operand (XVECEXP (disp, 0, 0), Pmode);
+ return DEFAULT_ABI != MS_ABI && gotoff_operand (XVECEXP (disp, 0, 0), Pmode);
return false;
case UNSPEC_GOTTPOFF:
case UNSPEC_GOTNTPOFF:
@@ -12486,11 +12536,17 @@
}
#endif
+ if (TARGET_64BIT && TARGET_DLLIMPORT_DECL_ATTRIBUTES)
+ {
+ rtx tmp = legitimize_pe_coff_symbol (addr, true);
+ if (tmp)
+ return tmp;
+ }
+
if (TARGET_64BIT && legitimate_pic_address_disp_p (addr))
new_rtx = addr;
- else if (TARGET_64BIT
- && ix86_cmodel != CM_SMALL_PIC
- && gotoff_operand (addr, Pmode))
+ else if (TARGET_64BIT && DEFAULT_ABI != MS_ABI
+ && ix86_cmodel != CM_SMALL_PIC && gotoff_operand (addr, Pmode))
{
rtx tmpreg;
/* This symbol may be referenced via a displacement from the PIC
@@ -12521,9 +12577,10 @@
tmpreg, 1, OPTAB_DIRECT);
new_rtx = reg;
}
- else new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmpreg);
+ else
+ new_rtx = gen_rtx_PLUS (Pmode, pic_offset_table_rtx, tmpreg);
}
- else if (!TARGET_64BIT && gotoff_operand (addr, Pmode))
+ else if (!TARGET_64BIT && DEFAULT_ABI != MS_ABI && gotoff_operand (addr, Pmode))
{
/* This symbol may be referenced via a displacement from the PIC
base address (@GOTOFF). */
@@ -12554,31 +12611,22 @@
see gotoff_operand. */
|| (TARGET_VXWORKS_RTP && GET_CODE (addr) == LABEL_REF))
{
- if (TARGET_DLLIMPORT_DECL_ATTRIBUTES)
- {
- if (GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_DLLIMPORT_P (addr))
- return legitimize_dllimport_symbol (addr, true);
- if (GET_CODE (addr) == CONST && GET_CODE (XEXP (addr, 0)) == PLUS
- && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF
- && SYMBOL_REF_DLLIMPORT_P (XEXP (XEXP (addr, 0), 0)))
- {
- rtx t = legitimize_dllimport_symbol (XEXP (XEXP (addr, 0), 0), true);
- return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (addr, 0), 1));
- }
- }
+ rtx tmp = legitimize_pe_coff_symbol (addr, true);
+ if (tmp)
+ return tmp;
/* For x64 PE-COFF there is no GOT table. So we use address
directly. */
if (TARGET_64BIT && DEFAULT_ABI == MS_ABI)
- {
+ {
new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_PCREL);
new_rtx = gen_rtx_CONST (Pmode, new_rtx);
if (reg == 0)
reg = gen_reg_rtx (Pmode);
- emit_move_insn (reg, new_rtx);
+ emit_move_insn (reg, new_rtx);
new_rtx = reg;
- }
+ }
else if (TARGET_64BIT && ix86_cmodel != CM_LARGE_PIC)
{
new_rtx = gen_rtx_UNSPEC (Pmode, gen_rtvec (1, addr), UNSPEC_GOTPCREL);
@@ -12647,7 +12695,7 @@
/* Check first to see if this is a constant offset from a @GOTOFF
symbol reference. */
- if (gotoff_operand (op0, Pmode)
+ if (DEFAULT_ABI != MS_ABI && gotoff_operand (op0, Pmode)
&& CONST_INT_P (op1))
{
if (!TARGET_64BIT)
@@ -12791,7 +12839,7 @@
if (!TARGET_64BIT)
{
- if (flag_pic)
+ if (flag_pic && DEFAULT_ABI != MS_ABI)
pic = pic_offset_table_rtx;
else
{
@@ -13006,7 +13054,7 @@
htab_t dllimport_map;
static tree
-get_dllimport_decl (tree decl)
+get_dllimport_decl (tree decl, bool beimport)
{
struct tree_map *h, in;
void **loc;
@@ -13039,8 +13087,11 @@
name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
name = targetm.strip_name_encoding (name);
- prefix = name[0] == FASTCALL_PREFIX || user_label_prefix[0] == 0
- ? "*__imp_" : "*__imp__";
+ if (beimport)
+ prefix = name[0] == FASTCALL_PREFIX || user_label_prefix[0] == 0
+ ? "*__imp_" : "*__imp__";
+ else
+ prefix = user_label_prefix[0] == 0 ? "*.refptr." : "*refptr.";
namelen = strlen (name);
prefixlen = strlen (prefix);
imp_name = (char *) alloca (namelen + prefixlen + 1);
@@ -13050,7 +13101,14 @@
name = ggc_alloc_string (imp_name, namelen + prefixlen);
rtl = gen_rtx_SYMBOL_REF (Pmode, name);
SET_SYMBOL_REF_DECL (rtl, to);
- SYMBOL_REF_FLAGS (rtl) = SYMBOL_FLAG_LOCAL;
+ SYMBOL_REF_FLAGS (rtl) = SYMBOL_FLAG_LOCAL | SYMBOL_FLAG_STUBVAR;
+ if (!beimport)
+ {
+ SYMBOL_REF_FLAGS (rtl) |= SYMBOL_FLAG_EXTERNAL;
+#ifdef SUB_TARGET_RECORD_STUB
+ SUB_TARGET_RECORD_STUB (name);
+#endif
+ }
rtl = gen_const_mem (Pmode, rtl);
set_mem_alias_set (rtl, ix86_GOT_alias_set ());
@@ -13061,6 +13119,24 @@
return to;
}
+/* Expand SYMBOL into its corresponding far-addresse symbol.
+ WANT_REG is true if we require the result be a register. */
+
+static rtx
+legitimize_faraddr_symbol (rtx symbol, bool want_reg)
+{
+ tree imp_decl;
+ rtx x;
+
+ gcc_assert (SYMBOL_REF_DECL (symbol));
+ imp_decl = get_dllimport_decl (SYMBOL_REF_DECL (symbol), false);
+
+ x = DECL_RTL (imp_decl);
+ if (want_reg)
+ x = force_reg (Pmode, x);
+ return x;
+}
+
/* Expand SYMBOL into its corresponding dllimport symbol. WANT_REG is
true if we require the result be a register. */
@@ -13071,7 +13147,7 @@
rtx x;
gcc_assert (SYMBOL_REF_DECL (symbol));
- imp_decl = get_dllimport_decl (SYMBOL_REF_DECL (symbol));
+ imp_decl = get_dllimport_decl (SYMBOL_REF_DECL (symbol), true);
x = DECL_RTL (imp_decl);
if (want_reg)
@@ -13079,6 +13155,47 @@
return x;
}
+
+static rtx
+legitimize_pe_coff_symbol (rtx addr, bool inreg)
+{
+ if (DEFAULT_ABI != MS_ABI)
+ return NULL_RTX;
+
+ if (TARGET_DLLIMPORT_DECL_ATTRIBUTES)
+ {
+ if (GET_CODE (addr) == SYMBOL_REF && SYMBOL_REF_DLLIMPORT_P (addr))
+ return legitimize_dllimport_symbol (addr, inreg);
+ if (GET_CODE (addr) == CONST
+ && GET_CODE (XEXP (addr, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF
+ && SYMBOL_REF_DLLIMPORT_P (XEXP (XEXP (addr, 0), 0)))
+ {
+ rtx t = legitimize_dllimport_symbol (XEXP (XEXP (addr, 0), 0), inreg);
+ return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (addr, 0), 1));
+ }
+ }
+ if (ix86_cmodel != CM_LARGE_PIC && ix86_cmodel != CM_MEDIUM_PIC)
+ return NULL_RTX;
+ if (GET_CODE (addr) == SYMBOL_REF
+ && !is_imported_p (addr)
+ && SYMBOL_REF_EXTERNAL_P (addr)
+ && SYMBOL_REF_DECL (addr))
+ return legitimize_faraddr_symbol (addr, inreg);
+
+ if (GET_CODE (addr) == CONST
+ && GET_CODE (XEXP (addr, 0)) == PLUS
+ && GET_CODE (XEXP (XEXP (addr, 0), 0)) == SYMBOL_REF
+ && !is_imported_p (XEXP (XEXP (addr, 0), 0))
+ && SYMBOL_REF_EXTERNAL_P (XEXP (XEXP (addr, 0), 0))
+ && SYMBOL_REF_DECL (XEXP (XEXP (addr, 0), 0)))
+ {
+ rtx t = legitimize_faraddr_symbol (XEXP (XEXP (addr, 0), 0), inreg);
+ return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (addr, 0), 1));
+ }
+ return NULL_RTX;
+}
+
/* Try machine-dependent ways of modifying an illegitimate address
to be legitimate. If we find one, return the new, valid address.
This macro is used in only one place: `memory_address' in explow.c.
@@ -13119,16 +13236,9 @@
if (TARGET_DLLIMPORT_DECL_ATTRIBUTES)
{
- if (GET_CODE (x) == SYMBOL_REF && SYMBOL_REF_DLLIMPORT_P (x))
- return legitimize_dllimport_symbol (x, true);
- if (GET_CODE (x) == CONST
- && GET_CODE (XEXP (x, 0)) == PLUS
- && GET_CODE (XEXP (XEXP (x, 0), 0)) == SYMBOL_REF
- && SYMBOL_REF_DLLIMPORT_P (XEXP (XEXP (x, 0), 0)))
- {
- rtx t = legitimize_dllimport_symbol (XEXP (XEXP (x, 0), 0), true);
- return gen_rtx_PLUS (Pmode, t, XEXP (XEXP (x, 0), 1));
- }
+ rtx tmp = legitimize_pe_coff_symbol (x, true);
+ if (tmp)
+ return tmp;
}
if (flag_pic && SYMBOLIC_CONST (x))
@@ -15944,6 +16054,8 @@
if (GET_CODE (op1) == SYMBOL_REF)
{
+ rtx tmp;
+
model = SYMBOL_REF_TLS_MODEL (op1);
if (model)
{
@@ -15953,9 +16065,8 @@
return;
op1 = convert_to_mode (mode, op1, 1);
}
- else if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
- && SYMBOL_REF_DLLIMPORT_P (op1))
- op1 = legitimize_dllimport_symbol (op1, false);
+ else if ((tmp = legitimize_pe_coff_symbol (op1, false)) != NULL_RTX)
+ op1 = tmp;
}
else if (GET_CODE (op1) == CONST
&& GET_CODE (XEXP (op1, 0)) == PLUS
@@ -15963,14 +16074,13 @@
{
rtx addend = XEXP (XEXP (op1, 0), 1);
rtx symbol = XEXP (XEXP (op1, 0), 0);
- rtx tmp = NULL;
+ rtx tmp;
model = SYMBOL_REF_TLS_MODEL (symbol);
if (model)
tmp = legitimize_tls_address (symbol, model, true);
- else if (TARGET_DLLIMPORT_DECL_ATTRIBUTES
- && SYMBOL_REF_DLLIMPORT_P (symbol))
- tmp = legitimize_dllimport_symbol (symbol, true);
+ else
+ tmp = legitimize_pe_coff_symbol (symbol, true);
if (tmp)
{
@@ -23576,7 +23686,7 @@
rtx tmp, unspec;
gcc_assert (GET_CODE (symbol) == SYMBOL_REF);
- gcc_assert (ix86_cmodel == CM_LARGE_PIC);
+ gcc_assert (ix86_cmodel == CM_LARGE_PIC && DEFAULT_ABI != MS_ABI);
gcc_assert (Pmode == DImode);
tmp = gen_reg_rtx (Pmode);
@@ -23618,7 +23728,8 @@
else
{
/* Static functions and indirect calls don't need the pic register. */
- if (flag_pic && (!TARGET_64BIT || ix86_cmodel == CM_LARGE_PIC)
+ if (flag_pic && (!TARGET_64BIT
+ || (ix86_cmodel == CM_LARGE_PIC && DEFAULT_ABI != MS_ABI))
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& ! SYMBOL_REF_LOCAL_P (XEXP (fnaddr, 0)))
use_reg (&use, pic_offset_table_rtx);
@@ -23632,6 +23743,7 @@
}
if (ix86_cmodel == CM_LARGE_PIC
+ && DEFAULT_ABI != MS_ABI
&& MEM_P (fnaddr)
&& GET_CODE (XEXP (fnaddr, 0)) == SYMBOL_REF
&& !local_symbolic_operand (XEXP (fnaddr, 0), VOIDmode))
@@ -34959,7 +35071,7 @@
if (TARGET_64BIT)
{
if (!flag_pic || targetm.binds_local_p (function)
- || cfun->machine->call_abi == MS_ABI)
+ || DEFAULT_ABI == MS_ABI)
;
else
{
Index: gcc/config/i386/i386.h
===================================================================
--- gcc/config/i386/i386.h (revision 196791)
+++ gcc/config/i386/i386.h (working copy)
@@ -1179,7 +1179,8 @@
#define REAL_PIC_OFFSET_TABLE_REGNUM BX_REG
#define PIC_OFFSET_TABLE_REGNUM \
- ((TARGET_64BIT && ix86_cmodel == CM_SMALL_PIC) \
+ ((TARGET_64BIT && (ix86_cmodel == CM_SMALL_PIC \
+ || DEFAULT_ABI == MS_ABI)) \
|| !flag_pic ? INVALID_REGNUM \
: reload_completed ? REGNO (pic_offset_table_rtx) \
: REAL_PIC_OFFSET_TABLE_REGNUM)
@@ -2379,6 +2380,10 @@
#define SYMBOL_REF_DLLEXPORT_P(X) \
((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_DLLEXPORT) != 0)
+#define SYMBOL_FLAG_STUBVAR (SYMBOL_FLAG_MACH_DEP << 4)
+#define SYMBOL_REF_STUBVAR_P(X) \
+ ((SYMBOL_REF_FLAGS (X) & SYMBOL_FLAG_STUBVAR) != 0)
+
extern void debug_ready_dispatch (void);
extern void debug_dispatch_window (int);
Index: gcc/config/i386/cygming.h
===================================================================
--- gcc/config/i386/cygming.h (revision 196791)
+++ gcc/config/i386/cygming.h (working copy)
@@ -474,5 +474,8 @@
#undef TARGET_ASM_ASSEMBLE_VISIBILITY
#define TARGET_ASM_ASSEMBLE_VISIBILITY i386_pe_assemble_visibility
+#undef SUB_TARGET_RECORD_STUB
+#define SUB_TARGET_RECORD_STUB i386_pe_record_stub
+
/* Static stack checking is supported by means of probes. */
#define STACK_CHECK_STATIC_BUILTIN 1

View File

@@ -1,18 +0,0 @@
--- origsrc/gcc-4.8.0/gcc/config/i386/winnt.c 2013-03-23 23:59:41.134655300 -0500
+++ src/gcc-4.8.0/gcc/config/i386/winnt.c 2013-03-30 22:43:58.408210500 -0500
@@ -696,6 +696,15 @@ i386_pe_record_stub (const char *name)
if (!name || *name == 0)
return;
+ p = stub_head;
+ while (p != NULL)
+ {
+ if (p->name[0] == *name
+ && !strcmp (p->name, name))
+ return;
+ p = p->next;
+ }
+
p = ggc_alloc_stub_list ();
p->next = stub_head;
p->name = name;

View File

@@ -4,8 +4,8 @@
#define LIBGCC_SONAME "cyggcc_s" LIBGCC_EH_EXTN "-1.dll"
/* We should find a way to not have to update this manually. */
-#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-13.dll"
+#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-14.dll"
-#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-15.dll"
+#define LIBGCJ_SONAME "cyggcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
--- gcc/config/i386/mingw32.h 2013-01-10 14:38:27.000000000 -0600
+++ gcc/config/i386/mingw32.h 2013-03-17 01:31:17.078372600 -0500

View File

@@ -6,9 +6,9 @@
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c
SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas
--- origsrc/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libatomic/Makefile.in 2013-03-17 05:13:32.732280300 -0500
@@ -244,6 +244,7 @@
@@ -25,9 +25,9 @@
libatomic_version_info = -version-info $(libtool_VERSION)
-libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script)
+libatomic_la_LDFLAGS = $(libatomic_version_info) $(libatomic_version_script) $(lt_host_flags)
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c
SIZEOBJS = load store cas exch fadd fsub fand fior fxor fnand tas
EXTRA_libatomic_la_SOURCES = $(addsuffix _n.c,$(SIZEOBJS))
libatomic_la_SOURCES = gload.c gstore.c gcas.c gexch.c glfree.c lock.c init.c \
fenv.c
--- origsrc/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-10 17:37:36.000000000 -0500
+++ src/gcc-4.8-20130310/libatomic/aclocal.m4 2013-03-17 05:09:13.598458700 -0500
@@ -993,6 +993,7 @@
@@ -52,8 +52,8 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11016 "configure"
+#line 11017 "configure"
-#line 11109 "configure"
+#line 11110 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -61,8 +61,8 @@
lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2
lt_status=$lt_dlunknown
cat > conftest.$ac_ext <<_LT_EOF
-#line 11122 "configure"
+#line 11123 "configure"
-#line 11215 "configure"
+#line 11216 "configure"
#include "confdefs.h"
#if HAVE_DLFCN_H
@@ -78,7 +78,7 @@
+ # we must compare to with_cross_host to decide if this is a native
+ # or cross-compiler and select where to install dlls appropriately.
+ if test -n "$with_cross_host" &&
+ test x"$with_cross_host" != x"no"; then
+ test x"$with_cross_host" != x"no"; then
+ lt_host_flags='-no-undefined -bindir "$(toolexeclibdir)"';
+ else
+ lt_host_flags='-no-undefined -bindir "$(bindir)"';

View File

@@ -1,44 +0,0 @@
--- origsrc/gcc-4.8-20130310/config/dfp.m4 2012-11-04 17:08:42.000000000 -0600
+++ src/gcc-4.8-20130310/config/dfp.m4 2013-03-17 03:26:22.331093900 -0500
@@ -23,7 +23,7 @@ Valid choices are 'yes', 'bid', 'dpd', a
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*cygwin*)
enable_decimal_float=yes
;;
*)
--- origsrc/gcc-4.8-20130310/gcc/configure 2013-03-17 03:47:51.178944300 -0500
+++ src/gcc-4.8-20130310/gcc/configure 2013-03-17 11:46:33.192417700 -0500
@@ -7079,7 +7079,7 @@ else
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes
;;
*)
--- origsrc/gcc-4.8-20130310/libdecnumber/configure 2012-11-04 17:08:42.000000000 -0600
+++ src/gcc-4.8-20130310/libdecnumber/configure 2013-03-17 03:27:08.161157200 -0500
@@ -4613,7 +4613,7 @@ else
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes
;;
*)
--- origsrc/gcc-4.8-20130310/libgcc/configure 2012-11-04 17:08:42.000000000 -0600
+++ src/gcc-4.8-20130310/libgcc/configure 2013-03-17 03:32:46.693679700 -0500
@@ -4078,7 +4078,7 @@ else
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*-cygwin*)
enable_decimal_float=yes
;;
*)

View File

@@ -9,14 +9,3 @@
#ifdef _WIN64
#include <windows.h>
--- origsrc/gcc-4.8-20130310/libffi/src/x86/win64.S 2012-03-04 15:11:09.000000000 -0600
+++ src/gcc-4.8-20130310/libffi/src/x86/win64.S 2013-03-15 12:37:34.200968100 -0500
@@ -295,7 +295,7 @@ SYMBOL_NAME(ffi_closure_win64):
mov %rax, %rcx # context is first parameter
mov %rsp, %rdx # stack is second parameter
add $48, %rdx # point to start of arguments
- mov $SYMBOL_NAME(ffi_closure_win64_inner), %rax
+ lea SYMBOL_NAME(ffi_closure_win64_inner)(%rip), %rax
callq *%rax # call the real closure function
add $40, %rsp
movq %rax, %xmm0 # If the closure returned a float,

View File

@@ -1,129 +0,0 @@
--- libgcc/config/i386/cygming-crtbegin.c (revision 196430)
+++ libgcc/config/i386/cygming-crtbegin.c (working copy)
@@ -46,15 +46,33 @@
#define LIBGCJ_SONAME "libgcj_s.dll"
#endif
-
+#if DWARF2_UNWIND_INFO
/* Make the declarations weak. This is critical for
_Jv_RegisterClasses because it lives in libgcj.a */
-extern void __register_frame_info (const void *, struct object *)
+extern void __register_frame_info (__attribute__((unused)) const void *,
+ __attribute__((unused)) struct object *)
TARGET_ATTRIBUTE_WEAK;
-extern void *__deregister_frame_info (const void *)
+extern void *__deregister_frame_info (__attribute__((unused)) const void *)
TARGET_ATTRIBUTE_WEAK;
-extern void _Jv_RegisterClasses (const void *) TARGET_ATTRIBUTE_WEAK;
+TARGET_ATTRIBUTE_WEAK void
+__register_frame_info (__attribute__((unused)) const void *p,
+ __attribute__((unused)) struct object *o)
+{}
+TARGET_ATTRIBUTE_WEAK void*
+__deregister_frame_info (__attribute__((unused)) const void *p)
+{ return NULL; }
+#endif /* DWARF2_UNWIND_INFO */
+
+#if TARGET_USE_JCR_SECTION
+extern void _Jv_RegisterClasses (__attribute__((unused)) const void *)
+ TARGET_ATTRIBUTE_WEAK;
+
+TARGET_ATTRIBUTE_WEAK void
+_Jv_RegisterClasses (__attribute__((unused)) const void *p)
+{}
+#endif /* TARGET_USE_JCR_SECTION */
+
#if defined(HAVE_LD_RO_RW_SECTION_MIXING)
# define EH_FRAME_SECTION_CONST const
#else
--- libgcc/config/i386/cygwin.S (revision 196430)
+++ libgcc/config/i386/cygwin.S (working copy)
@@ -32,7 +32,7 @@
# define cfi_adjust_cfa_offset(X) .cfi_adjust_cfa_offset X
# define cfi_def_cfa_register(X) .cfi_def_cfa_register X
# define cfi_register(D,S) .cfi_register D, S
-# ifdef _WIN64
+# ifdef __x86_64__
# define cfi_push(X) .cfi_adjust_cfa_offset 8; .cfi_rel_offset X, 0
# define cfi_pop(X) .cfi_adjust_cfa_offset -8; .cfi_restore X
# else
@@ -57,7 +57,7 @@
.global ___chkstk
.global __alloca
-#ifdef _WIN64
+#ifdef __x86_64__
/* __alloca is a normal function call, which uses %rcx as the argument. */
cfi_startproc()
__alloca:
@@ -123,7 +123,7 @@
pushl 4(%eax)
ret
cfi_endproc()
-#endif /* _WIN64 */
+#endif /* __x86_64__ */
#endif /* L_chkstk */
#ifdef L_chkstk_ms
@@ -131,7 +131,7 @@
We avoid clobbering any registers. Unlike ___chkstk, it just probes the
stack and does no stack allocation. */
.global ___chkstk_ms
-#ifdef _WIN64
+#ifdef __x86_64__
cfi_startproc()
___chkstk_ms:
pushq %rcx /* save temps */
@@ -183,5 +183,5 @@
cfi_pop(%ecx)
ret
cfi_endproc()
-#endif /* _WIN64 */
+#endif /* __x86_64__ */
#endif /* L_chkstk_ms */
--- libgcc/config.host (revision 196430)
+++ libgcc/config.host (working copy)
@@ -564,13 +564,30 @@
tmake_eh_file="i386/t-dw2-eh"
fi
# Shared libgcc DLL install dir depends on cross/native build.
- if test x${build} = x${host} ; then
+ if test x${host} = x${target} ; then
tmake_dlldir_file="i386/t-dlldir"
else
tmake_dlldir_file="i386/t-dlldir-x"
fi
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm i386/t-chkstk t-dfprules"
;;
+x86_64-*-cygwin*)
+ extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
+ else
+ tmake_eh_file="i386/t-seh-eh"
+ fi
+ # Shared libgcc DLL install dir depends on cross/native build.
+ if test x${host} = x${target} ; then
+ tmake_dlldir_file="i386/t-dlldir"
+ else
+ tmake_dlldir_file="i386/t-dlldir-x"
+ fi
+ # FIXME - dj - t-chkstk used to be in here, need a 64-bit version of that
+ tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm t-dfprules i386/t-chkstk"
+ ;;
i[34567]86-*-mingw*)
extra_parts="crtbegin.o crtend.o crtfastmath.o"
case ${target_thread_file} in
@@ -1143,7 +1160,8 @@
i[34567]86-*-linux* | x86_64-*-linux* | \
i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
+ i[34567]86-*-cygwin* | x86_64-*-cygwin* | \
+ i[34567]86-*-mingw* | x86_64-*-mingw* | \
i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
i[34567]86-*-openbsd* | x86_64-*-openbsd*)
tmake_file="${tmake_file} t-softfp-tf"

View File

@@ -1,45 +0,0 @@
--- libgcc/config/i386/cygming-crtbegin.c.orig 2013-07-25 18:39:34.579552100 +0800
+++ libgcc/config/i386/cygming-crtbegin.c 2013-07-25 18:43:51.778712300 +0800
@@ -100,6 +100,8 @@
extern void __gcc_register_frame (void);
extern void __gcc_deregister_frame (void);
+static HANDLE libgcc_dll;
+
void
__gcc_register_frame (void)
{
@@ -112,8 +114,11 @@
void (*register_frame_fn) (const void *, struct object *);
HANDLE h = GetModuleHandle (LIBGCC_SONAME);
if (h)
- register_frame_fn = (void (*) (const void *, struct object *))
- GetProcAddress (h, "__register_frame_info");
+ {
+ libgcc_dll = LoadLibrary (LIBGCC_SONAME); /* Hold reference */
+ register_frame_fn = (void (*) (const void *, struct object *))
+ GetProcAddress (h, "__register_frame_info");
+ }
else
register_frame_fn = __register_frame_info;
if (register_frame_fn)
@@ -142,13 +147,16 @@
{
#if DWARF2_UNWIND_INFO
void * (*deregister_frame_fn) (const void *);
- HANDLE h = GetModuleHandle (LIBGCC_SONAME);
- if (h)
+ if (libgcc_dll)
deregister_frame_fn = (void* (*) (const void *))
- GetProcAddress (h, "__deregister_frame_info");
+ GetProcAddress (libgcc_dll, "__deregister_frame_info");
else
deregister_frame_fn = __deregister_frame_info;
if (deregister_frame_fn)
deregister_frame_fn (__EH_FRAME_BEGIN__);
+
+if (libgcc_dll)
+ FreeLibrary (libgcc_dll);
+
#endif
}

View File

@@ -28,23 +28,23 @@
echo "*** UWIN may not be used as a host platform because"
--- origsrc/gcc-4.8-20130310/lto-plugin/Makefile.am 2011-08-10 03:48:37.000000000 -0500
+++ src/gcc-4.8-20130310/lto-plugin/Makefile.am 2013-03-17 03:11:08.995692600 -0500
@@ -22,7 +22,7 @@ liblto_plugin_la_SOURCES = lto-plugin.c
liblto_plugin_la_LIBADD = \
@@ -22,7 +22,7 @@
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
-liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -bindir $(libexecsubdir) \
+liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
- $(lt_host_flags) -module -bindir $(libexecsubdir) \
+ $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \
../libiberty/pic/libiberty.a),../libiberty/pic/libiberty.a,)
--- origsrc/gcc-4.8-20130310/lto-plugin/Makefile.in 2011-08-10 03:48:37.000000000 -0500
+++ src/gcc-4.8-20130310/lto-plugin/Makefile.in 2013-03-17 03:12:11.625779100 -0500
@@ -242,7 +242,7 @@ liblto_plugin_la_LIBADD = \
$(if $(wildcard ../libiberty/pic/libiberty.a),$(Wc)../libiberty/pic/libiberty.a,)
@@ -242,7 +242,7 @@
# Note that we intentionally override the bindir supplied by ACX_LT_HOST_FLAGS
-liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -bindir $(libexecsubdir) \
+liblto_plugin_la_LDFLAGS = $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
liblto_plugin_la_LDFLAGS = $(AM_LDFLAGS) \
- $(lt_host_flags) -module -bindir $(libexecsubdir) \
+ $(lt_host_flags) -module -avoid-version -bindir $(libexecsubdir) \
$(if $(wildcard ../libiberty/pic/libiberty.a),,-Wc,../libiberty/libiberty.a)
liblto_plugin_la_DEPENDENCIES = $(if $(wildcard \

View File

@@ -1,65 +0,0 @@
--- origsrc/gcc-4.8-20130310/config/picflag.m4 2012-01-23 00:25:28.000000000 -0600
+++ src/gcc-4.8-20130310/config/picflag.m4 2013-03-17 03:30:20.891423200 -0500
@@ -17,7 +17,9 @@ case "${$2}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
- i[[34567]]86-*-cygwin* | i[[34567]]86-*-mingw* | x86_64-*-mingw*)
+ i[[34567]]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[[34567]]86-*-mingw* | x86_64-*-mingw*)
;;
i[[34567]]86-*-interix[[3-9]]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
--- origsrc/gcc-4.8-20130310/gcc/configure 2013-03-17 03:47:51.178944300 -0500
+++ src/gcc-4.8-20130310/gcc/configure 2013-03-17 11:48:48.692743100 -0500
@@ -4893,7 +4893,9 @@ case "${target}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
--- origsrc/gcc-4.8-20130310/libada/configure 2013-03-10 17:37:35.000000000 -0500
+++ src/gcc-4.8-20130310/libada/configure 2013-03-17 03:35:42.763922700 -0500
@@ -2834,7 +2834,9 @@ case "${host}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
--- origsrc/gcc-4.8-20130310/libgcc/configure 2013-03-17 03:33:36.033747800 -0500
+++ src/gcc-4.8-20130310/libgcc/configure 2013-03-17 03:35:57.173942600 -0500
@@ -2228,7 +2228,9 @@ case "${host}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.
--- origsrc/gcc-4.8-20130310/libiberty/configure 2012-09-18 11:03:01.000000000 -0500
+++ src/gcc-4.8-20130310/libiberty/configure 2013-03-17 03:36:10.983961700 -0500
@@ -4865,7 +4865,9 @@ case "${host}" in
hppa*64*-*-hpux*)
# PIC is the default for 64-bit PA HP-UX.
;;
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-interix[3-9]*)
# Interix 3.x gcc -fpic/-fPIC options generate broken code.

View File

@@ -1,17 +1,6 @@
--- gcc/config.build (revision 196430)
+++ gcc/config.build (working copy)
@@ -60,7 +60,7 @@
# IBM 360/370/390 Architecture
build_xm_defines='FATAL_EXIT_CODE=12'
;;
- i[34567]86-*-cygwin* )
+ i[34567]86-*-cygwin* | x86_64-*-cygwin* )
build_xm_file=i386/xm-cygwin.h
build_exeext=.exe
;;
--- gcc/config.gcc 2012-09-12 04:03:54.000000000 -0500
+++ gcc/config.gcc 2013-03-11 03:41:03.674656700 -0500
@@ -1438,15 +1438,30 @@ i[34567]86-*-cygwin*)
@@ -1438,7 +1438,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
@@ -20,126 +9,22 @@
extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
if test x$enable_threads = xyes; then
thread_file='posix'
fi
use_gcc_stdint=wrap
;;
+x86_64-*-cygwin*)
+ need_64bit_isa=yes
+ tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h i386/cygwin.h i386/cygwin-w64.h i386/cygwin-stdint.h"
+ xm_file=i386/xm-cygwin.h
+ tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
+ target_gtfiles="\$(srcdir)/config/i386/winnt.c"
@@ -1596,7 +1596,7 @@
xm_file=i386/xm-cygwin.h
tmake_file="${tmake_file} i386/t-cygming t-slibgcc i386/t-cygwin-w64"
target_gtfiles="\$(srcdir)/config/i386/winnt.c"
- extra_options="${extra_options} i386/cygming.opt"
+ extra_options="${extra_options} i386/cygming.opt i386/cygwin.opt"
+ extra_objs="winnt.o winnt-stubs.o"
+ c_target_objs="${c_target_objs} msformat-c.o"
+ cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
+ if test x$enable_threads = xyes; then
+ thread_file='posix'
+ fi
+ use_gcc_stdint=wrap
+ ;;
i[34567]86-*-mingw* | x86_64-*-mingw*)
tm_file="${tm_file} i386/unix.h i386/bsd.h i386/gas.h dbxcoff.h i386/cygming.h"
xm_file=i386/xm-mingw32.h
@@ -3699,7 +3715,9 @@
;;
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]*)
;;
- i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
+ ;;
+ i[34567]86-*-mingw* | x86_64-*-mingw*)
;;
i[34567]86-*-freebsd* | x86_64-*-freebsd*)
;;
--- gcc/config.host (revision 196430)
+++ gcc/config.host (working copy)
@@ -214,7 +214,7 @@
;;
esac
;;
- i[34567]86-*-cygwin*)
+ i[34567]86-*-cygwin* | x86_64-*-cygwin*)
host_xm_file=i386/xm-cygwin.h
out_host_hook_obj=host-cygwin.o
host_xmake_file="${host_xmake_file} i386/x-cygwin"
--- gcc/config/i386/cygwin-stdint.h (revision 196430)
+++ gcc/config/i386/cygwin-stdint.h (working copy)
@@ -24,39 +24,39 @@
#define INT8_TYPE "signed char"
#define INT16_TYPE "short int"
#define INT32_TYPE "int"
-#define INT64_TYPE "long long int"
+#define INT64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT8_TYPE "unsigned char"
#define UINT16_TYPE "short unsigned int"
#define UINT32_TYPE "unsigned int"
-#define UINT64_TYPE "long long unsigned int"
+#define UINT64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Minimum-width integer types */
#define INT_LEAST8_TYPE "signed char"
#define INT_LEAST16_TYPE "short int"
#define INT_LEAST32_TYPE "int"
-#define INT_LEAST64_TYPE "long long int"
+#define INT_LEAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT_LEAST8_TYPE "unsigned char"
#define UINT_LEAST16_TYPE "short unsigned int"
#define UINT_LEAST32_TYPE "unsigned int"
-#define UINT_LEAST64_TYPE "long long unsigned int"
+#define UINT_LEAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Fastest minimum-width integer types */
#define INT_FAST8_TYPE "signed char"
-#define INT_FAST16_TYPE "int"
-#define INT_FAST32_TYPE "int"
-#define INT_FAST64_TYPE "long long int"
+#define INT_FAST16_TYPE (TARGET_64BIT ? "long int" : "int")
+#define INT_FAST32_TYPE (TARGET_64BIT ? "long int" : "int")
+#define INT_FAST64_TYPE (TARGET_64BIT ? "long int" : "long long int")
#define UINT_FAST8_TYPE "unsigned char"
-#define UINT_FAST16_TYPE "unsigned int"
-#define UINT_FAST32_TYPE "unsigned int"
-#define UINT_FAST64_TYPE "long long unsigned int"
+#define UINT_FAST16_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
+#define UINT_FAST32_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
+#define UINT_FAST64_TYPE (TARGET_64BIT ? "long unsigned int" : "long long unsigned int")
/* Integer types capable of holding object pointers */
-#define INTPTR_TYPE "int"
-#define UINTPTR_TYPE "unsigned int"
+#define INTPTR_TYPE (TARGET_64BIT ? "long int" : "int")
+#define UINTPTR_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
extra_objs="winnt.o winnt-stubs.o"
c_target_objs="${c_target_objs} msformat-c.o"
cxx_target_objs="${cxx_target_objs} winnt-cxx.o msformat-c.o"
--- gcc/config/i386/cygwin.h (revision 196430)
+++ gcc/config/i386/cygwin.h (working copy)
@@ -18,11 +18,20 @@
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
-#define EXTRA_OS_CPP_BUILTINS() /* Nothing. */
+#define EXTRA_OS_CPP_BUILTINS() \
+ do \
+ { \
+ builtin_define ("__CYGWIN__"); \
+ if (!TARGET_64BIT) \
+ builtin_define ("__CYGWIN32__"); \
+ builtin_define ("__unix__"); \
+ builtin_define ("__unix"); \
+ } \
+ while (0)
@@ -18,7 +18,7 @@
#undef CPP_SPEC
#define CPP_SPEC "%(cpp_cpu) %{posix:-D_POSIX_SOURCE} \
- -D__CYGWIN32__ -D__CYGWIN__ %{!ansi:-Dunix} -D__unix__ -D__unix \
- %{!ansi:-Dunix} \
+ %{!ansi:-Dunix} %{pthread: } \
%{mwin32:-DWIN32 -D_WIN32 -D__WIN32 -D__WIN32__ %{!ansi:-DWINNT}} \
%{!nostdinc:%{!mno-win32:-idirafter ../include/w32api%s -idirafter ../../include/w32api%s}}\
@@ -200,118 +85,3 @@
+Driver
+
+; Retain blank line above
--- gcc/config/i386/cygwin-w64.h (revision 0)
+++ gcc/config/i386/cygwin-w64.h (working copy)
@@ -0,0 +1,84 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows 32/64 via Cygwin runtime, using GNU tools and
+ the Windows API Library.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
+GCC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 3, or (at your option)
+any later version.
+
+GCC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GCC; see the file COPYING3. If not see
+<http://www.gnu.org/licenses/>. */
+
+/* Enable multilib. */
+
+#undef ASM_SPEC
+#define ASM_SPEC "%{m32:--32} %{m64:--64}"
+
+/* To implement C++ function replacement we always wrap the cxx
+ malloc-like operators. See N2800 #17.6.4.6 [replacement.functions] */
+#undef CXX_WRAP_SPEC_LIST
+#define CXX_WRAP_SPEC_LIST " \
+ --wrap _Znwm \
+ --wrap _Znam \
+ --wrap _ZdlPv \
+ --wrap _ZdaPv \
+ --wrap _ZnwmRKSt9nothrow_t \
+ --wrap _ZnamRKSt9nothrow_t \
+ --wrap _ZdlPvRKSt9nothrow_t \
+ --wrap _ZdaPvRKSt9nothrow_t \
+"
+
+#undef SPEC_32
+#undef SPEC_64
+#define SPEC_32 "m32"
+#define SPEC_64 "!m32"
+
+#undef SUB_LINK_ENTRY32
+#undef SUB_LINK_ENTRY64
+#define SUB_LINK_ENTRY32 "-e __cygwin_dll_entry@12"
+#define SUB_LINK_ENTRY64 "-e _cygwin_dll_entry"
+
+#undef SUB_LINK_SPEC
+#undef SUB_LINK_ENTRY
+#define SUB_LINK_SPEC "%{" SPEC_64 ":-m i386pep} %{" SPEC_32 ":-m i386pe}"
+#define SUB_LINK_ENTRY "%{" SPEC_64 ":" SUB_LINK_ENTRY64 "} %{" SPEC_32 ":" SUB_LINK_ENTRY32 "}"
+
+#undef MULTILIB_DEFAULTS
+#define MULTILIB_DEFAULTS { "m64" }
+
+#undef LINK_SPEC
+#define LINK_SPEC SUB_LINK_SPEC "\
+ %{mwindows:--subsystem windows} \
+ %{mconsole:--subsystem console} \
+ " CXX_WRAP_SPEC " \
+ %{shared: %{mdll: %eshared and mdll are not compatible}} \
+ %{shared: --shared} %{mdll:--dll} \
+ %{static:-Bstatic} %{!static:-Bdynamic} \
+ %{shared|mdll: " SUB_LINK_ENTRY " --enable-auto-image-base} \
+ %(shared_libgcc_undefs) \
+ --dll-search-prefix=cyg \
+ %{rdynamic: --export-all-symbols} \
+ %{!shared: %{!mdll: %{" SPEC_32 ":--large-address-aware} --tsaware}}"
+
+/* Cygwin64 will have a 64-bit long type. */
+#undef LONG_TYPE_SIZE
+#define LONG_TYPE_SIZE (TARGET_64BIT ? 64 : 32)
+
+/* Override default "long long unsigned int" from cygming.h. */
+#undef SIZE_TYPE
+#define SIZE_TYPE (TARGET_64BIT ? "long unsigned int" : "unsigned int")
+#undef PTRDIFF_TYPE
+#define PTRDIFF_TYPE (TARGET_64BIT ? "long int" : "int")
+
+#undef LIBGCC_SONAME
+#define LIBGCC_SONAME "cyggcc_s-seh-1.dll"
--- gcc/config/i386/t-cygwin-w64 (revision 0)
+++ gcc/config/i386/t-cygwin-w64 (working copy)
@@ -0,0 +1,3 @@
+MULTILIB_OPTIONS = m64/m32
+MULTILIB_DIRNAMES = 64
+MULTILIB_OSDIRNAMES = ../lib ../lib32
--- gcc/configure.ac (revision 196430)
+++ gcc/configure.ac (working copy)
@@ -3611,7 +3611,7 @@
# wrappers to aid in interposing and redirecting operators new, delete,
# etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
# are configuring for a version of Cygwin that exports the wrappers.
- if test x$host = x$target; then
+ if test x$host = x$target && test x$host_cpu = xi686; then
AC_CHECK_FUNC([__wrap__Znaj],[gcc_ac_cygwin_dll_wrappers=yes],[gcc_ac_cygwin_dll_wrappers=no])
else
# Can't check presence of libc functions during cross-compile, so
--- gcc/configure (revision 196430)
+++ gcc/configure (working copy)
@@ -24261,7 +24261,7 @@
# wrappers to aid in interposing and redirecting operators new, delete,
# etc., as per n2800 #17.6.4.6 [replacement.functions]. Check if we
# are configuring for a version of Cygwin that exports the wrappers.
- if test x$host = x$target; then
+ if test x$host = x$target && test x$host_cpu = xi686; then
ac_fn_c_check_func "$LINENO" "__wrap__Znaj" "ac_cv_func___wrap__Znaj"
if test "x$ac_cv_func___wrap__Znaj" = x""yes; then :
gcc_ac_cygwin_dll_wrappers=yes

View File

@@ -1,107 +1,68 @@
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
# Contributor: Martell Malone <martellmalone@gmail.com>
# toolchain build order: win32-api-headers->msys2-runtime->binutils->gcc->binutils->msys2-runtime
# NOTE: libtool requires rebuilt with each new gcc version
pkgname=('gcc' 'gcc-libs' 'gcc-fortran')
pkgver=4.8.2
pkgrel=4
pkgver=4.9.1
pkgrel=1
pkgdesc="The GNU Compiler Collection"
arch=('i686' 'x86_64')
groups=('msys2-devel')
license=('GPL' 'LGPL' 'FDL' 'custom')
url="http://gcc.gnu.org"
makedepends=('binutils>=2.23'
'mpc-devel'
'cloog-devel'
'gmp-devel'
'mpfr-devel'
'isl-devel'
'doxygen')
checkdepends=('dejagnu')
options=('!emptydirs') # 'debug' '!strip')
source=(https://ftp.gnu.org/gnu/gcc/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
gcc-4.8-filename-output.patch
gcc-4.8-lambda-ICE.patch
4.5-java-FIONREAD.patch
4.5-skiptest.patch
4.7-ada.patch
4.7-boehm-gc-cygwin.patch
4.7-execstack.patch
4.7-java-awt.patch
4.7-java-jni.patch
4.7-libffi-noinst.patch
4.7-libitm-cygwin.patch
4.7-libstdc-cygwin.patch
4.8-gcc-ada-DTR.patch
4.8-cmodel-medium.patch
4.8-duplicate-symbols.patch
4.8-java-soname.patch
4.8-libatomic-cygwin.patch
4.8-libdecnumber-cygwin64.patch
4.8-libffi-cygwin64.patch
4.8-libgcc-cygwin64.patch
4.8-lto-plugin-soname.patch
4.8-picflag-cygwin64.patch
4.8-specs-cygwin.patch
4.8-Wimplicit-decls.patch
gcc-4.8.2-1.src.patch
gcc-4.8.0-configure-msys2.patch
gcc-4.8.0-libgcc-msys32.patch
gcc-4.8.0-libgcc-msys64.patch
gcc-4.8.0-msys2-spec.patch
gcc-4.8.0-testsuite-msys2.patch
4.8-libgcc-references.patch)
md5sums=('a3d7d63b9cb6b6ea049469a0c4a43c9d'
'40cb437805e2f7a006aa0d0c3098ab0f'
'6eb6e080dbf7bc6825f53a0aaa6c4ef9'
makedepends=('binutils>=2.23' 'mpc-devel' 'cloog-devel')
options=('!emptydirs')
source=(ftp://gcc.gnu.org/pub/gcc/releases/gcc-${pkgver}/gcc-${pkgver}.tar.bz2
4.5-java-FIONREAD.patch
4.5-skiptest.patch
4.7-ada.patch
4.7-boehm-gc-cygwin.patch
4.7-execstack.patch
4.7-java-awt.patch
4.7-java-jni.patch
4.7-libffi-noinst.patch
4.7-libitm-cygwin.patch
4.8-gcc-ada-DTR.patch
4.8-java-soname.patch
4.8-libatomic-cygwin.patch
4.8-libffi-cygwin64.patch
4.8-lto-plugin-soname.patch
4.8-specs-cygwin.patch
4.8-Wimplicit-decls.patch
gcc-4.8.2-1.src.patch
gcc-4.8.0-configure-msys2.patch
gcc-4.8.0-libgcc-msys2.patch
gcc-4.8.0-msys2-spec.patch
gcc-4.8.0-testsuite-msys2.patch)
md5sums=('SKIP'
'741e079f5ec80aee1a552d0ec0b74575'
'24c9520471f62669b4bc0e0a939547fa'
'f53ebfcefc69e83e3a8d0529e5db5730'
'abfde62661674ecd867fb66cff6d3ded'
'3e56bc1fac8b3b6d0bb2af0a380622e1'
'f7cb43c6a6a54e55027e70a9b03774b2'
'01ef40c1f5b0cc4cdbc5be94008743e8'
'1887614712a7cd79f771927adf78e760'
'15da8d111f8eab15597db353537aefd3'
'094b047b34a044d4ba76074d98bfd8a0'
'e553ecf0eeb3e83a149cc1241971fd10'
'da668f9ac5a280fadebc2a2cd37896e0'
'f3302086c3246e1fc45cac73deb9429d'
'6a5d266ca3b80805ca4f47fb1991687c'
'735b839507e6c355024469f9e65eee49'
'2d4d01c814a6db66e896d9ba9acd4b29'
'f01b3978cbd1f8aa14833a26a7891a32'
'78eab6229fd809e5494df53797778e0b'
'40b0a196ff005adb442ac5b9a2f42fd8'
'cc664a508782dc6d67207dd141a9ced9'
'fc7adee9dc8206aaf5e033798c358157'
'acda6f3393d9e935953fa48f68e9d4f5'
'f0b8ce646a39aa0b60af88b5a4941a2d'
'6dd3e475475a14b5a767a1e42d57009b'
'9668346a30879e0d00355774e04881e5'
'2ab5cde66d656ec85713ef4dcb470a74'
'711c3e3bfad64560808efcef37a43a5e'
'92b4c654a7951e1026d103bd5c0ddcca'
'eb1c05fc48755cdf685d871ae49b1eef'
'18d72148d7e9f4d0251fcdf41e6afa05'
'a83db795d84bbe727ebf18d240d9ac1a'
'd694307ff0c82bf0aac3d1d042a666d1'
'0cad08f12b27fab33264de04bb3a58b1'
'8939d9e1a18a1181bbb95da8efb8e98f'
'c9fb65c97643807fcee2f21e897b5ed7'
'3d6ec97347c5a57f46610a93bbd724a8'
'928e151b33981e68d0e67a9bd387b37e')
'5e7bd7d99e7a701979abeb59b898fa6d'
'a294820ed2717ced56fddaa2bd743901')
prepare() {
cd ${srcdir}/gcc-${pkgver}
[ -f gcc/ada/a-intnam-cygwin.ads ] && rm -f gcc/ada/a-intnam-cygwin.ads
[ -f gcc/ada/indepsw-cygwin.adb ] && rm -f gcc/ada/indepsw-cygwin.adb
[ -f gcc/ada//mlib-tgt-specific-cygwin.adb ] && rm -f gcc/ada/mlib-tgt-specific-cygwin.adb
[ -f gcc/ada/s-gloloc-cygwin.adb ] && rm -f gcc/ada/s-gloloc-cygwin.adb
[ -f gcc/ada/s-osinte-cygwin.ads ] && rm -f gcc/ada/s-osinte-cygwin.ads
[ -f gcc/ada/s-taprop-cygwin.adb ] && rm -f gcc/ada/s-taprop-cygwin.adb
[ -f gcc/ada/system-cygwin.ads ] && rm -f gcc/ada/system-cygwin.ads
[ -f gcc/config/i386/cygwin.opt ] && rm -f gcc/config/i386/cygwin.opt
[ -f gcc/config/i386/msys-w64.h ] && rm -f gcc/config/i386/msys-w64.h
[ -f gcc/config/i386/t-msys-w64 ] && rm -f gcc/config/i386/t-msys-w64
[ -f gcc/config/i386/msys.h ] && rm -f gcc/config/i386/msys.h
[ -f gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C ] && rm -f gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
[ -f libgcc/config/i386/t-msys ] && rm -f libgcc/config/i386/t-msys
# Do not run fixincludes
#sed -i 's@\./fixinc\.sh@-c true@' gcc/Makefile.in
@@ -110,67 +71,67 @@ prepare() {
# hack! - some configure tests for header files using "$CPP $CPPFLAGS"
sed -i "/ac_cpp=/s/\$CPPFLAGS/\$CPPFLAGS -O2/" {libiberty,gcc}/configure
# http://gcc.gnu.org/bugzilla/show_bug.cgi?id=57653
patch -p0 -i ${srcdir}/gcc-4.8-filename-output.patch
# http://gcc.gnu.org/bugzilla//show_bug.cgi?id=56710 - commit 3d1f8279
patch -p1 -i ${srcdir}/gcc-4.8-lambda-ICE.patch
#MSYS/Cygwin patches
echo '4.7ada patch'
patch -p2 -i ${srcdir}/4.7-ada.patch
echo 'boehm patch'
patch -p2 -i ${srcdir}/4.7-boehm-gc-cygwin.patch
echo 'stack'
patch -p2 -i ${srcdir}/4.7-execstack.patch
echo 'java awt'
patch -p2 -i ${srcdir}/4.7-java-awt.patch
echo 'fionread'
patch -p2 -i ${srcdir}/4.5-java-FIONREAD.patch
echo 'javajni'
patch -p2 -i ${srcdir}/4.7-java-jni.patch
echo 'java soname 4.8 patch'
patch -p0 -i ${srcdir}/4.8-java-soname.patch
echo 'libatonic 4.8 patch'
patch -p2 -i ${srcdir}/4.8-libatomic-cygwin.patch
patch -p2 -i ${srcdir}/4.8-libdecnumber-cygwin64.patch
echo 'libffi noinst'
patch -p2 -i ${srcdir}/4.7-libffi-noinst.patch
echo 'libffi cyg64'
patch -p2 -i ${srcdir}/4.8-libffi-cygwin64.patch
if [ "$CARCH" = "x86_64" ]
then
patch -p0 -i ${srcdir}/4.8-libgcc-cygwin64.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-libgcc-msys64.patch
else
patch -p1 -i ${srcdir}/gcc-4.8.0-libgcc-msys32.patch
fi
echo 'libgcc msys2'
patch -p1 -i ${srcdir}/gcc-4.8.0-libgcc-msys2.patch
echo 'libitm cyg'
patch -p2 -i ${srcdir}/4.7-libitm-cygwin.patch
patch -p2 -i ${srcdir}/4.7-libstdc-cygwin.patch
echo '4.8lto'
patch -p2 -i ${srcdir}/4.8-lto-plugin-soname.patch
patch -p2 -i ${srcdir}/4.8-picflag-cygwin64.patch
echo 'specs cyg'
patch -p0 -i ${srcdir}/4.8-specs-cygwin.patch
if [ "$CARCH" = "x86_64" ]
then
patch -p0 -i ${srcdir}/4.8-cmodel-medium.patch
patch -p2 -i ${srcdir}/4.8-duplicate-symbols.patch
fi
patch -p0 -i ${srcdir}/4.8-libgcc-references.patch
echo 'skip test'
patch -p2 -i ${srcdir}/4.5-skiptest.patch
if [ "$CARCH" = "i686" ]
then
patch -p0 -i ${srcdir}/4.8-gcc-ada-DTR.patch
fi
patch -p2 -i ${srcdir}/4.8-Wimplicit-decls.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-configure-msys2.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-msys2-spec.patch
patch -p1 -i ${srcdir}/gcc-4.8.0-testsuite-msys2.patch
[ -d ${srcdir}/gcc-build ] && rm -rf ${srcdir}/gcc-build
echo 'Wimp'
patch -p2 -i ${srcdir}/4.8-Wimplicit-decls.patch
echo 'con msys2'
patch -p1 -i ${srcdir}/gcc-4.8.0-configure-msys2.patch
echo 'msys2 spec'
patch -p1 -i ${srcdir}/gcc-4.8.0-msys2-spec.patch
echo 'testsuite'
#patch -p1 -i ${srcdir}/gcc-4.8.0-testsuite-msys2.patch
mkdir ${srcdir}/gcc-build
}
build() {
mkdir -p ${srcdir}/gcc-build
cd ${srcdir}/gcc-build
case ${CARCH} in
i686)
_arch=i686
_arch_conf="--disable-sjlj-exceptions"
_arch_conf="--disable-sjlj-exceptions"
;;
x86_64)
x86_64)
_arch=x86-64
_arch_conf=
_arch_conf=
;;
esac
# using -pipe causes spurious test-suite failures
@@ -178,49 +139,35 @@ build() {
CFLAGS=${CFLAGS/-pipe/}
CXXFLAGS=${CXXFLAGS/-pipe/}
# Hmm, lots of Makefile.in and aclocal.m4 to worry about :-(
# if check_option "strip" "n"; then
# Makefile.in or aclocal.m4:
# INSTALL_STRIP_PROGRAM = $(install_sh) -c -s
# INSTALL_STRIP_FLAG=-s
# configure:
# INSTALL_STRIP_PROGRAM="\$(install_sh) -c -s"
${srcdir}/gcc-${pkgver}/configure --build=${CHOST} \
--prefix=/usr \
--libexecdir=/usr/lib \
--enable-bootstrap \
--enable-shared --enable-shared-libgcc --enable-static \
--enable-version-specific-runtime-libs \
--with-arch=$_arch \
--disable-multilib \
$_arch_conf \
--with-tune=generic \
--disable-__cxa_atexit \
--enable-languages=c,c++,fortran,lto \
--enable-graphite \
--enable-threads=posix \
--enable-libatomic \
--enable-libgomp \
--disable-libitm \
--enable-libquadmath \
--enable-libquadmath-support \
--enable-libssp \
--disable-win32-registry \
--disable-symvers \
--with-gnu-ld \
--with-gnu-as \
--disable-isl-version-check \
--enable-checking=release \
--without-libiconv-prefix \
--without-libintl-prefix \
--with-system-zlib
if check_option "strip" "n"; then
sed -i 's,^STRIP = .*$,STRIP = true,g' Makefile
sed -i 's,^STRIP_FOR_TARGET=.*$,STRIP_FOR_TARGET=true,g' Makefile
fi
--prefix=/usr \
--libexecdir=/usr/lib \
--enable-bootstrap \
--enable-shared --enable-shared-libgcc --enable-static \
--enable-version-specific-runtime-libs \
--with-arch=$_arch \
--disable-multilib \
$_arch_conf \
--with-tune=generic \
--disable-__cxa_atexit \
--enable-languages=c,c++,fortran,lto \
--enable-graphite \
--enable-threads=posix \
--enable-libatomic \
--enable-libgomp \
--disable-libitm \
--enable-libquadmath \
--enable-libquadmath-support \
--enable-libssp \
--disable-win32-registry \
--disable-symvers \
--with-gnu-ld \
--with-gnu-as \
--disable-isl-version-check \
--enable-checking=release \
--without-libiconv-prefix \
--without-libintl-prefix \
--with-system-zlib
make
# make documentation
@@ -323,7 +270,7 @@ for opt; do
case "$opt" in
-ansi|-std=c89|-std=iso9899:1990) fl="";;
-std=*) echo "`basename $0` called with non ANSI/ISO C option $opt" >&2
exit 1;;
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
@@ -336,7 +283,7 @@ for opt; do
case "$opt" in
-std=c99|-std=iso9899:1999) fl="";;
-std=*) echo "`basename $0` called with non ISO C99 option $opt" >&2
exit 1;;
exit 1;;
esac
done
exec gcc $fl ${1+"$@"}
@@ -376,7 +323,7 @@ package_gcc-fortran()
rm ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/{*.o,libgc*}
rm ${pkgdir}/usr/share/info/libquadmath.info
rm -r ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/include
#rm ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}/libgfortran.a
#rm ${pkgdir}/usr/lib/gcc/$CHOST/${pkgver}libgfortran.a
# Install Runtime Library Exception
install -Dm644 ${srcdir}/gcc-${pkgver}/COPYING.RUNTIME \

View File

@@ -1,17 +0,0 @@
--- gcc/c-family/c-opts.c (revision 200330)
+++ gcc/c-family/c-opts.c (working copy)
@@ -1338,10 +1338,14 @@ c_finish_options (void)
/* Give CPP the next file given by -include, if any. */
static void
push_command_line_include (void)
{
+ // This can happen if disabled by -imacros for example.
+ if (include_cursor > deferred_count)
+ return;
+
if (!done_preinclude)
{
done_preinclude = true;
if (flag_hosted && std_inc && !cpp_opts->preprocessed)
{

View File

@@ -1,35 +0,0 @@
diff --git a/gcc/cp/semantics.c b/gcc/cp/semantics.c
index 0b8e2f7..ad1c209 100644
--- a/gcc/cp/semantics.c
+++ b/gcc/cp/semantics.c
@@ -2719,8 +2719,10 @@ finish_member_declaration (tree decl)
/*friend_p=*/0);
}
}
- /* Enter the DECL into the scope of the class. */
- else if (pushdecl_class_level (decl))
+ /* Enter the DECL into the scope of the class, if the class
+ isn't a closure (whose fields are supposed to be unnamed). */
+ else if (CLASSTYPE_LAMBDA_EXPR (current_class_type)
+ || pushdecl_class_level (decl))
{
if (TREE_CODE (decl) == USING_DECL)
{
diff --git a/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
new file mode 100644
index 0000000..df2b037
--- /dev/null
+++ b/gcc/testsuite/g++.dg/cpp0x/lambda/lambda-names1.C
@@ -0,0 +1,9 @@
+// PR c++/56710
+// { dg-options "-std=c++11 -Wall" }
+
+int main()
+{
+ int t = 0;
+ return [&]() -> int {int __t; __t = t; return __t; }();
+ return [&t]() -> int {int __t; __t = t; return __t; }();
+}
--
1.8.4.2

View File

@@ -196,7 +196,7 @@ diff -Naur gcc-cygwin/config/dfp.m4 gcc-msys2/config/dfp.m4
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
- i?86*-*-cygwin* | x86_64*-*cygwin*)
- i?86*-*-cygwin* | x86_64*-*-cygwin*)
+ i?86*-*-cygwin* | x86_64*-*-cygwin* | \
+ i?86*-*-msys* | x86_64*-*-msys*)
enable_decimal_float=yes
@@ -561,7 +561,7 @@ diff -Naur gcc-cygwin/gcc/ada/gcc-interface/Makefile.in gcc-msys2/gcc/ada/gcc-in
endif
-# Cygwin/Mingw32
-ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(osys))),)
-ifeq ($(strip $(filter-out cygwin% mingw32% pe,$(target_os))),)
+# Cygwin/MSYS/Mingw32
+ifeq ($(strip $(filter-out cygwin% msys% mingw32% pe,$(osys))),)
# Set target pair suffix for mingw or cygwin
@@ -1745,8 +1745,8 @@ diff -Naur gcc-cygwin/libgo/config/ltmain.sh gcc-msys2/libgo/config/ltmain.sh
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc*)
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* )
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* )
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;
@@ -4140,120 +4140,6 @@ diff -Naur gcc-cygwin/libjava/shlibpath.m4 gcc-msys2/libjava/shlibpath.m4
mingw*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | sed -e 's/[[.]]/-/g'`${versuffix}${shared_ext}'
diff -Naur gcc-cygwin/libmudflap/configure gcc-msys2/libmudflap/configure
--- gcc-cygwin/libmudflap/configure 2013-03-17 10:42:38 +0400
+++ gcc-msys2/libmudflap/configure 2013-03-20 07:02:44 +0400
@@ -5161,7 +5161,7 @@
lt_cv_sys_max_cmd_len=-1;
;;
- cygwin* | mingw* | cegcc*)
+ cygwin* | msys* | mingw* | cegcc*)
# On Win9x/ME, this test blows up -- it succeeds, but takes
# about 5 minutes as the teststring grows exponentially.
# Worse, since 9x/ME are not pre-emptively multitasking,
@@ -5503,7 +5503,7 @@
lt_cv_file_magic_test_file=/shlib/libc.so
;;
-cygwin*)
+cygwin* | msys*)
# func_win32_libid is a shell function defined in ltmain.sh
lt_cv_deplibs_check_method='file_magic ^x86 archive import|^x86 DLL'
lt_cv_file_magic_cmd='func_win32_libid'
@@ -6083,7 +6083,7 @@
aix*)
symcode='[BCDT]'
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
symcode='[ABCDGISTW]'
;;
hpux*)
@@ -7690,7 +7690,7 @@
# PIC is the default for these OSes.
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
# Although the cygwin gcc ignores -fPIC, still need this for old-style
@@ -7772,7 +7772,7 @@
fi
;;
- mingw* | cygwin* | pw32* | os2* | cegcc*)
+ mingw* | msys* | cygwin* | pw32* | os2* | cegcc*)
# This hack is so that the source file can tell whether it is being
# built for inclusion in a dll (and should export symbols for example).
lt_prog_compiler_pic='-DDLL_EXPORT'
@@ -8234,7 +8234,7 @@
extract_expsyms_cmds=
case $host_os in
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
@@ -8349,7 +8349,7 @@
fi
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# _LT_TAGVAR(hardcode_libdir_flag_spec, ) is actually meaningless,
# as there is no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
@@ -8780,7 +8780,7 @@
export_dynamic_flag_spec=-rdynamic
;;
- cygwin* | mingw* | pw32* | cegcc*)
+ cygwin* | msys* | mingw* | pw32* | cegcc*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -9681,14 +9681,14 @@
# libtool to hard-code these into programs
;;
-cygwin* | mingw* | pw32* | cegcc*)
+cygwin* | msys* | mingw* | pw32* | cegcc*)
version_type=windows
shrext_cmds=".dll"
need_version=no
need_lib_prefix=no
case $GCC,$host_os in
- yes,cygwin* | yes,mingw* | yes,pw32* | yes,cegcc*)
+ yes,cygwin* | yes,msys* | yes,mingw* | yes,pw32* | yes,cegcc*)
library_names_spec='$libname.dll.a'
# DLL is installed to $(libdir)/../bin by postinstall_cmds
postinstall_cmds='base_file=`basename \${file}`~
@@ -9712,6 +9712,12 @@
sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
;;
+ msys*)
+ # Msys DLLs use 'msys-' prefix rather than 'lib'
+ soname_spec='`echo ${libname} | sed -e 's/^lib/msys-/'``echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
+
+ sys_lib_search_path_spec="$sys_lib_search_path_spec /usr/lib/w32api"
+ ;;
mingw* | cegcc*)
# MinGW DLLs use traditional 'lib' prefix
soname_spec='${libname}`echo ${release} | $SED -e 's/[.]/-/g'`${versuffix}${shared_ext}'
@@ -10348,7 +10354,7 @@
lt_cv_dlopen_libs=
;;
- cygwin*)
+ cygwin* | msys*)
lt_cv_dlopen="dlopen"
lt_cv_dlopen_libs=
;;
diff -Naur gcc-cygwin/libobjc/configure gcc-msys2/libobjc/configure
--- gcc-cygwin/libobjc/configure 2013-03-17 10:13:58 +0400
+++ gcc-msys2/libobjc/configure 2013-03-20 07:02:44 +0400
@@ -11081,8 +10967,8 @@ diff -Naur gcc-cygwin/ltmain.sh gcc-msys2/ltmain.sh
case $host in
- *cygwin* | *mingw* | *pw32* | *cegcc*)
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc*)
- *cygwin* | *mingw* | *pw32* | *cegcc* | *solaris2* )
+ *cygwin* | *msys* | *mingw* | *pw32* | *cegcc* | *solaris2* )
# don't eliminate duplications in $postdeps and $predeps
opt_duplicate_compiler_generated_deps=:
;;

View File

@@ -1,34 +0,0 @@
diff -Naur gcc-4.8.0-cygwin/libgcc/config.host gcc-4.8.0/libgcc/config.host
--- gcc-4.8.0-cygwin/libgcc/config.host 2013-04-16 16:04:32.258789100 +0000
+++ gcc-4.8.0/libgcc/config.host 2013-04-16 16:55:46.929687500 +0000
@@ -591,6 +594,22 @@
fi
tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-cygwin i386/t-crtfm i386/t-chkstk t-dfprules"
;;
+i[34567]86-*-msys*)
+ extra_parts="crtbegin.o crtend.o crtfastmath.o"
+ # This has to match the logic for DWARF2_UNWIND_INFO in gcc/config/i386/cygming.h
+ if test x$enable_sjlj_exceptions = xyes; then
+ tmake_eh_file="i386/t-sjlj-eh"
+ else
+ tmake_eh_file="i386/t-dw2-eh"
+ fi
+ # Shared libgcc DLL install dir depends on cross/native build.
+ if test x${host} = x${target} ; then
+ tmake_dlldir_file="i386/t-dlldir"
+ else
+ tmake_dlldir_file="i386/t-dlldir-x"
+ fi
+ tmake_file="${tmake_file} ${tmake_eh_file} ${tmake_dlldir_file} i386/t-slibgcc-cygming i386/t-cygming i386/t-msys i386/t-crtfm i386/t-chkstk t-dfprules"
+ ;;
i[34567]86-*-mingw*)
extra_parts="crtbegin.o crtend.o crtfastmath.o"
case ${target_thread_file} in
@@ -1164,6 +1200,7 @@
i[34567]86-*-gnu* | \
i[34567]86-*-solaris2* | x86_64-*-solaris2.1[0-9]* | \
i[34567]86-*-cygwin* | i[34567]86-*-mingw* | x86_64-*-mingw* | \
+ i[34567]86-*-msys* | \
i[34567]86-*-freebsd* | x86_64-*-freebsd* | \
i[34567]86-*-openbsd* | x86_64-*-openbsd*)
tmake_file="${tmake_file} t-softfp-tf"

View File

@@ -4,7 +4,7 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys.h gcc-4.8.0/gcc/config/i386/msy
@@ -0,0 +1,156 @@
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows32, using a Unix style C library and tools.
+ Copyright (C) 1995-2013 Free Software Foundation, Inc.
+ Copyright (C) 1995-2014 Free Software Foundation, Inc.
+
+This file is part of GCC.
+
@@ -152,7 +152,7 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys.h gcc-4.8.0/gcc/config/i386/msy
+#define LIBGCC_SONAME "msys-gcc_s" LIBGCC_EH_EXTN "-1.dll"
+
+/* We should find a way to not have to update this manually. */
+#define LIBGCJ_SONAME "msys-gcj" /*LIBGCC_EH_EXTN*/ "-14.dll"
+#define LIBGCJ_SONAME "msys-gcj" /*LIBGCC_EH_EXTN*/ "-16.dll"
+
+/* Make stack executable to avoid DEP problems with trampolines. */
+#define HAVE_ENABLE_EXECUTE_STACK
@@ -165,7 +165,7 @@ diff -Naur gcc-4.8.0-cygwin/gcc/config/i386/msys-w64.h gcc-4.8.0/gcc/config/i386
+/* Operating system specific defines to be used when targeting GCC for
+ hosting on Windows 32/64 via MSYS runtime, using GNU tools and
+ the Windows API Library.
+ Copyright (C) 2013 Free Software Foundation, Inc.
+ Copyright (C) 2013-2014 Free Software Foundation, Inc.
+
+This file is part of GCC.
+

File diff suppressed because it is too large Load Diff