Github messages for voidlinux
 help / color / mirror / Atom feed
* [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64
@ 2020-09-22 21:27 pullmoll
  2020-09-22 22:29 ` [PR REVIEW] " q66
                   ` (8 more replies)
  0 siblings, 9 replies; 10+ messages in thread
From: pullmoll @ 2020-09-22 21:27 UTC (permalink / raw)
  To: ml

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

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

https://github.com/pullmoll/void-packages yaboot
https://github.com/void-linux/void-packages/pull/25038

yaboot: fix build w/ gcc10 and host i686/x86_64
The -fcommon is required for gcc10 to build yaboot.
Adding --build=$XBPS_TRIPLET seems to be a good idea in any case
according to the autoconf manual, see the document at:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html

Still gives an error for me trying to build for ppc-musl using any
x86 host environment, be it glibc or musl libc.

More patches required or something else may be wrong?

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yaboot-25038.patch --]
[-- Type: text/x-diff, Size: 3235 bytes --]

From b17c0f79ecf1caa2a4a0bead408b6ec32adff120 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Tue, 22 Sep 2020 23:20:57 +0200
Subject: [PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64

The -fcommon is required for gcc10 to build yaboot.
Adding --build=$XBPS_TRIPLET seems to be a good idea in any case
according to the autoconf manual, see the document at:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html

Still gives an error for me trying to build for ppc-musl using any
x86 host environment, be it glibc or musl libc.

More patches required or something else may be wrong?
---
 srcpkgs/yaboot/patches/0003-build-system.patch | 6 ++++--
 srcpkgs/yaboot/template                        | 8 +++++++-
 2 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/srcpkgs/yaboot/patches/0003-build-system.patch b/srcpkgs/yaboot/patches/0003-build-system.patch
index 8fdf419f187..6dcd018b34c 100644
--- a/srcpkgs/yaboot/patches/0003-build-system.patch
+++ b/srcpkgs/yaboot/patches/0003-build-system.patch
@@ -22,7 +22,7 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  # command used to get root (needed for tarball creation)
  GETROOT = fakeroot
  
-@@ -32,14 +32,17 @@ LD		:= $(CROSS)ld
+@@ -32,14 +32,18 @@ LD		:= $(CROSS)ld
  AS		:= $(CROSS)as
  OBJCOPY		:= $(CROSS)objcopy
  
@@ -39,10 +39,11 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
 -YBCFLAGS += -Werror -fdiagnostics-show-option
 +YBCFLAGS += -fgnu89-inline -fno-builtin-malloc -fno-stack-protector -no-pie
++YBCFLAGS += -fcommon
  YBCFLAGS += -I ./include
  YBCFLAGS += -fno-strict-aliasing
  
-@@ -69,12 +72,12 @@ LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
+@@ -69,12 +72,13 @@ LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
  
  # Libraries
  #
@@ -54,6 +55,7 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include
 -UCFLAGS += -Werror -fdiagnostics-show-option
 +UCFLAGS += -fdiagnostics-show-option
++UCFLAGS += -fcommon
  
  # For compiling build-tools that run on the host.
  #
diff --git a/srcpkgs/yaboot/template b/srcpkgs/yaboot/template
index bab154d8c93..c6105d3269d 100644
--- a/srcpkgs/yaboot/template
+++ b/srcpkgs/yaboot/template
@@ -23,7 +23,12 @@ nostrip_files=yaboot
 # We need to compile yaboot binary itself, as well as e2fsprogs libraries,
 # using a 32-bit ppc compiler; 64-bit with -m32 won't do because of libgcc etc.
 case "$XBPS_TARGET_MACHINE" in
-	ppc64*) _need_cross=powerpc-linux-musl ;;
+	ppc64*) if [ "$XBPS_LIBC" = "musl" ]; then
+			_need_cross="powerpc-linux-musl"
+		else
+			_need_cross="powerpc-linux-gnu"
+		fi
+	;;
 esac
 
 if [ -n "$_need_cross" ]; then
