Merge pull request #61726 from samueldr/refind-aarch64

refind: allows building for aarch64
This commit is contained in:
Samuel Dionne-Riel 2019-06-04 22:09:08 -04:00 committed by GitHub
commit f6e1664e7d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 1 deletions

View file

@ -0,0 +1,27 @@
diff --git a/Make.common b/Make.common
index 3f0b919..ee365f5 100644
--- a/Make.common
+++ b/Make.common
@@ -33,22 +33,6 @@ ARCH ?= $(HOSTARCH)
# 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
ifeq ($(MAKEWITH),TIANO)
# Below file defines TARGET (RELEASE or DEBUG) and TOOL_CHAIN_TAG (GCC44, GCC45, GCC46, or GCC47)

View file

@ -4,6 +4,7 @@ let
archids = {
"x86_64-linux" = { hostarch = "x86_64"; efiPlatform = "x64"; };
"i686-linux" = rec { hostarch = "ia32"; efiPlatform = hostarch; };
"aarch64-linux" = rec { hostarch = "aarch64"; efiPlatform = "aa64"; };
};
inherit
@ -21,6 +22,10 @@ stdenv.mkDerivation rec {
sha256 = "1bjd0dl77bc5k6g3kc7s8m57vpbg2zscph9qh84xll9rc10g3fir";
};
patches = [
./0001-toolchain.patch
];
buildInputs = [ gnu-efi ];
hardeningDisable = [ "stackprotector" ];
@ -32,6 +37,7 @@ stdenv.mkDerivation rec {
"GNUEFILIB=${gnu-efi}/lib"
"EFICRT0=${gnu-efi}/lib"
"HOSTARCH=${hostarch}"
"ARCH=${hostarch}"
];
buildFlags = [ "gnuefi" "fs_gnuefi" ];
@ -116,7 +122,7 @@ stdenv.mkDerivation rec {
'';
homepage = http://refind.sourceforge.net/;
maintainers = [ maintainers.AndersonTorres ];
platforms = [ "i686-linux" "x86_64-linux" ];
platforms = [ "i686-linux" "x86_64-linux" "aarch64-linux" ];
license = licenses.gpl3Plus;
};