aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin/cc
diff options
context:
space:
mode:
authorNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-07-10 02:29:22 +0000
committerNathan Whitehorn <nwhitehorn@FreeBSD.org>2010-07-10 02:29:22 +0000
commit2cf64c8006d7b7c6b122b7a492086a8cefe0f4d4 (patch)
tree9f6c3a9c7f6dc298b58f5ddb2655b080c986678d /gnu/usr.bin/cc
parentb543e91ba5678e60f8a6b612d473365c8fa83648 (diff)
Notes
Diffstat (limited to 'gnu/usr.bin/cc')
-rw-r--r--gnu/usr.bin/cc/Makefile.tgt6
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile18
-rw-r--r--gnu/usr.bin/cc/include/Makefile2
3 files changed, 22 insertions, 4 deletions
diff --git a/gnu/usr.bin/cc/Makefile.tgt b/gnu/usr.bin/cc/Makefile.tgt
index 3cb9678a0025..5e036bc14145 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 f2483137a147..87ad642870ac 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 210218ad8b4e..6b883c42151f 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