[OpenBIOS] powerpc64-elf (was: starting)

Andreas Färber andreas.faerber at web.de
Mon Oct 4 00:36:08 CEST 2010

Am 03.10.2010 um 16:07 schrieb Blue Swirl:

> In theory, adding powerpc64-elf support to GCC should be a matter of
> adding a target Makefile fragment (t-elf64) to gcc/config/rs6000,
> maybe some other small changes.

Here's what I tried so far based on the 4.4 branch and t-linux64:

diff --git a/gcc/config.gcc b/gcc/config.gcc
index 6f72224..794655a 100644
--- a/gcc/config.gcc
+++ b/gcc/config.gcc
@@ -1816,6 +1816,14 @@ powerpc-*-elf*)
         extra_options="${extra_options} rs6000/sysv4.opt"
         tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t- 
ppcgas rs6000/t-ppccomm"
+       tm_file="${tm_file} dbxelf.h elfos.h usegas.h svr4.h freebsd- 
spec.h rs6000/sysv4.h"
+       test x$with_cpu != x || cpu_is_64bit=yes
+       test x$cpu_is_64bit != xyes || tm_file="${tm_file} rs6000/ 
+       tm_file="rs6000/biarch64.h ${tm_file}"
+       extra_options="${extra_options} rs6000/sysv4.opt"
+       tmake_file="rs6000/t-fprules rs6000/t-fprules-fpbit rs6000/t- 
ppcgas rs6000/t-ppccomm rs6000/t-elf64"
+       ;;
         tm_file="${tm_file} dbxelf.h elfos.h svr4.h freebsd-spec.h  
rs6000/sysv4.h rs6000/eabi.h rs6000/e500.h rs6000/eabialtivec.h"
         extra_options="${extra_options} rs6000/sysv4.opt"
diff --git a/gcc/config/rs6000/t-elf64 b/gcc/config/rs6000/t-elf64
new file mode 100644
index 0000000..b95a291
--- /dev/null
+++ b/gcc/config/rs6000/t-elf64
@@ -0,0 +1,26 @@
+LIB2FUNCS_EXTRA += tramp.S $(srcdir)/config/rs6000/ppc64-fp.c \
+       $(srcdir)/config/rs6000/darwin-ldouble.c
+TARGET_LIBGCC2_CFLAGS += -mno-minimal-toc
+# On Debian, Ubuntu and other derivative distributions, the 32bit  
+# are found in /lib32 and /usr/lib32, /lib64 and /usr/lib64 are  
symlinks to
+# /lib and /usr/lib, while other distributions install libraries  
into /lib64
+# and /usr/lib64.  The LSB does not enforce the use of /lib64 and / 
+# it doesn't tell anything about the 32bit libraries on those  
systems.  Set
+# MULTILIB_OSDIRNAMES according to what is found on the target.
+MULTILIB_OPTIONS        = m64/m32 msoft-float
+MULTILIB_DIRNAMES       = 64 32 nof
+MULTILIB_EXTRA_OPTS     = fPIC mstrict-align
+MULTILIB_EXCEPTIONS     = m64/msoft-float
+MULTILIB_EXCLUSIONS     = m64/!m32/msoft-float
+MULTILIB_OSDIRNAMES    = ../lib64 ../lib nof
+softfp_wrap_start := '\#ifndef __powerpc64__'
+softfp_wrap_end := '\#endif'


Configuring in powerpc64-elf/libgcc
configure: creating cache ./config.cache
checking for --enable-version-specific-runtime-libs... no
checking for a BSD-compatible install... /usr/bin/install -c
checking for gawk... no
checking for mawk... no
checking for nawk... no
checking for awk... awk
checking build system type... powerpc-apple-darwin9.8.0
checking host system type... powerpc64-unknown-elf
checking for powerpc64-elf-ar... /Users/andreas/QEMU/OpenBIOS/bin/ 
checking for powerpc64-elf-lipo... powerpc64-elf-lipo
checking for powerpc64-elf-nm... /Users/andreas/QEMU/OpenBIOS/gcc- 
checking for powerpc64-elf-ranlib... /Users/andreas/QEMU/OpenBIOS/bin/ 
checking for powerpc64-elf-strip... /Users/andreas/QEMU/OpenBIOS/bin/ 
checking whether ln -s works... yes
checking for powerpc64-elf-gcc... /Users/andreas/QEMU/OpenBIOS/gcc- 
ppc64/./gcc/xgcc -B/Users/andreas/QEMU/OpenBIOS/gcc-ppc64/./gcc/ -B/ 
Users/andreas/QEMU/OpenBIOS/bin/powerpc64-elf/bin/ -B/Users/andreas/ 
QEMU/OpenBIOS/bin/powerpc64-elf/lib/ -isystem /Users/andreas/QEMU/ 
OpenBIOS/bin/powerpc64-elf/include -isystem /Users/andreas/QEMU/ 
checking for suffix of object files... configure: error: in `/Users/ 
configure: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make: *** [all] Error 2


More information about the OpenBIOS mailing list