Mail archive
alpine-aports

[alpine-aports] [PATCH 1/9] main/gcc: fix gcj bug on s390x

From: Tuan M. Hoang <tmhoang_at_flatglobe.org>
Date: Wed, 22 Feb 2017 17:07:10 -0500

---
 main/gcc/310-build-gcj-s390x.patch | 28 ++++++++++++++++++++++++++++
 main/gcc/APKBUILD                  |  2 ++
 2 files changed, 30 insertions(+)
 create mode 100644 main/gcc/310-build-gcj-s390x.patch
diff --git a/main/gcc/310-build-gcj-s390x.patch b/main/gcc/310-build-gcj-s390x.patch
new file mode 100644
index 0000000..1e522ee
--- /dev/null
+++ b/main/gcc/310-build-gcj-s390x.patch
_at_@ -0,0 +1,28 @@
+From 697a7ba791fce2ffab2ed723d909a89684019e3d Mon Sep 17 00:00:00 2001
+From: "Tuan M. Hoang" <tmhoang_at_flatglobe.org>
+Date: Sun, 19 Feb 2017 17:03:33 +0000
+Subject: [PATCH] main/gcc : when building gcc-java on s390x, libgcj.so
+ complains about undefined reference to __data_start. Using
+ SEARCH_FOR_DATA_START instead solved it. Credit to Andrew Haley at RedHat.
+
+---
+ boehm-gc/include/private/gcconfig.h | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+diff --git a/boehm-gc/include/private/gcconfig.h b/boehm-gc/include/private/gcconfig.h
+index 4ca6a80..a15fff6 100644
+--- a/boehm-gc/include/private/gcconfig.h
++++ b/boehm-gc/include/private/gcconfig.h
+_at_@ -1837,8 +1837,7 @@
+ #       define OS_TYPE "LINUX"
+ #       define LINUX_STACKBOTTOM
+ #       define DYNAMIC_LOADING
+-	extern int __data_start[];
+-#       define DATASTART ((ptr_t)(__data_start))
++#       define SEARCH_FOR_DATA_START
+     extern int _end[];
+ #   define DATAEND (_end)
+ #   define CACHE_LINE_SIZE 256
+-- 
+2.11.1
+
diff --git a/main/gcc/APKBUILD b/main/gcc/APKBUILD
index 70610f0..47e1007 100644
--- a/main/gcc/APKBUILD
+++ b/main/gcc/APKBUILD
_at_@ -192,6 +192,7 @@ source="ftp://gcc.gnu.org/pub/gcc/releases/gcc-${_pkgbase:-$pkgver}/gcc-${_pkgba
 	ada-musl.patch
 
 	300-main-gcc-add-musl-s390x-dynamic-linker.patch
+	310-build-gcj-s390x.patch
 
 	fix-rs6000-pie.patch
 	"
_at_@ -715,4 +716,5 @@ abe9aaf9aa956058d0386a4396a511d176a46bb3906b90e952383646cdc158cbeb0a5dc616a1ccb1
 3f5bc334d9f73d06f5f7c876738d02356acdd08958bea0e4d2095ebf15c2c2ec4e411abdae0297505ae9a1699ca01b17338e853184e84663203b192b0d35fc19  ada-shared.patch
 631d4bdef6d8bde34df7978bb53ec28c3c909cf1f87139e5f148138d0f09adc58b41ecf0148bbf50fb4bc916c411e9bf8a2b6c046c75c0e77d754d8c35bcd4d7  ada-musl.patch
 4b4a0ff306a8ef34ff6e3284fbfca869012164a47ba7cb099085c1dd03e6ca0cdd462f82710e08c9a02895adc7484e4c5eef17b5aa264cf5d978fe8ad78eea93  300-main-gcc-add-musl-s390x-dynamic-linker.patch
+385bc2fa50204f678964e5148c6170f572701dab920fbec8301f505bda34d182cde0adb7da042fee71719e12fb59f59181897f9b1bb4f4716ff59aad46ca1998  310-build-gcj-s390x.patch
 01c71cd5881fc07ea3b9b980697e89b3ca0fe98502958ceafc3fca18b2604c844e2f457feab711baf8e03f00a5383b0e38aac7eb954034e306f43d4a37f165ed  fix-rs6000-pie.patch"
-- 
2.1.4
---
Unsubscribe:  alpine-aports+unsubscribe_at_lists.alpinelinux.org
Help:         alpine-aports+help_at_lists.alpinelinux.org
---
Received on Wed Feb 22 2017 - 17:07:10 GMT