diff options
Diffstat (limited to 'community/gcc6/boehm-gc-musl-mips.patch')
-rw-r--r-- | community/gcc6/boehm-gc-musl-mips.patch | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/community/gcc6/boehm-gc-musl-mips.patch b/community/gcc6/boehm-gc-musl-mips.patch new file mode 100644 index 0000000000..6085419140 --- /dev/null +++ b/community/gcc6/boehm-gc-musl-mips.patch @@ -0,0 +1,27 @@ +--- 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) |