grub-efi-native: workaround for fedora 29
v2 cover grub-efi-native: workaround for fedora 29
From: Kai Kang <[email protected]>
v2:
* update comment in workaround-for-as-from-binutils-2.31.patch
The following changes since commit fef47bd915f6a3960e512b5aba8b461b77a9ea78:
linux-yocto-4.14: Drop bbappend (2018-12-18 16:20:10 +0000)
are available in the Git repository at:
git://git.pokylinux.org/poky-contrib kangkai/grub-efi-native-fedora29
http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=kangkai/grub-efi-native-fedora29
Kai Kang (1):
grub-efi-native: workaround for fedora 29
...workaround-for-as-from-binutils-2.31.patch | 43 +++++++++++++++++++ meta/recipes-bsp/grub/grub-efi_2.02.bb | 2 + 2 files changed, 45 insertions(+) create mode 100644 meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
Signature · 1 line
2.19.0.rc2
PATCH v2 1/1 grub-efi-native: workaround for fedora 29
From: Kai Kang <[email protected]>
grub-efi-native fails to run do_configure on Fedora 29 host:
| checking for options to compile assembly... | Assembler messages: | Fatal error: The input and output files must be distinct
because the host 'as' in binutils-3.31 breaks if using two filesystems. See:
https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;a=commit;h=2a50366
Work-around this issue by forcing the configure time assembler check to use a temp file in the src dir.
--- ...workaround-for-as-from-binutils-2.31.patch | 43 +++++++++++++++++++ meta/recipes-bsp/grub/grub-efi_2.02.bb | 2 + 2 files changed, 45 insertions(+) create mode 100644 meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch
meta/recipes-bsp/grub/files/workaround-for-as-from-binutils-2.31.patch new file +43 -0
@@ -0,0 +1,43 @@ +When /dev and $srcdir are not in a same file system, it may trigger a flaw of +binutils 2.31 and cause grub-efi-native configure error: + +| checking for options to compile assembly... +| Assembler messages: +| Fatal error: The input and output files must be distinct + +Replace /dev/null with a temporary file during assemble check to avoid such +failure. + +This is a workaround for binutils 2.31. When it is fixed on Fedora 29, this +patch could be removed. + +Ref: +https://bugzilla.redhat.com/show_bug.cgi?id=1660279 + +Upstream-Status: Inappropriate [native] + +Signed-off-by: Kai Kang <[email protected]> + +diff --git a/configure.ac b/configure.ac +index 44a67a7..6eb28fe 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -696,8 +696,9 @@ if test x"$test_program" = x ; then + grub_cv_cc_target_asm_compile= + else + found=no ++ tmpfile="$(mktemp $srcdir/asm-tests/XXXXXX)" + for arg in "" "-no-integrated-as"; do +- cmdline="$TARGET_CC -c -o /dev/null $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S" ++ cmdline="$TARGET_CC -c -o $tmpfile $TARGET_CCASFLAGS $arg $TARGET_CPPFLAGS $srcdir/asm-tests/$test_program.S" + echo "Running $cmdline" >&AS_MESSAGE_LOG_FD + if $cmdline >&AS_MESSAGE_LOG_FD 2>&AS_MESSAGE_LOG_FD; then + grub_cv_cc_target_asm_compile="$arg" +@@ -705,6 +706,7 @@ else + break + fi + done ++ rm -f $tmpfile + if test x"$found" = xno ; then + AC_MSG_ERROR([could not compile assembly]) + fi
meta/recipes-bsp/grub/grub-efi_2.02.bb +2 -0
@@ -9,6 +9,8 @@ SRC_URI += " \ file://cfg \ " +SRC_URI_append_class-native = " file://workaround-for-as-from-binutils-2.31.patch" + S = "${WORKDIR}/grub-${PV}" # Determine the target arch for the grub modules
Signature · 1 line
2.19.0.rc2