Github messages for voidlinux
 help / color / Atom feed
* [PR PATCH] cross-*-musl*: rebuild musl with PIC
@ 2019-11-10 16:49 voidlinux-github
  2019-11-11 10:33 ` [PR PATCH] [Merged]: " voidlinux-github
  0 siblings, 1 reply; 2+ messages in thread
From: voidlinux-github @ 2019-11-10 16:49 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 678 bytes --]

There is a new pull request by q66 against master on the void-packages repository

https://github.com/void-ppc/void-packages cross-musl-pic
https://github.com/void-linux/void-packages/pull/16325

cross-*-musl*: rebuild musl with PIC
This is necessary because if musl is not built with PIC in the environment, things that need to link as static PIE when cross compiling will not build (notably https://github.com/void-linux/void-packages/pull/16320). The target musl is okay because the "final" gcc is built with `--enable-default-pie` but the cross musl is built with the bootstrap gcc.

A patch file from https://github.com/void-linux/void-packages/pull/16325.patch is attached

[-- Warning: decoded text below may be mangled --]
[-- Attachment #2: github-pr-cross-musl-pic-16325.patch --]
[-- Type: text/x-diff, Size: 14292 bytes --]

From 955b157160c7c55e2dcc8ef40827173e8219e7ad Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:38:42 +0100
Subject: [PATCH 01/13] cross-aarch64-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-aarch64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-aarch64-linux-musl/template b/srcpkgs/cross-aarch64-linux-musl/template
index b3e30d73206..b52d1b60f44 100644
--- a/srcpkgs/cross-aarch64-linux-musl/template
+++ b/srcpkgs/cross-aarch64-linux-musl/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for ARM64 LE target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -147,7 +147,7 @@ _musl_build() {
 
 	CC="${_triplet}-gcc" LD="${_triplet}-ld" AR="${_triplet}-ar" \
 		AS="${_triplet}-as" RANLIB="${_triplet}-ranlib" \
-		CFLAGS="-Os -pipe ${_archflags}" \
+		CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From e0e06c7735a06294b9c858d6cc31f2618f166635 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:40:09 +0100
Subject: [PATCH 02/13] cross-arm-linux-musleabi: rebuild musl with PIC

---
 srcpkgs/cross-arm-linux-musleabi/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabi/template b/srcpkgs/cross-arm-linux-musleabi/template
index 5143c4a2cc3..9b1997206a1 100644
--- a/srcpkgs/cross-arm-linux-musleabi/template
+++ b/srcpkgs/cross-arm-linux-musleabi/template
@@ -13,7 +13,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for ARMv5 TE target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -149,7 +149,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From dd2e2e23fbd10d74b4aaafd593b8705ff552a044 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:40:41 +0100
Subject: [PATCH 03/13] cross-arm-linux-musleabihf: rebuild musl with PIC

---
 srcpkgs/cross-arm-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-arm-linux-musleabihf/template b/srcpkgs/cross-arm-linux-musleabihf/template
index 7cc4caba416..6a1128f98a5 100644
--- a/srcpkgs/cross-arm-linux-musleabihf/template
+++ b/srcpkgs/cross-arm-linux-musleabihf/template
@@ -13,7 +13,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for ARMv6 LE Hard Float target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -149,7 +149,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From 6e76cd35d0f76ec32b27d724abfd85bc39f45dc9 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:41:19 +0100
Subject: [PATCH 04/13] cross-armv7l-linux-musleabihf: rebuild musl with PIC

---
 srcpkgs/cross-armv7l-linux-musleabihf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-armv7l-linux-musleabihf/template b/srcpkgs/cross-armv7l-linux-musleabihf/template
index 8ff41974114..3fd8e2132d6 100644
--- a/srcpkgs/cross-armv7l-linux-musleabihf/template
+++ b/srcpkgs/cross-armv7l-linux-musleabihf/template
@@ -13,7 +13,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for ARMv7 LE Hard Float target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -150,7 +150,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From 25aa7686513841c996e0d8b23b9759b528a1edb9 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:42:40 +0100
Subject: [PATCH 05/13] cross-i686-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-i686-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-i686-linux-musl/template b/srcpkgs/cross-i686-linux-musl/template
index e91747bcb2f..708568d96ce 100644
--- a/srcpkgs/cross-i686-linux-musl/template
+++ b/srcpkgs/cross-i686-linux-musl/template
@@ -12,7 +12,7 @@ _archflags="-march=i686"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for i686 target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -148,7 +148,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From 46f039412ec0e430f0ee638ab89e913f25260d5b Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:43:07 +0100
Subject: [PATCH 06/13] cross-mipsel-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-mipsel-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-musl/template b/srcpkgs/cross-mipsel-linux-musl/template
index 9e22097097c..8036d50cabf 100644
--- a/srcpkgs/cross-mipsel-linux-musl/template
+++ b/srcpkgs/cross-mipsel-linux-musl/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for MIPS32r2 LE softfloat target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -144,7 +144,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From 917e51d87168638734c5cd5f4af7121b098d9661 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:43:33 +0100
Subject: [PATCH 07/13] cross-mipsel-linux-muslhf: rebuild musl with PIC

---
 srcpkgs/cross-mipsel-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mipsel-linux-muslhf/template b/srcpkgs/cross-mipsel-linux-muslhf/template
index cb2e4c9d6ba..b6188decd2b 100644
--- a/srcpkgs/cross-mipsel-linux-muslhf/template
+++ b/srcpkgs/cross-mipsel-linux-muslhf/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for MIPS32r2 LE hardfloat target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -144,7 +144,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From f0980199e62bde7e402b6d51bffa1c91d514ebbd Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:44:12 +0100
Subject: [PATCH 08/13] cross-mips-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-mips-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-musl/template b/srcpkgs/cross-mips-linux-musl/template
index 72af856de03..2b257f07097 100644
--- a/srcpkgs/cross-mips-linux-musl/template
+++ b/srcpkgs/cross-mips-linux-musl/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for MIPS32r2 BE softfloat target (musl)"
 maintainer="Orphaned <orphan@voidlinux.org>"
 homepage="https://www.voidlinux.org/"
@@ -144,7 +144,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From 9247fd8e7af38477575632d3d3e6df49255dbbd5 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:44:36 +0100
Subject: [PATCH 09/13] cross-mips-linux-muslhf: rebuild musl with PIC

---
 srcpkgs/cross-mips-linux-muslhf/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-mips-linux-muslhf/template b/srcpkgs/cross-mips-linux-muslhf/template
index 6160998dcbf..cc1e7ae6cc1 100644
--- a/srcpkgs/cross-mips-linux-muslhf/template
+++ b/srcpkgs/cross-mips-linux-muslhf/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for MIPS32r2 BE hardfloat target (musl)"
 maintainer="hipperson0 <hipperson0@gmail.com>"
 homepage="https://www.voidlinux.org/"
@@ -144,7 +144,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From d891bda5d1c25b7bd8510bf31fc758d0abb8912c Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:45:04 +0100
Subject: [PATCH 10/13] cross-powerpc64le-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-powerpc64le-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64le-linux-musl/template b/srcpkgs/cross-powerpc64le-linux-musl/template
index ab9d72c4174..0d758a01015 100644
--- a/srcpkgs/cross-powerpc64le-linux-musl/template
+++ b/srcpkgs/cross-powerpc64le-linux-musl/template
@@ -10,7 +10,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for powerpc64le with musl"
 maintainer="q66 <daniel@octaforge.org>"
 homepage="https://www.voidlinux.org/"
@@ -160,7 +160,7 @@ _musl_build() {
 
 	CC="${_triplet}-gcc" LD="${_triplet}-ld" AR="${_triplet}-ar" \
 		AS="${_triplet}-as" RANLIB="${_triplet}-ranlib" \
-		CFLAGS="-Os -pipe ${_archflags}" \
+		CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From bda3257d42dcefda108ed5c9a7b03cf7b4f709a0 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:45:35 +0100
Subject: [PATCH 11/13] cross-powerpc64-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-powerpc64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc64-linux-musl/template b/srcpkgs/cross-powerpc64-linux-musl/template
index 7fb01606f0c..ab1c473250e 100644
--- a/srcpkgs/cross-powerpc64-linux-musl/template
+++ b/srcpkgs/cross-powerpc64-linux-musl/template
@@ -10,7 +10,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 short_desc="Cross toolchain for powerpc64 with musl"
 maintainer="q66 <daniel@octaforge.org>"
 homepage="https://www.voidlinux.org/"
@@ -177,7 +177,7 @@ _libucontext_build() {
 
 	# it's ok if we're static only here
 	CC="${_triplet}-gcc" AR="${_triplet}-ar" AS="${_triplet}-as" \
-		CFLAGS="-Os -pipe ${_archflags}" \
+		CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		make ARCH=ppc64 libucontext.a
 
 	cp libucontext.a ${_sysroot}/usr/lib

From 8fe9e730f5db6c0544943aa686608597e4201d23 Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:46:01 +0100
Subject: [PATCH 12/13] cross-powerpc-linux-musl: rebuild musl with PIC

---
 srcpkgs/cross-powerpc-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-powerpc-linux-musl/template b/srcpkgs/cross-powerpc-linux-musl/template
index a1f630f0ca5..8298205506e 100644
--- a/srcpkgs/cross-powerpc-linux-musl/template
+++ b/srcpkgs/cross-powerpc-linux-musl/template
@@ -12,7 +12,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 
 short_desc="Cross toolchain for PowerPC (musl)"
 maintainer="Thomas Batten <stenstorpmc@gmail.com>"
@@ -158,7 +158,7 @@ _musl_build() {
 
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

From e2ba2e7121e39561e84b46208e7233586348c7fb Mon Sep 17 00:00:00 2001
From: q66 <daniel@octaforge.org>
Date: Sun, 10 Nov 2019 17:46:29 +0100
Subject: [PATCH 13/13] cross-x86_64-linux-musl: rebuild musl with PIC

[ci skip]
---
 srcpkgs/cross-x86_64-linux-musl/template | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/cross-x86_64-linux-musl/template b/srcpkgs/cross-x86_64-linux-musl/template
index 0c83ff555d5..fbe12d98e83 100644
--- a/srcpkgs/cross-x86_64-linux-musl/template
+++ b/srcpkgs/cross-x86_64-linux-musl/template
@@ -11,7 +11,7 @@ _sysroot="/usr/${_triplet}"
 
 pkgname=cross-${_triplet}
 version=0.32
-revision=2
+revision=3
 archs="i686* x86_64 ppc64le"
 short_desc="Cross toolchain for x86_64 with musl"
 maintainer="Orphaned <orphan@voidlinux.org>"
@@ -152,7 +152,7 @@ _musl_build() {
 	cd ${wrksrc}/musl-${_musl_version}
 	msg_normal "Building cross musl libc\n"
 
-	CC="${_triplet}-gcc" CFLAGS="-Os -pipe ${_archflags}" \
+	CC="${_triplet}-gcc" CFLAGS="-Os -pipe -fPIC ${_archflags}" \
 		./configure --prefix=/usr
 
 	make ${makejobs}

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [PR PATCH] [Merged]: cross-*-musl*: rebuild musl with PIC
  2019-11-10 16:49 [PR PATCH] cross-*-musl*: rebuild musl with PIC voidlinux-github
@ 2019-11-11 10:33 ` " voidlinux-github
  0 siblings, 0 replies; 2+ messages in thread
From: voidlinux-github @ 2019-11-11 10:33 UTC (permalink / raw)
  To: ml

[-- Attachment #1: Type: text/plain, Size: 523 bytes --]

There's a merged pull request on the void-packages repository

cross-*-musl*: rebuild musl with PIC
https://github.com/void-linux/void-packages/pull/16325

Description:
This is necessary because if musl is not built with PIC in the environment, things that need to link as static PIE when cross compiling will not build (notably https://github.com/void-linux/void-packages/pull/16320). The target musl is okay because the "final" gcc is built with `--enable-default-pie` but the cross musl is built with the bootstrap gcc.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-10 16:49 [PR PATCH] cross-*-musl*: rebuild musl with PIC voidlinux-github
2019-11-11 10:33 ` [PR PATCH] [Merged]: " voidlinux-github

Github messages for voidlinux

Archives are clonable: git clone --mirror http://inbox.vuxu.org/voidlinux-github

Example config snippet for mirrors

Newsgroup available over NNTP:
	nntp://inbox.vuxu.org/vuxu.github.voidlinux


AGPL code for this site: git clone https://public-inbox.org/public-inbox.git