Github messages for voidlinux
 help / color / mirror / Atom feed
From: slymattz <slymattz@users.noreply.github.com>
To: ml@inbox.vuxu.org
Subject: Re: binutils update breaks refind
Date: Thu, 07 Mar 2024 16:58:57 +0100	[thread overview]
Message-ID: <20240307155857.ABCCA2887C@inbox.vuxu.org> (raw)
In-Reply-To: <gh-mailinglist-notifications-41a7ca26-5023-4802-975b-f1789d68868e-void-packages-49170@inbox.vuxu.org>

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

New comment by slymattz on void-packages repository

https://github.com/void-linux/void-packages/issues/49170#issuecomment-1983830948

Comment:
For me, the below patch works (I combined https://github.com/void-linux/void-packages/blob/master/srcpkgs/refind/patches/add-cross-compile-support.patch and your proposed changes)

fix_aarch64.patch
```
--- a/Make.common
+++ b/Make.common
@@ -40,21 +40,13 @@
 # Note: TIANOBASE is defined in master Makefile and exported
 GENFW           = $(TIANOBASE)/BaseTools/Source/C/bin/GenFw
 prefix          = /usr/bin/
-ifeq ($(ARCH),aarch64)
-  CC            = $(prefix)aarch64-linux-gnu-gcc
-  AS            = $(prefix)aarch64-linux-gnu-as
-  LD            = $(prefix)aarch64-linux-gnu-ld
-  AR            = $(prefix)aarch64-linux-gnu-ar
-  RANLIB        = $(prefix)aarch64-linux-gnu-ranlib
-  OBJCOPY       = $(prefix)aarch64-linux-gnu-objcopy
-else
-  CC            = $(prefix)gcc
-  AS            = $(prefix)as
-  LD            = $(prefix)ld
-  AR            = $(prefix)ar
-  RANLIB        = $(prefix)ranlib
-  OBJCOPY       = $(prefix)objcopy
-endif
+
+CC            = $(prefix)$(CROSS_COMPILE)gcc
+AS            = $(prefix)$(CROSS_COMPILE)as
+LD            = $(prefix)$(CROSS_COMPILE)ld
+AR            = $(prefix)$(CROSS_COMPILE)ar
+RANLIB        = $(prefix)$(CROSS_COMPILE)ranlib
+OBJCOPY       = $(prefix)$(CROSS_COMPILE)objcopy
 
 ifeq ($(MAKEWITH),TIANO)
 # Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)
@@ -148,8 +140,8 @@
 
 ifeq ($(ARCH), aarch64)
   GNUEFI_CFLAGS += -DEFIAARCH64
-  FORMAT          = -O binary
-  FORMAT_DRIVER   = -O binary
+  FORMAT          = --target=efi-app-aarch64
+  FORMAT_DRIVER   = --target=efi-app-aarch64
   SUBSYSTEM_LDFLAG = -defsym=EFI_SUBSYSTEM=0xa
   LDFLAGS         += --warn-common --no-undefined --fatal-warnings
 
```

 It builds on my system. However, I have no way of checking whether it works natively.

  parent reply	other threads:[~2024-03-07 15:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-07 12:34 [ISSUE] rEFInd won't cross-compile for aarch64 (glibc and musl) slymattz
2024-03-07 14:43 ` sgn
2024-03-07 14:48 ` binutils update breaks refind sgn
2024-03-07 14:51 ` sgn
2024-03-07 14:55 ` sgn
2024-03-07 14:57 ` sgn
2024-03-07 15:58 ` slymattz [this message]
2024-03-08 12:07 ` slymattz
2024-03-11 11:23 ` slymattz

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=20240307155857.ABCCA2887C@inbox.vuxu.org \
    --to=slymattz@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).