
Hello Wolfgang,
with powerpc64-linux-gnu-gcc, version 9.2.1, big endian I see the errors below when compiling P2041RDB_defconfig.
post/drivers/memory.c:268: undefined reference to `_restgpr_25_x' powerpc64-linux-gnu-ld.bfd: post/built-in.o: in function `memory_post_test_lines': post/drivers/memory.c:408: undefined reference to `_restgpr_31_x' powerpc64-linux-gnu-ld.bfd: post/built-in.o: in function `memory_post_test_patterns': post/drivers/memory.c:436: undefined reference to `_restgpr_29_x' powerpc64-linux-gnu-ld.bfd: post/built-in.o: in function `memory_post_test_regions': post/drivers/memory.c:453: undefined reference to `_restgpr_29_x' powerpc64-linux-gnu-ld.bfd: post/built-in.o: in function `memory_post_test': post/drivers/memory.c:540: undefined reference to `_restgpr_26_x' make: *** [Makefile:1671: u-boot] Error
On Debian Buster I issued the following commands:
make P2041RDB_defconfig sudo apt-get install gcc-powerpc64-linux-gnu export CROSS_COMPILE=powerpc64-linux-gnu- make
I needed the following changes to be able to compile at all:
diff --git a/Makefile b/Makefile index 0766f78dcb..71f98a2615 100644 --- a/Makefile +++ b/Makefile @@ -412,7 +412,7 @@ CHECKFLAGS := -D__linux__ -Dlinux -D__STDC__ -Dunix -D__unix__ \
KBUILD_CPPFLAGS := -D__KERNEL__ -D__UBOOT__
-KBUILD_CFLAGS := -Wall -Wstrict-prototypes \ +KBUILD_CFLAGS := -Wall -Wstrict-prototypes -Wno-error=address-of-packed-member \ -Wno-format-security \ -fno-builtin -ffreestanding $(CSTD_FLAG) KBUILD_CFLAGS += -fshort-wchar -fno-strict-aliasing diff --git a/examples/Makefile b/examples/Makefile index d440bc5655..825954c185 100644 --- a/examples/Makefile +++ b/examples/Makefile @@ -6,6 +6,6 @@ ifdef FTRACE subdir-ccflags-y += -finstrument-functions -DFTRACE endif
-subdir-y += standalone +#subdir-y += standalone subdir-$(CONFIG_API) += api endif
Best regards
Heinrich