aboutsummaryrefslogtreecommitdiffstats
path: root/community/gcc6/boehm-gc-musl-mips.patch
diff options
context:
space:
mode:
authoralpine-mips-patches <info@mobile-stream.com>2018-12-20 14:06:55 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2018-12-27 14:26:57 +0000
commitdfca930c9ffcad3df051ad7a7889618c5a24fd95 (patch)
tree1ce1fe68715b35476091768d4d08d5f384761a8c /community/gcc6/boehm-gc-musl-mips.patch
parent477750ad67904c6e4dd487024c32c9176fbabe95 (diff)
downloadaports-dfca930c9ffcad3df051ad7a7889618c5a24fd95.tar.bz2
aports-dfca930c9ffcad3df051ad7a7889618c5a24fd95.tar.xz
community/gcc6: fix build on mips*
Diffstat (limited to 'community/gcc6/boehm-gc-musl-mips.patch')
-rw-r--r--community/gcc6/boehm-gc-musl-mips.patch27
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)