[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Build failure on ppc64le

From: Vladimir 'phcoder' Serbinenko
Subject: Re: Build failure on ppc64le
Date: Wed, 05 Jul 2017 23:38:30 +0000

On Tue, Jul 4, 2017, 19:48 Leif Lindholm <address@hidden> wrote:
On Sat, Jul 01, 2017 at 02:41:05PM +0200, Paul Menzel wrote:
> Dear GRUB folks,
> Building GRUB at commit 7346682 (Allow GRUB to mount ext2/3/4
> filesystems that have the encryption feature.) for the platform
> `powerpc-ieee1275` with Ubuntu 16.04.02 LTS (Xenial Xerus) on such a
> machine (ppc64le), fails with the error below.
> ```
> $ ./
> $ ./configure
> $ make
> […]
> gcc -Os -Wall -W -Wshadow -Wpointer-arith -Wundef -Wchar-subscripts -Wcomment -Wdeprecated-declarations -Wdisabled-optimization -Wdiv-by-zero -Wfloat-equal -Wformat-extra-args -Wformat-security -Wformat-y2k -Wimplicit -Wimplicit-function-declaration -Wimplicit-int -Wmain -Wmissing-braces -Wmissing-format-attribute -Wmultichar -Wparentheses -Wreturn-type -Wsequence-point -Wshadow -Wsign-compare -Wswitch -Wtrigraphs -Wunknown-pragmas -Wunused -Wunused-function -Wunused-label -Wunused-parameter -Wunused-value  -Wunused-variable -Wwrite-strings -Wnested-externs -Wstrict-prototypes -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations -Wcast-align  -Wextra -Wattributes -Wendif-labels -Winit-self -Wint-to-pointer-cast -Winvalid-pch -Wmissing-field-initializers -Wnonnull -Woverflow -Wvla -Wpointer-to-int-cast -Wstrict-aliasing -Wvariadic-macros -Wvolatile-register-var -Wpointer-sign -Wmissing-include-dirs -Wmissing-prototypes -Wmissing-declarations -Wformat=2 -mbig-endian -m32 -freg-struct-return -msoft-float -fno-dwarf2-cfi-asm -fno-asynchronous-unwind-tables -fno-unwind-tables -Qn -fno-stack-protector -Wtrampolines -Werror  -mcpu=powerpc -ffreestanding   -mbig-endian -m32 -Wl,--build-id=none  -nostdlib -Wl,-N -Wl,-Ttext,0x200000   -o kernel.exec kern/powerpc/ieee1275/kernel_exec-startup.o kern/powerpc/kernel_exec-cache.o kern/powerpc/kernel_exec-dl.o kern/powerpc/kernel_exec-compiler-rt.o disk/ieee1275/kernel_exec-ofdisk.o kern/ieee1275/kernel_exec-cmain.o kern/ieee1275/kernel_exec-ieee1275.o kern/ieee1275/kernel_exec-mmap.o kern/ieee1275/kernel_exec-openfw.o term/ieee1275/kernel_exec-console.o kern/ieee1275/kernel_exec-init.o term/kernel_exec-terminfo.o term/kernel_exec-tparm.o commands/kernel_exec-extcmd.o lib/kernel_exec-arg.o kern/kernel_exec-compiler-rt.o kern/kernel_exec-mm.o kern/kernel_exec-time.o kern/generic/kernel_exec-millisleep.o kern/kernel_exec-command.o kern/kernel_exec-corecmd.o kern/kernel_exec-device.o kern/kernel_exec-disk.o kern/kernel_exec-dl.o kern/kernel_exec-env.o kern/kernel_exec-err.o kern/kernel_exec-file.o kern/kernel_exec-fs.o kern/kernel_exec-list.o kern/kernel_exec-main.o kern/kernel_exec-misc.o kern/kernel_exec-parser.o kern/kernel_exec-partition.o kern/kernel_exec-rescue_parser.o kern/kernel_exec-rescue_reader.o kern/kernel_exec-term.o kernel_exec-symlist.o
> kernel_exec-symlist.o:(.data+0x214): undefined reference to `grub_arch_sync_dma_caches'
> collect2: error: ld returned 1 exit status
> […]
> ```

Yeah, this is related to the same change that broke arm64:

If ppc64le does not require any manual DMA cache synchronization,
you could probably just add something like:

diff --git a/include/grub/cache.h b/include/grub/cache.h
index 1c98ce270..c99316e09 100644
--- a/include/grub/cache.h
+++ b/include/grub/cache.h
@@ -34,7 +34,8 @@ void EXPORT_FUNC(grub_arch_sync_caches) (void
*address, grub_size_t len);

 -#if defined (__i386__) || defined (__x86_64__)
 +#if defined (__i386__) || defined (__x86_64__) || (defined (__PPC64__) && \
 + defined (__LITTLE_ENDIAN__))
Grub core isn't built for ppc64le but ppc. So it needs to be __ppc__. But better solution is not to attempt to export unused function
   static inline void
   grub_arch_sync_dma_caches (volatile void *address __attribute__ ((unused)),
                              grub_size_t len __attribute__ ((unused)))


Grub-devel mailing list

reply via email to

[Prev in Thread] Current Thread [Next in Thread]