void-packages/srcpkgs/gcc6/patches/311-boehm-gc-musl-mips.patch
q66 6f1c7ff607 New package: gcc6-6.5.0
This is the first part of an effort to allow bootstrapping openjdk
without downloading any binaries. The next part will be an openjdk7
package that will be used to bootstrap openjdk8.

After that, we can proceed to add the missing parts to go all the
way up to 11.

[ci skip]
2019-11-15 22:56:51 +01:00

27 lines
976 B
Diff

--- a/boehm-gc/include/private/gc_locks.h
+++ b/boehm-gc/include/private/gc_locks.h
@@ -282,7 +282,9 @@
# define GC_TEST_AND_SET_DEFINED
# endif
# ifdef MIPS
-# ifdef LINUX
+# if (__GNUC__>4)||((__GNUC__==4)&&(__GNUC_MINOR__>=4))
+# define GC_test_and_set(addr) __sync_lock_test_and_set (addr, 1)
+# elif defined(LINUX)
# include <sys/tas.h>
# define GC_test_and_set(addr) _test_and_set((int *) addr,1)
# define GC_TEST_AND_SET_DEFINED
--- a/boehm-gc/include/private/gcconfig.h
+++ b/boehm-gc/include/private/gcconfig.h
@@ -1373,10 +1373,9 @@
/* needs to be tweaked for workstation class machines. */
# define OS_TYPE "LINUX"
# define DYNAMIC_LOADING
+# define SEARCH_FOR_DATA_START
extern int _end[];
# define DATAEND (_end)
- extern int __data_start[];
-# define DATASTART ((ptr_t)(__data_start))
# ifdef _MIPS_SZPTR
# define CPP_WORDSZ _MIPS_SZPTR
# define ALIGNMENT (_MIPS_SZPTR/8)