MSYS2-packages/gcc/0004-Cygwin-add-dummy-pthread-tsaware-and-large-address-a.patch
مهدي شينون (Mehdi Chinoune) 152f0c1987 gcc: update to 15.1.0
2025-06-26 09:34:37 +02:00

60 lines
2.0 KiB
Diff

From a62a01e401038f0415cec0137bd6da2348e85fc8 Mon Sep 17 00:00:00 2001
From: Jonathan Yong <10walls@gmail.com>
Date: Sat, 28 Jun 2014 09:44:48 +0800
Subject: [PATCH 04/12] Cygwin: add dummy -pthread, -tsaware and
--large-address-aware for executables only
---
gcc/config/i386/cygwin-w64.h | 1 +
gcc/config/i386/cygwin.h | 2 ++
gcc/config/i386/cygwin.opt | 3 +++
3 files changed, 6 insertions(+)
diff --git a/gcc/config/i386/cygwin-w64.h b/gcc/config/i386/cygwin-w64.h
index 160a290a03d..f9c4e207c36 100644
--- a/gcc/config/i386/cygwin-w64.h
+++ b/gcc/config/i386/cygwin-w64.h
@@ -67,6 +67,7 @@ along with GCC; see the file COPYING3. If not see
%{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. */
diff --git a/gcc/config/i386/cygwin.h b/gcc/config/i386/cygwin.h
index bb353ee5f0a..52fa0c0b3c2 100644
--- a/gcc/config/i386/cygwin.h
+++ b/gcc/config/i386/cygwin.h
@@ -93,6 +93,7 @@ along with GCC; see the file COPYING3. If not see
/* 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 _Znwj \
--wrap _Znaj \
@@ -131,6 +132,7 @@ along with GCC; see the file COPYING3. If not see
%{static:-Bstatic} %{!static:-Bdynamic} \
%{shared|mdll: --enable-auto-image-base -e __cygwin_dll_entry@12} \
--dll-search-prefix=cyg \
+ %{rdynamic: --export-all-symbols} \
%{!shared: %{!mdll: --large-address-aware --tsaware}}"
/* Binutils does not handle weak symbols from dlls correctly. For now,
diff --git a/gcc/config/i386/cygwin.opt b/gcc/config/i386/cygwin.opt
index 970ed11bde0..68a372ddd83 100644
--- a/gcc/config/i386/cygwin.opt
+++ b/gcc/config/i386/cygwin.opt
@@ -21,4 +21,7 @@
pthread
Driver
+rdynamic
+Driver
+
; Retain blank line above
--
2.45.1