Github messages for voidlinux
 help / color / mirror / Atom feed
From: sgn <sgn@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: [PR PATCH] [Updated] build grub-x86_64-efi for i686
Date: Mon, 18 Jan 2021 14:25:42 +0100	[thread overview]
Message-ID: <20210118132542.brAvajnBV_c8QxTGiYTx0ac3_0Fi43B1vMALPkYF5CE@z> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-26895@inbox.vuxu.org>

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

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

https://github.com/sgn/void-packages i686-grub-x86_64-efi
https://github.com/void-linux/void-packages/pull/26895

build grub-x86_64-efi for i686


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

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: github-pr-i686-grub-x86_64-efi-26895.patch --]
[-- Type: text/x-diff, Size: 4746 bytes --]

From 334ea9e495e4742f775a41aa57afecc23c43c22a Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?=C4=90o=C3=A0n=20Tr=E1=BA=A7n=20C=C3=B4ng=20Danh?=
 <congdanhqx@gmail.com>
Date: Wed, 2 Dec 2020 19:47:39 +0700
Subject: [PATCH] grub: build grub-x86_64-efi for i686, build manpages

Close #25267
---
 srcpkgs/grub/template | 39 ++++++++++++++++++++-------------------
 1 file changed, 20 insertions(+), 19 deletions(-)

diff --git a/srcpkgs/grub/template b/srcpkgs/grub/template
index 76f9ce3f368..21321d001c9 100644
--- a/srcpkgs/grub/template
+++ b/srcpkgs/grub/template
@@ -1,8 +1,8 @@
 # Template file for 'grub'
 pkgname=grub
 version=2.04
-revision=3
-hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf"
+revision=4
+hostmakedepends="python3 pkg-config flex freetype-devel font-unifont-bdf help2man"
 makedepends="libusb-compat-devel ncurses-devel freetype-devel
  liblzma-devel device-mapper-devel fuse-devel"
 depends="os-prober"
@@ -27,10 +27,11 @@ case "$XBPS_TARGET_MACHINE" in
 		;;
 	i686*)
 		CFLAGS="-D_FILE_OFFSET_BITS=64"
+		hostmakedepends+=" cross-x86_64-linux-musl"
 		configure_args+=" ac_cv_sizeof_off_t=8"
 		_NATIVE_PLATFORM=pc
-		_SUPPLEMENTARY_BUILDS="i386-efi i386-coreboot i386-xen"
-		subpackages+=" grub-i386-efi grub-i386-coreboot grub-xen"
+		_SUPPLEMENTARY_BUILDS="i386-efi x86_64-efi i386-coreboot i386-xen"
+		subpackages+=" grub-i386-efi grub-x86_64-efi grub-i386-coreboot grub-xen"
 		;;
 	aarch64*)
 		_NATIVE_PLATFORM=efi
@@ -48,12 +49,13 @@ post_extract() {
 
 do_configure() {
 	unset CC AS LD RANLIB CPP
-	CFLAGS="$CFLAGS -fno-stack-protector"
+	local freestanding_cflags="-fno-stack-protector"
 
 	# building with altivec generates broken grub core
 	case "$XBPS_TARGET_MACHINE" in
-		ppc*) CFLAGS="$CFLAGS -mno-altivec" ;;
+		ppc*) freestanding_cflags+=" -mno-altivec" ;;
 	esac
+	CFLAGS+=" $freestanding_cflags"
 
 	configure_args+=" --enable-device-mapper --enable-cache-stats --enable-nls
 		--enable-grub-mkfont --enable-grub-mount --disable-werror