@@ -59,6 +64,7 @@ _build_e2fsprogs() {
 		if [ -n "$_need_cross" -o -n "$CROSS_BUILD" ]; then
 			# using a crosscompiler, set up configure/compiler for that
 			_args+=" --host=${_need_cross:-$XBPS_CROSS_TRIPLET}"
+			_args+=" --build=$XBPS_TRIPLET"
 			_ecc="${_need_cross:-$XBPS_CROSS_TRIPLET}-gcc"
 			_ear="${_need_cross:-$XBPS_CROSS_TRIPLET}-ar"
 		fi

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

* Re: [PR REVIEW] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
@ 2020-09-22 22:29 ` q66
  2020-09-23 11:11 ` q66
                   ` (7 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: q66 @ 2020-09-22 22:29 UTC (permalink / raw)
  To: ml

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

New review comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#discussion_r493069213

Comment:
why?

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

* Re: [PR REVIEW] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
  2020-09-22 22:29 ` [PR REVIEW] " q66
@ 2020-09-23 11:11 ` q66
  2020-09-23 11:28 ` pullmoll
                   ` (6 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: q66 @ 2020-09-23 11:11 UTC (permalink / raw)
  To: ml

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

New review comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#discussion_r493461492

Comment:
that just means you should update config.sub/guess, not this

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

* Re: [PR REVIEW] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
  2020-09-22 22:29 ` [PR REVIEW] " q66
  2020-09-23 11:11 ` q66
@ 2020-09-23 11:28 ` pullmoll
  2020-09-23 11:43 ` [PR PATCH] [Updated] " pullmoll
                   ` (5 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pullmoll @ 2020-09-23 11:28 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#discussion_r493476643

Comment:
Latest config.{guess,sub} from http://git.savannah.gnu.org/cgit/config.git/tree/ do not solve this.


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

* Re: [PR PATCH] [Updated] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (2 preceding siblings ...)
  2020-09-23 11:28 ` pullmoll
@ 2020-09-23 11:43 ` pullmoll
  2020-09-23 12:45 ` [PR REVIEW] " q66
                   ` (4 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pullmoll @ 2020-09-23 11:43 UTC (permalink / raw)
  To: ml

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

There is an updated pull request by pullmoll against master on the void-packages repository

https://github.com/pullmoll/void-packages yaboot
https://github.com/void-linux/void-packages/pull/25038

yaboot: fix build w/ gcc10 and host i686/x86_64
The -fcommon is required for gcc10 to build yaboot.
Adding --build=$XBPS_TRIPLET seems to be a good idea in any case
according to the autoconf manual, see the document at:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html

Still gives an error for me trying to build for ppc-musl using any
x86 host environment, be it glibc or musl libc.

More patches required or something else may be wrong?

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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-yaboot-25038.patch --]
[-- Type: text/x-diff, Size: 2777 bytes --]

From 578dd8610f858f25fe66bb4e73f1205bc1cf1eeb Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=BCrgen=20Buchm=C3=BCller?= <pullmoll@t-online.de>
Date: Tue, 22 Sep 2020 23:20:57 +0200
Subject: [PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64

The -fcommon is required for gcc10 to build yaboot.
Adding --build=$XBPS_TRIPLET seems to be a good idea in any case
according to the autoconf manual, see the document at:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html

Still gives an error for me trying to build for ppc-musl using any
x86 host environment, be it glibc or musl libc.

More patches required or something else may be wrong?
---
 srcpkgs/yaboot/patches/0003-build-system.patch | 6 ++++--
 srcpkgs/yaboot/template                        | 1 +
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/srcpkgs/yaboot/patches/0003-build-system.patch b/srcpkgs/yaboot/patches/0003-build-system.patch
index 8fdf419f187..6dcd018b34c 100644
--- a/srcpkgs/yaboot/patches/0003-build-system.patch
+++ b/srcpkgs/yaboot/patches/0003-build-system.patch
@@ -22,7 +22,7 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  # command used to get root (needed for tarball creation)
  GETROOT = fakeroot
  
-@@ -32,14 +32,17 @@ LD		:= $(CROSS)ld
+@@ -32,14 +32,18 @@ LD		:= $(CROSS)ld
  AS		:= $(CROSS)as
  OBJCOPY		:= $(CROSS)objcopy
  
@@ -39,10 +39,11 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  YBCFLAGS += -DKERNELADDR=$(KERNELADDR)
 -YBCFLAGS += -Werror -fdiagnostics-show-option
 +YBCFLAGS += -fgnu89-inline -fno-builtin-malloc -fno-stack-protector -no-pie
++YBCFLAGS += -fcommon
  YBCFLAGS += -I ./include
  YBCFLAGS += -fno-strict-aliasing
  
-@@ -69,12 +72,12 @@ LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
+@@ -69,12 +72,13 @@ LFLAGS = -Ttext $(TEXTADDR) -Bstatic -melf32ppclinux
  
  # Libraries
  #
@@ -54,6 +55,7 @@ Also do not strip the binaries upon install, xbps-src will take care of that.
  UCFLAGS = -Os $(CFLAGS) -Wall -I/usr/include
 -UCFLAGS += -Werror -fdiagnostics-show-option
 +UCFLAGS += -fdiagnostics-show-option
++UCFLAGS += -fcommon
  
  # For compiling build-tools that run on the host.
  #
diff --git a/srcpkgs/yaboot/template b/srcpkgs/yaboot/template
index bab154d8c93..3b865a1f693 100644
--- a/srcpkgs/yaboot/template
+++ b/srcpkgs/yaboot/template
@@ -59,6 +59,7 @@ _build_e2fsprogs() {
 		if [ -n "$_need_cross" -o -n "$CROSS_BUILD" ]; then
 			# using a crosscompiler, set up configure/compiler for that
 			_args+=" --host=${_need_cross:-$XBPS_CROSS_TRIPLET}"
+			_args+=" --build=$XBPS_TRIPLET"
 			_ecc="${_need_cross:-$XBPS_CROSS_TRIPLET}-gcc"
 			_ear="${_need_cross:-$XBPS_CROSS_TRIPLET}-ar"
 		fi

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

* Re: [PR REVIEW] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (3 preceding siblings ...)
  2020-09-23 11:43 ` [PR PATCH] [Updated] " pullmoll
@ 2020-09-23 12:45 ` q66
  2020-09-23 14:52 ` pullmoll
                   ` (3 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: q66 @ 2020-09-23 12:45 UTC (permalink / raw)
  To: ml

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

New review comment by q66 on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#discussion_r493546423

Comment:
i'll look at it later, but this is definitely not a proper fix, there's some other issue here

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

* Re: [PR REVIEW] yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (4 preceding siblings ...)
  2020-09-23 12:45 ` [PR REVIEW] " q66
@ 2020-09-23 14:52 ` pullmoll
  2021-01-29  2:54 ` ericonr
                   ` (2 subsequent siblings)
  8 siblings, 0 replies; 10+ messages in thread
From: pullmoll @ 2020-09-23 14:52 UTC (permalink / raw)
  To: ml

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

New review comment by pullmoll on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#discussion_r493658173

Comment:
Removed that hack for now and left just the `-fcommon` addition to `{YB,U}CFLAGS`.

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

* Re: yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (5 preceding siblings ...)
  2020-09-23 14:52 ` pullmoll
@ 2021-01-29  2:54 ` ericonr
  2022-04-19  2:12 ` github-actions
  2022-04-19 11:19 ` [PR PATCH] [Merged]: " q66
  8 siblings, 0 replies; 10+ messages in thread
From: ericonr @ 2021-01-29  2:54 UTC (permalink / raw)
  To: ml

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

New comment by ericonr on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#issuecomment-769539416

Comment:
Ping @q66 and @pullmoll 

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

* Re: yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (6 preceding siblings ...)
  2021-01-29  2:54 ` ericonr
@ 2022-04-19  2:12 ` github-actions
  2022-04-19 11:19 ` [PR PATCH] [Merged]: " q66
  8 siblings, 0 replies; 10+ messages in thread
From: github-actions @ 2022-04-19  2:12 UTC (permalink / raw)
  To: ml

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

New comment by github-actions[bot] on void-packages repository

https://github.com/void-linux/void-packages/pull/25038#issuecomment-1101923688

Comment:
Pull Requests become stale 90 days after last activity and are closed 14 days after that.  If this pull request is still relevant bump it or assign it.

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

* Re: [PR PATCH] [Merged]: yaboot: fix build w/ gcc10 and host i686/x86_64
  2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
                   ` (7 preceding siblings ...)
  2022-04-19  2:12 ` github-actions
@ 2022-04-19 11:19 ` q66
  8 siblings, 0 replies; 10+ messages in thread
From: q66 @ 2022-04-19 11:19 UTC (permalink / raw)
  To: ml

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

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

yaboot: fix build w/ gcc10 and host i686/x86_64
https://github.com/void-linux/void-packages/pull/25038

Description:
The -fcommon is required for gcc10 to build yaboot.
Adding --build=$XBPS_TRIPLET seems to be a good idea in any case
according to the autoconf manual, see the document at:
https://www.gnu.org/software/autoconf/manual/autoconf-2.69/html_node/Hosts-and-Cross_002dCompilation.html

Still gives an error for me trying to build for ppc-musl using any
x86 host environment, be it glibc or musl libc.

More patches required or something else may be wrong?

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

end of thread, other threads:[~2022-04-19 11:19 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-09-22 21:27 [PR PATCH] yaboot: fix build w/ gcc10 and host i686/x86_64 pullmoll
2020-09-22 22:29 ` [PR REVIEW] " q66
2020-09-23 11:11 ` q66
2020-09-23 11:28 ` pullmoll
2020-09-23 11:43 ` [PR PATCH] [Updated] " pullmoll
2020-09-23 12:45 ` [PR REVIEW] " q66
2020-09-23 14:52 ` pullmoll
2021-01-29  2:54 ` ericonr
2022-04-19  2:12 ` github-actions
2022-04-19 11:19 ` [PR PATCH] [Merged]: " q66

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).