summaryrefslogtreecommitdiffstats
path: root/plugins/gcc9
diff options
context:
space:
mode:
authorMark Brand <mabrand@mabrand.nl>2019-05-05 22:12:06 (GMT)
committerMark Brand <mabrand@mabrand.nl>2019-05-05 23:30:54 (GMT)
commit50af8e0e76754494bc5fda6aa518294eb9ba913f (patch)
tree21c23c8ac4908d4af4ccf7293694f83b657be53e /plugins/gcc9
parenta1a44c5a3da37237b3f05598439967f87b305340 (diff)
downloadmxe-50af8e0e76754494bc5fda6aa518294eb9ba913f.zip
mxe-50af8e0e76754494bc5fda6aa518294eb9ba913f.tar.gz
mxe-50af8e0e76754494bc5fda6aa518294eb9ba913f.tar.bz2
add gcc9 plugin
Diffstat (limited to 'plugins/gcc9')
-rw-r--r--plugins/gcc9/gcc9-overlay.mk35
-rw-r--r--plugins/gcc9/gcc9.patch60
2 files changed, 95 insertions, 0 deletions
diff --git a/plugins/gcc9/gcc9-overlay.mk b/plugins/gcc9/gcc9-overlay.mk
new file mode 100644
index 0000000..bf9004f
--- /dev/null
+++ b/plugins/gcc9/gcc9-overlay.mk
@@ -0,0 +1,35 @@
+# This file is part of MXE. See LICENSE.md for licensing information.
+
+# override relevant cloog, isl, and gcc variables changed in:
+# https://github.com/mxe/mxe/pull/965
+#
+# simply expanded variables (*_SUBDIR, *_FILE, etc.) need to be set
+
+PKG := cloog
+$(PKG)_TARGETS := $(MXE_TARGETS)
+
+PKG := isl
+$(PKG)_VERSION := 0.16.1
+$(PKG)_CHECKSUM := 412538bb65c799ac98e17e8cfcdacbb257a57362acfaaff254b0fcae970126d2
+$(PKG)_SUBDIR := $(PKG)-$($(PKG)_VERSION)
+$(PKG)_FILE := $(PKG)-$($(PKG)_VERSION).tar.bz2
+$(PKG)_URL := http://isl.gforge.inria.fr/$($(PKG)_FILE)
+$(PKG)_URL_2 := https://gcc.gnu.org/pub/gcc/infrastructure/$($(PKG)_FILE)
+
+PKG := gcc
+$(PKG)_VERSION := 9.1.0
+$(PKG)_CHECKSUM := 79a66834e96a6050d8fe78db2c3b32fb285b230b855d0a66288235bc04b327a0
+$(PKG)_SUBDIR := gcc-$($(PKG)_VERSION)
+$(PKG)_FILE := gcc-$($(PKG)_VERSION).tar.xz
+$(PKG)_URL := https://ftp.gnu.org/gnu/gcc/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_URL_2 := https://www.mirrorservice.org/sites/sourceware.org/pub/gcc/releases/gcc-$($(PKG)_VERSION)/$($(PKG)_FILE)
+$(PKG)_PATCHES := $(dir $(lastword $(MAKEFILE_LIST)))/gcc9.patch
+
+# copy db-2-install-exe.patch to gcc7 plugin when gcc9 is default
+db_PATCHES := $(TOP_DIR)/src/db-1-fix-including-winioctl-h-lowcase.patch
+
+# set these in respective makefiles when gcc9 becomes default
+# remove from here and leave them blank for gcc5 plugin
+libssh_EXTRA_WARNINGS = -Wno-error=implicit-fallthrough
+gtkimageview_EXTRA_WARNINGS = -Wno-error=misleading-indentation
+guile_EXTRA_WARNINGS = -Wno-error=misleading-indentation
diff --git a/plugins/gcc9/gcc9.patch b/plugins/gcc9/gcc9.patch
new file mode 100644
index 0000000..568f94a
--- /dev/null
+++ b/plugins/gcc9/gcc9.patch
@@ -0,0 +1,60 @@
+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 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Thu, 2 Feb 2017 02:05:50 +1100
+Subject: [PATCH 1/2] 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.c
+index 1111111..2222222 100644
+--- a/gcc/config/i386/driver-i386.c
++++ b/gcc/config/i386/driver-i386.c
+@@ -26,7 +26,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 2001
+From: Tony Theodore <tonyt@logyst.com>
+Date: Fri, 6 Apr 2018 13:40:22 +1000
+Subject: [PATCH 2/2] remove hard-coded mingw from include path
+
+
+diff --git a/gcc/config.gcc b/gcc/config.gcc
+index 1111111..2222222 100644
+--- a/gcc/config.gcc
++++ b/gcc/config.gcc
+@@ -1931,7 +1931,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} in
+diff --git a/gcc/config/i386/mingw32.h b/gcc/config/i386/mingw32.h
+index 1111111..2222222 100644
+--- a/gcc/config/i386/mingw32.h
++++ b/gcc/config/i386/mingw32.h
+@@ -195,7 +195,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