112 lines · 4.1 KB · Text
RawDownload
This file is part of MXE. See LICENSE.md for licensing information. Contains ad hoc patches for cross building. From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Tony Theodore <tonyt@logyst.com>Date: Thu, 2 Feb 2017 02:05:50 +1100Subject: [PATCH 1/3] allow native cpu detection when building with clang function was disabled for non-gcc5 in:https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=b587c12551143c14f023860a1dbdf7316ae71f27;hp=43096b526a9f23008b9769372f11475ae63487bc clang can build it correctly and this should probably be a feature test diff --git a/gcc/config/i386/driver-i386.c b/gcc/config/i386/driver-i386.cindex 1111111..2222222 100644--- a/gcc/config/i386/driver-i386.c+++ b/gcc/config/i386/driver-i386.c@@ -24,7 +24,7 @@ along with GCC; see the file COPYING3.  If not see  const char *host_detect_local_cpu (int argc, const char **argv); -#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__))+#if defined(__GNUC__) && (__GNUC__ >= 5 || !defined(__PIC__)) || defined(__clang__) #include "cpuid.h"  struct cache_desc From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Tony Theodore <tonyt@logyst.com>Date: Fri, 6 Apr 2018 13:40:22 +1000Subject: [PATCH 2/3] remove hard-coded mingw from include path  diff --git a/gcc/config.gcc b/gcc/config.gccindex 1111111..2222222 100644--- a/gcc/config.gcc+++ b/gcc/config.gcc@@ -1771,7 +1771,7 @@ i[34567]86-*-mingw* | x86_64-*-mingw*) 			tmake_file="${tmake_file} i386/t-mingw-w32" 			;; 	esac-        native_system_header_dir=/mingw/include+        native_system_header_dir=/include 	target_gtfiles="\$(srcdir)/config/i386/winnt.c" 	extra_options="${extra_options} i386/cygming.opt i386/mingw.opt" 	case ${target} indiff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.hindex 1111111..2222222 100644--- a/gcc/config/i386/mingw32.h+++ b/gcc/config/i386/mingw32.h@@ -172,7 +172,7 @@ along with GCC; see the file COPYING3.  If not see /* For native mingw-version we need to take care that NATIVE_SYSTEM_HEADER_DIR    macro contains POSIX-style path.  See bug 52947.  */ #undef NATIVE_SYSTEM_HEADER_DIR-#define NATIVE_SYSTEM_HEADER_DIR "/mingw/include"+#define NATIVE_SYSTEM_HEADER_DIR "/include"  /* Output STRING, a string representing a filename, to FILE.    We canonicalize it to be in Unix format (backslashes are replaced From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001From: Liu Hao <lh_mouse@126.com>Date: Wed, 6 May 2020 21:49:18 +0800Subject: [PATCH 3/3] libgomp: Don't hard-code MS printf attributes Source: https://github.com/msys2/MINGW-packages/blob/9501ee2afc8d01dc7d85383e4b22e91c30d93ca7/mingw-w64-gcc/0020-libgomp-Don-t-hard-code-MS-printf-attributes.patch Following discussion at https://www.spinics.net/lists/gcchelp/msg51246.html diff --git a/libgomp/libgomp.h b/libgomp/libgomp.hindex 1111111..2222222 100644--- a/libgomp/libgomp.h+++ b/libgomp/libgomp.h@@ -68,6 +68,14 @@ # endif #endif +#include <stdio.h>+#include <stdio.h>+#ifdef __MINGW_PRINTF_FORMAT+#define PRINTF_FORMAT __MINGW_PRINTF_FORMAT+#else+#define PRINTF_FORMAT printf+#endif+ #ifdef HAVE_ATTRIBUTE_VISIBILITY # pragma GCC visibility push(hidden) #endif@@ -97,7 +105,7 @@ extern void *gomp_realloc (void *, size_  extern void gomp_vdebug (int, const char *, va_list); extern void gomp_debug (int, const char *, ...)-	__attribute__ ((format (printf, 2, 3)));+	__attribute__ ((format (PRINTF_FORMAT, 2, 3))); #define gomp_vdebug(KIND, FMT, VALIST) \   do { \     if (__builtin_expect (gomp_debug_var, 0)) \@@ -110,11 +118,11 @@ extern void gomp_debug (int, const char   } while (0) extern void gomp_verror (const char *, va_list); extern void gomp_error (const char *, ...)-	__attribute__ ((format (printf, 1, 2)));+	__attribute__ ((format (PRINTF_FORMAT, 1, 2))); extern void gomp_vfatal (const char *, va_list) 	__attribute__ ((noreturn)); extern void gomp_fatal (const char *, ...)-	__attribute__ ((noreturn, format (printf, 1, 2)));+	__attribute__ ((noreturn, format (PRINTF_FORMAT, 1, 2)));  struct gomp_task; struct gomp_taskgroup;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t