@@ -63,14 +65,11 @@ do_configure() {
 	sed -i 's|/usr/share/fonts/unifont|/usr/share/fonts/misc|' configure
 
 	# build tools
-	_configure_args=${configure_args}
-	if [ -n "${_NATIVE_PLATFORM}" ]; then
-		_configure_args="--with-platform=${_NATIVE_PLATFORM} ${_configure_args}"
-	fi
 	msg_normal "Configuring grub tools...\n"
 	mkdir $wrksrc/build
 	cd $wrksrc/build
-	../configure --host=${XBPS_TARGET_MACHINE} ${_configure_args}
+	../configure --host=${XBPS_TARGET_MACHINE} ${configure_args} \
+		${_NATIVE_PLATFORM:+--with-platform=${_NATIVE_PLATFORM}}
 
 	for _SUPP_BUILD in ${_SUPPLEMENTARY_BUILDS}; do
 		_TARGET=${_SUPP_BUILD%%-*}
@@ -78,7 +77,14 @@ do_configure() {
 		msg_normal "Configuring ${_TARGET} ${_PLATFORM} grub...\n"
 		mkdir $wrksrc/${_PLATFORM}_${_TARGET}_build
 		cd $wrksrc/${_PLATFORM}_${_TARGET}_build
-		../configure --host=${XBPS_TARGET_MACHINE} --target=${_TARGET} --with-platform=${_PLATFORM} ${configure_args} \
+		if [ "$_TARGET" = x86_64 ] &&
+			[ "${XBPS_TARGET_MACHINE%-musl}" = i686 ]; then
+			_TARGET=x86_64-linux-musl
+		fi
+		CFLAGS="$freestanding_cflags" \
+		../configure --host=${XBPS_TARGET_MACHINE} \
+			--target=${_TARGET} \
+			--with-platform=${_PLATFORM} ${configure_args} \
 			--disable-efiemu \
 			--libdir=/usr/lib
 	done
@@ -90,14 +96,14 @@ do_build() {
 
 	msg_normal "Building grub tools...\n"
 	cd $wrksrc/build
-	make ${makejobs} &> make.log || tail -n100 make.log
+	make ${makejobs}
 
 	for _SUPP_BUILD in ${_SUPPLEMENTARY_BUILDS}; do
 		_TARGET=${_SUPP_BUILD%%-*}
 		_PLATFORM=${_SUPP_BUILD##*-}
 		msg_normal "Building ${_TARGET} ${_PLATFORM} grub...\n"
 		cd $wrksrc/${_PLATFORM}_${_TARGET}_build
-		make ${makejobs} &> make.log || tail -n100 make.log
+		make ${makejobs}
 	done
 }
 
@@ -162,7 +168,6 @@ grub-utils_package() {
 	}
 }
 grub-x86_64-efi_package() {
-	archs=noarch
 	depends="grub>=$version dosfstools efibootmgr"
 	short_desc+=" - x86_64 EFI support"
 	pkg_install() {
@@ -170,7 +175,6 @@ grub-x86_64-efi_package() {
 	}
 }
 grub-i386-efi_package() {
-	archs=noarch
 	depends="grub>=$version dosfstools efibootmgr"
 	short_desc+=" - i386 EFI support"
 	pkg_install() {
@@ -178,7 +182,6 @@ grub-i386-efi_package() {
 	}
 }
 grub-i386-coreboot_package() {
-	archs=noarch
 	depends="grub>=$version"
 	short_desc+=" - i386 coreboot support"
 	pkg_install() {
@@ -200,7 +203,6 @@ grub-xen_package() {
 	}
 }
 grub-arm64-efi_package() {
-	archs=noarch
 	depends="grub>=$version dosfstools efibootmgr"
 	short_desc+=" - arm64 EFI support"
 	pkg_install() {
@@ -208,7 +210,6 @@ grub-arm64-efi_package() {
 	}
 }
 grub-powerpc-ieee1275_package() {
-	archs=noarch
 	depends="grub>=$version powerpc-utils"
 	short_desc+=" - powerpc Open Firmware support"
 	pkg_install() {

  parent reply	other threads:[~2021-01-18 13:25 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-03  0:37 [PR PATCH] " sgn
2020-12-03  0:48 ` ericonr
2020-12-03  0:48 ` [PR REVIEW] " ericonr
2020-12-03  0:55 ` [PR PATCH] [Updated] " sgn
2020-12-03 14:01 ` sgn
2020-12-03 15:00 ` [PR REVIEW] " sgn
2020-12-05  3:48 ` [PR PATCH] [Updated] " sgn
2020-12-05 11:30 ` sgn
2020-12-05 11:30 ` sgn
2020-12-06  4:31 ` sgn
2020-12-07  0:03 ` [PR PATCH] [Closed]: " sgn
2020-12-26  7:26 ` fosslinux
2021-01-04  2:09 ` ericonr
2021-01-04  9:33 ` fosslinux
2021-01-09  3:19 ` [PR PATCH] [Updated] " sgn
2021-01-09  3:47 ` [PR REVIEW] " q66
2021-01-09  3:50 ` q66
2021-01-09  3:51 ` q66
2021-01-09  6:02 ` [PR PATCH] [Updated] " sgn
2021-01-09  6:21 ` sgn
2021-01-09 13:56 ` [PR REVIEW] " q66
2021-01-09 15:55 ` sgn
2021-01-18 11:33 ` [PR PATCH] [Updated] " sgn
2021-01-18 12:36 ` [PR REVIEW] " q66
2021-01-18 12:39 ` q66
2021-01-18 13:25 ` sgn [this message]
2021-01-20  0:41 ` [PR PATCH] [Merged]: " q66

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210118132542.brAvajnBV_c8QxTGiYTx0ac3_0Fi43B1vMALPkYF5CE@z \
    --to=sgn@users.noreply.github.com \
    --cc=ml@inbox.vuxu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).