summaryrefslogtreecommitdiff
path: root/gnu/packages/patches/gcc-7-cross-mingw.patch
diff options
context:
space:
mode:
authorMathieu Othacehe <m.othacehe@gmail.com>2019-10-10 17:32:24 +0200
committerMathieu Othacehe <m.othacehe@gmail.com>2019-10-10 17:32:24 +0200
commit4d14902b9402a83db444d8d6818d0a4f438ce8c4 (patch)
tree85f05a0540ebcd4a1f192096c36271a287eb9fe8 /gnu/packages/patches/gcc-7-cross-mingw.patch
parent647cfcf68184e8558fcea751ef6d95b6e5d86ae1 (diff)
parent6c50e1dc0625f89884cff40b22627091efa37708 (diff)
Merge branch 'master' into core-updates
Diffstat (limited to 'gnu/packages/patches/gcc-7-cross-mingw.patch')
-rw-r--r--gnu/packages/patches/gcc-7-cross-mingw.patch24
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/packages/patches/gcc-7-cross-mingw.patch b/gnu/packages/patches/gcc-7-cross-mingw.patch
new file mode 100644
index 0000000000..eec6f88953
--- /dev/null
+++ b/gnu/packages/patches/gcc-7-cross-mingw.patch
@@ -0,0 +1,24 @@
+This fixes
+
+../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc: In function ‘void* __gnu_cxx::aligned_alloc(std::size_t, std::size_t)’:
+../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: error: ‘memalign’ was not declared in this scope
+ return memalign (al, sz);
+ ^~~~~~~~
+../../../../gcc-7.4.0/libstdc++-v3/libsupc++/new_opa.cc:78:10: note: suggested alternative: ‘max_align_t’
+ return memalign (al, sz);
+ ^~~~~~~~
+ max_align_t
+
+diff --git a/libstdc++-v3/libsupc++/new_opa.cc b/libstdc++-v3/libsupc++/new_opa.cc
+index 94e79cadb0e..084900e0daf 100644
+--- a/libstdc++-v3/libsupc++/new_opa.cc
++++ b/libstdc++-v3/libsupc++/new_opa.cc
+@@ -39,6 +39,8 @@ extern "C" void *memalign(std::size_t boundary, std::size_t size);
+ # endif
+ #endif
+
++#define memalign _aligned_malloc
++
+ using std::new_handler;
+ using std::bad_alloc;
+