mailing list of musl libc
 help / color / mirror / code / Atom feed
b2508ba7c8aa2a1fa8ff5413853c7a3238be5c2f blob 1144 bytes (raw)

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
 
diff --git a/gcc/config/i386/pmm_malloc.h b/gcc/config/i386/pmm_malloc.h
index 1b0bfe37852..d7b2b19bb3c 100644
--- a/gcc/config/i386/pmm_malloc.h
+++ b/gcc/config/i386/pmm_malloc.h
@@ -27,12 +27,13 @@
 #include <stdlib.h>

 /* We can't depend on <stdlib.h> since the prototype of posix_memalign
-   may not be visible.  */
+   may not be visible and we can't pollute the namespace either.  */
 #ifndef __cplusplus
-extern int posix_memalign (void **, size_t, size_t);
+extern int _mm_posix_memalign (void **, size_t, size_t)
 #else
-extern "C" int posix_memalign (void **, size_t, size_t) throw ();
+extern "C" int _mm_posix_memalign (void **, size_t, size_t) throw ()
 #endif
+__asm__("posix_memalign");

 static __inline void *
 _mm_malloc (size_t __size, size_t __alignment)
@@ -42,7 +43,7 @@ _mm_malloc (size_t __size, size_t __alignment)
     return malloc (__size);
   if (__alignment == 2 || (sizeof (void *) == 8 && __alignment == 4))
     __alignment = sizeof (void *);
-  if (posix_memalign (&__ptr, __alignment, __size) == 0)
+  if (_mm_posix_memalign (&__ptr, __alignment, __size) == 0)
     return __ptr;
   else
     return NULL;
debug log:

solving 1d80096 ...
found 1d80096 in https://inbox.vuxu.org/musl/20241002-gcc-bump-v1-1-8f910fd54b1c@gmx.net/ ||
	https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/ ||
	https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/ ||
	https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/

applying [1/4] https://inbox.vuxu.org/musl/20241002-gcc-bump-v1-1-8f910fd54b1c@gmx.net/
diff --git a/patches/gcc-12.4.0/0002-posix_memalign.diff b/patches/gcc-12.4.0/0002-posix_memalign.diff
new file mode 100644
index 0000000..1d80096

Checking patch patches/gcc-12.4.0/0002-posix_memalign.diff...
Applied patch patches/gcc-12.4.0/0002-posix_memalign.diff cleanly.

skipping https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/ for 1d80096
skipping https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/ for 1d80096
skipping https://inbox.vuxu.org/musl/ZxjsGeXjnu6lY68X@probook/ for 1d80096
index at:
100644 b2508ba7c8aa2a1fa8ff5413853c7a3238be5c2f	patches/gcc-12.4.0/0002-posix_memalign.diff

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).