diff options
author | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-07-10 02:29:22 +0000 |
---|---|---|
committer | nwhitehorn <nwhitehorn@FreeBSD.org> | 2010-07-10 02:29:22 +0000 |
commit | 5d21d768b2c9f3601cbb00aa36a5ec22bacf93df (patch) | |
tree | 9f6c3a9c7f6dc298b58f5ddb2655b080c986678d /gnu/usr.bin/cc | |
parent | c497cd3792b4bca40349c51f22dfd4c77c77ec9f (diff) | |
download | FreeBSD-src-5d21d768b2c9f3601cbb00aa36a5ec22bacf93df.zip FreeBSD-src-5d21d768b2c9f3601cbb00aa36a5ec22bacf93df.tar.gz |
Teach our toolchain how to generate 64-bit PowerPC binaries. This fixes
a variety of bugs in binutils related to handling of 64-bit PPC ELF,
provides a GCC configuration for 64-bit PowerPC on FreeBSD, and
associated build systems tweaks.
Obtained from: projects/ppc64
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r-- | gnu/usr.bin/cc/Makefile.tgt | 6 | ||||
-rw-r--r-- | gnu/usr.bin/cc/cc_tools/Makefile | 18 | ||||
-rw-r--r-- | gnu/usr.bin/cc/include/Makefile | 2 |
3 files changed, 22 insertions, 4 deletions
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt index 3cb9678..5e036bc 100644 --- a/gnu/usr.bin/cc/Makefile.tgt +++ b/gnu/usr.bin/cc/Makefile.tgt @@ -4,7 +4,7 @@ TARGET_ARCH?= ${MACHINE_ARCH} .if ${TARGET_ARCH} == "amd64" GCC_CPU= i386 -.elif ${TARGET_ARCH} == "powerpc" +.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" GCC_CPU= rs6000 .elif ${TARGET_ARCH} == "sparc64" GCC_CPU= sparc @@ -18,3 +18,7 @@ TARGET_CPU_DEFAULT= MASK_GNU_AS|MASK_GNU_LD .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif +.if ${TARGET_ARCH} == "powerpc64" +TARGET_CPU_DEFAULT= \"powerpc64\" +.endif + diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile index f248313..87ad642 100644 --- a/gnu/usr.bin/cc/cc_tools/Makefile +++ b/gnu/usr.bin/cc/cc_tools/Makefile @@ -52,6 +52,10 @@ TARGET_INC+= ${GCC_CPU}/elf.h .if ${TARGET_ARCH} == "arm" TARGET_INC+= ${GCC_CPU}/aout.h .endif +.if ${TARGET_ARCH} == "powerpc64" +TARGET_INC+= ${GCC_CPU}/biarch64.h +TARGET_INC+= ${GCC_CPU}/default64.h +.endif TARGET_INC+= ${GCC_CPU}/freebsd.h .if ${TARGET_ARCH} == "amd64" TARGET_INC+= ${GCC_CPU}/freebsd64.h @@ -171,7 +175,7 @@ OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.opt OPT_FILES+= ${.CURDIR}/${GCC_CPU}-freebsd.opt .endif -.if ${TARGET_ARCH} == "powerpc" +.if ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" OPT_FILES+= ${GCCDIR}/config/${GCC_CPU}/sysv4.opt .endif @@ -303,12 +307,22 @@ GENSRCS+= gcov-iov.h # Multilib config file multilib.h: +.if ${TARGET_ARCH} == "powerpc64" + echo 'static const char *const multilib_raw[] = { \ + ". !m64 !m32;", \ + "64:../lib m64 !m32;", \ + "32:../lib32 !m64 m32;", NULL };' > ${.TARGET} + echo 'static const char *multilib_options = "m64/m32";' >> ${.TARGET} + echo 'static const char *const multilib_matches_raw[] = { \ + "m64 m64;", "m32 m32;", NULL };' >> ${.TARGET} +.else echo 'static const char *const multilib_raw[] = { \ ". ;", NULL };' > ${.TARGET} + echo 'static const char *multilib_options = "";' >> ${.TARGET} echo 'static const char *const multilib_matches_raw[] = { \ NULL };' >> ${.TARGET} +.endif echo 'static const char *multilib_extra = "";' >> ${.TARGET} - echo 'static const char *multilib_options = "";' >> ${.TARGET} echo 'static const char *const multilib_exclusions_raw[] = { \ NULL };' >> ${.TARGET} diff --git a/gnu/usr.bin/cc/include/Makefile b/gnu/usr.bin/cc/include/Makefile index 210218a..6b883c4 100644 --- a/gnu/usr.bin/cc/include/Makefile +++ b/gnu/usr.bin/cc/include/Makefile @@ -12,7 +12,7 @@ INCS= emmintrin.h mmintrin.h pmmintrin.h xmmintrin.h mm_malloc.h INCS= ia64intrin.h .elif ${TARGET_ARCH} == "arm" INCS= mmintrin.h -.elif ${TARGET_ARCH} == "powerpc" +.elif ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpc64" INCS= ppc-asm.h altivec.h spe.h .endif |