mirror of
https://codeberg.org/guix/guix.git
synced 2025-10-02 02:15:12 +00:00
gnu: gcc: Fix mingw cross compiler.
* gnu/packages/patches/gcc-7-cross-mingw.patch: New file. * gnu/packages/cross-base.scm (cross-gcc-patches): Add XGCC parameter; update caller. Use it for target mingw and gcc >= 7. * gnu/local.mk (dist_patch_DATA): Add it.
This commit is contained in:
parent
fc16ef9d90
commit
308eb5c11a
3 changed files with 33 additions and 5 deletions
24
gnu/packages/patches/gcc-7-cross-mingw.patch
Normal file
24
gnu/packages/patches/gcc-7-cross-mingw.patch
Normal file
|
@ -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;
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue