Connect powerpc64 to the build. It is not presently part of make universe,

which will be added soon.

Reviewed by:	imp
This commit is contained in:
Nathan Whitehorn 2010-07-13 21:19:59 +00:00
parent d5c7b904ba
commit 8bb2397180
3 changed files with 53 additions and 26 deletions

View File

@ -128,7 +128,7 @@ TARGET= ${TARGET_ARCH}
TARGET?= ${MACHINE} TARGET?= ${MACHINE}
TARGET_ARCH?= ${MACHINE_ARCH} TARGET_ARCH?= ${MACHINE_ARCH}
KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc sparc64 sparc64/sun4v KNOWN_ARCHES?= amd64 arm i386 i386/pc98 ia64 mips powerpc powerpc64/powerpc sparc64 sparc64/sun4v
.if ${TARGET} == ${TARGET_ARCH} .if ${TARGET} == ${TARGET_ARCH}
_t= ${TARGET} _t= ${TARGET}
.else .else
@ -262,34 +262,47 @@ WMAKEENV+= NO_CTF=1
.endif .endif
WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP} WMAKE= ${WMAKEENV} ${MAKE} -f Makefile.inc1 DESTDIR=${WORLDTMP}
.if ${TARGET_ARCH} == "amd64" .if ${TARGET_ARCH} == "amd64" || ${TARGET_ARCH} == "powerpc64"
# 32 bit world # 32 bit world
LIB32TMP= ${OBJTREE}${.CURDIR}/lib32 LIB32TMP= ${OBJTREE}${.CURDIR}/lib32
.if ${TARGET_ARCH} == "amd64"
.if empty(TARGET_CPUTYPE) .if empty(TARGET_CPUTYPE)
LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2 LIB32CPUFLAGS= -march=i686 -mmmx -msse -msse2
.else .else
LIB32CPUFLAGS= -march=${TARGET_CPUTYPE} LIB32CPUFLAGS= -march=${TARGET_CPUTYPE}
.endif .endif
LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -mfancy-math-387 -DCOMPAT_32BIT \ LIB32CPUFLAGS+= -mfancy-math-387
LIB32WMAKEENV= MACHINE=i386 MACHINE_ARCH=i386 \
MACHINE_CPU="i686 mmx sse sse2" \
LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
AS="${AS} --32"
.elif ${TARGET_ARCH} == "powerpc64"
.if empty(TARGET_CPUTYPE)
LIB32CPUFLAGS= -mcpu=powerpc
.else
LIB32CPUFLAGS= -mcpu=${TARGET_CPUTYPE}
.endif
LIB32WMAKEENV= MACHINE=powerpc MACHINE_ARCH=powerpc \
LD="${LD} -m elf32ppc"
.endif
LIB32FLAGS= -m32 ${LIB32CPUFLAGS} -DCOMPAT_32BIT \
-isystem ${LIB32TMP}/usr/include/ \ -isystem ${LIB32TMP}/usr/include/ \
-L${LIB32TMP}/usr/lib32 \ -L${LIB32TMP}/usr/lib32 \
-B${LIB32TMP}/usr/lib32 -B${LIB32TMP}/usr/lib32
# Yes, the flags are redundant. # Yes, the flags are redundant.
LIB32WMAKEENV= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \ LIB32WMAKEENV+= MAKEOBJDIRPREFIX=${OBJTREE}/lib32 \
_SHLIBDIRPREFIX=${LIB32TMP} \ _SHLIBDIRPREFIX=${LIB32TMP} \
VERSION="${VERSION}" \ VERSION="${VERSION}" \
MACHINE=i386 \
MACHINE_ARCH=i386 \
MACHINE_CPU="i686 mmx sse sse2" \
INSTALL="sh ${.CURDIR}/tools/install.sh" \ INSTALL="sh ${.CURDIR}/tools/install.sh" \
PATH=${TMPPATH} \ PATH=${TMPPATH} \
CC="${CC} ${LIB32FLAGS}" \ CC="${CC} ${LIB32FLAGS}" \
CXX="${CXX} ${LIB32FLAGS}" \ CXX="${CXX} ${LIB32FLAGS}" \
OBJC="${OBJC} ${LIB32FLAGS}" \ OBJC="${OBJC} ${LIB32FLAGS}" \
LD="${LD} -m elf_i386_fbsd -Y P,${LIB32TMP}/usr/lib32" \
AS="${AS} --32" \
LIBDIR=/usr/lib32 \ LIBDIR=/usr/lib32 \
SHLIBDIR=/usr/lib32 SHLIBDIR=/usr/lib32
@ -336,7 +349,7 @@ _worldtmp:
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
.if !defined(NO_CLEAN) .if !defined(NO_CLEAN)
rm -rf ${WORLDTMP} rm -rf ${WORLDTMP}
.if ${TARGET_ARCH} == "amd64" .if defined(LIB32TMP)
rm -rf ${LIB32TMP} rm -rf ${LIB32TMP}
.endif .endif
.else .else
@ -380,7 +393,7 @@ _cleanobj:
@echo ">>> stage 2.1: cleaning up the object tree" @echo ">>> stage 2.1: cleaning up the object tree"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/} ${_+_}cd ${.CURDIR}; ${WMAKE} ${CLEANDIR:S/^/par-/}
.if ${TARGET_ARCH} == "amd64" .if defined(LIB32TMP)
${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/} ${_+_}cd ${.CURDIR}; ${LIB32WMAKE} -f Makefile.inc1 ${CLEANDIR:S/^/par-/}
.endif .endif
.endif .endif
@ -428,7 +441,7 @@ everything:
@echo ">>> stage 4.4: building everything" @echo ">>> stage 4.4: building everything"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${WMAKE} par-all ${_+_}cd ${.CURDIR}; ${WMAKE} par-all
.if ${TARGET_ARCH} == "amd64" .if defined(LIB32TMP)
build32: build32:
@echo @echo
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
@ -510,7 +523,7 @@ WMAKE_TGTS+= _cleanobj _obj _build-tools
WMAKE_TGTS+= _cross-tools WMAKE_TGTS+= _cross-tools
.endif .endif
WMAKE_TGTS+= _includes _libraries _depend everything WMAKE_TGTS+= _includes _libraries _depend everything
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" .if defined(LIB32TMP) && ${MK_LIB32} != "no"
WMAKE_TGTS+= build32 WMAKE_TGTS+= build32
.endif .endif
@ -660,7 +673,7 @@ reinstall:
@echo ">>> Installing everything" @echo ">>> Installing everything"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" .if defined(LIB32TMP) && ${MK_LIB32} != "no"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32 ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 install32
.endif .endif
@ -669,7 +682,7 @@ redistribute:
@echo ">>> Distributing everything" @echo ">>> Distributing everything"
@echo "--------------------------------------------------------------" @echo "--------------------------------------------------------------"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute
.if ${TARGET_ARCH} == "amd64" && ${MK_LIB32} != "no" .if defined(LIB32TMP) && ${MK_LIB32} != "no"
${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \ ${_+_}cd ${.CURDIR}; ${MAKE} -f Makefile.inc1 distribute32 \
DISTRIBUTION=lib32 DISTRIBUTION=lib32
.endif .endif
@ -705,8 +718,12 @@ KERNCONF=${KERNFAST}
KERNCONF= ${KERNEL} KERNCONF= ${KERNEL}
KERNWARN= KERNWARN=
.else .else
.if ${TARGET_ARCH} == "powerpc64"
KERNCONF?= GENERIC64
.else
KERNCONF?= GENERIC KERNCONF?= GENERIC
.endif .endif
.endif
INSTKERNNAME?= kernel INSTKERNNAME?= kernel
KERNSRCDIR?= ${.CURDIR}/sys KERNSRCDIR?= ${.CURDIR}/sys
@ -1108,8 +1125,12 @@ _prereq_libs= gnu/lib/libssp/libssp_nonshared gnu/lib/libgcc
# all shared libraries for ELF. # all shared libraries for ELF.
# #
_startup_libs= gnu/lib/csu _startup_libs= gnu/lib/csu
.if exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf) .if exists(${.CURDIR}/lib/csu/${MACHINE_ARCH}-elf)
_startup_libs+= lib/csu/${MACHINE_ARCH}-elf
.elif exists(${.CURDIR}/lib/csu/${MACHINE_CPUARCH}-elf)
_startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf _startup_libs+= lib/csu/${MACHINE_CPUARCH}-elf
.elif exists(${.CURDIR}/lib/csu/${MACHINE_ARCH})
_startup_libs+= lib/csu/${MACHINE_ARCH}
.else .else
_startup_libs+= lib/csu/${MACHINE_CPUARCH} _startup_libs+= lib/csu/${MACHINE_CPUARCH}
.endif .endif

View File

@ -56,7 +56,7 @@ LSUBDIRS= cam/ata cam/scsi \
LSUBSUBDIRS= dev/mpt/mpilib LSUBSUBDIRS= dev/mpt/mpilib
.if ${MACHINE_ARCH} == "powerpc" .if ${MACHINE_ARCH} == "powerpc" || ${MACHINE_ARCH} == "powerpc64"
_dev_powermac_nvram= dev/powermac_nvram _dev_powermac_nvram= dev/powermac_nvram
.endif .endif
@ -189,7 +189,7 @@ copies:
${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \ ${INSTALL} -C -o ${BINOWN} -g ${BINGRP} -m 444 *.h \
${DESTDIR}${INCLUDEDIR}/machine/pc ${DESTDIR}${INCLUDEDIR}/machine/pc
.endif .endif
.if defined(_MARCH) .if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include)
${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
cd ${.CURDIR}/../sys/${_MARCH}/include; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \
@ -276,7 +276,7 @@ symlinks:
${DESTDIR}${INCLUDEDIR}/machine/pc; \ ${DESTDIR}${INCLUDEDIR}/machine/pc; \
done done
.endif .endif
.if defined(_MARCH) .if defined(_MARCH) && exists(${.CURDIR}/../sys/${_MARCH}/include)
${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \ ${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m 755 \
${DESTDIR}${INCLUDEDIR}/${_MARCH}; \ ${DESTDIR}${INCLUDEDIR}/${_MARCH}; \
cd ${.CURDIR}/../sys/${_MARCH}/include; \ cd ${.CURDIR}/../sys/${_MARCH}/include; \

View File

@ -203,10 +203,16 @@ DISTRIBUTIONS?= ${BASE_DISTS} ${OTHER_DISTS}
# Build and package both GENERIC and SMP kernels if the target # Build and package both GENERIC and SMP kernels if the target
# has both configuration files. Otherwise only GENERIC is done. # has both configuration files. Otherwise only GENERIC is done.
# #
.if exists(${.CURDIR}/../sys/${TARGET}/conf/SMP) .if ${TARGET_ARCH} == "powerpc64"
KERNELS_BASE?= GENERIC SMP KERN_GENERIC?= GENERIC64
.else .else
KERNELS_BASE?= GENERIC KERN_GENERIC?= GENERIC
.endif
.if exists(${.CURDIR}/../sys/${TARGET}/conf/SMP)
KERNELS_BASE?= ${KERN_GENERIC} SMP
.else
KERNELS_BASE?= ${KERN_GENERIC}
.endif .endif
# mountpoint for filesystems. # mountpoint for filesystems.
@ -851,7 +857,7 @@ SMALLMFSROOTFLOPPYSET= ${RD}/floppyset/mfsroot-small/mfsroot.gz
# Build boot and install floppies. # Build boot and install floppies.
floppies.1: floppies.1:
@${ZIPPER} -c ${RD}/kernels/GENERIC/kernel > ${RD}/kernels/kernel.gz @${ZIPPER} -c ${RD}/kernels/${KERN_GENERIC}/kernel > ${RD}/kernels/kernel.gz
@echo "Making the kernel boot floppies..." @echo "Making the kernel boot floppies..."
@cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \ @cd ${.CURDIR} && ${MAKE} makeFloppySet FLOPPYBASE=kern \
FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz FLOPPYDESC="Kernel" SPLITFILE=${RD}/kernels/kernel.gz
@ -985,7 +991,7 @@ cdrom.1:
done done
.endif .endif
@echo "Copy GENERIC kernel to boot area" @echo "Copy GENERIC kernel to boot area"
@cp -Rp ${RD}/kernels/GENERIC/ ${CD_LIVEFS}/boot/kernel @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_LIVEFS}/boot/kernel
@rm -f ${CD_LIVEFS}/boot/kernel/*.symbols @rm -f ${CD_LIVEFS}/boot/kernel/*.symbols
@rm -f ${CD_LIVEFS}/.profile @rm -f ${CD_LIVEFS}/.profile
@cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile @cp ${.CURDIR}/fixit.profile ${CD_LIVEFS}/.profile
@ -1003,7 +1009,7 @@ cdrom.1:
.endif .endif
@echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf @echo "CD_VERSION = ${BUILDNAME}" > ${CD_LIVEFS}/cdrom.inf
.if defined(MAKE_DVD) .if defined(MAKE_DVD)
@cp -Rp ${RD}/kernels/GENERIC/ ${CD_DVD1}/boot/kernel @cp -Rp ${RD}/kernels/${KERN_GENERIC}/ ${CD_DVD1}/boot/kernel
@rm -f ${CD_DVD1}/boot/kernel/*.symbols @rm -f ${CD_DVD1}/boot/kernel/*.symbols
@rm -f ${CD_DVD1}/.profile @rm -f ${CD_DVD1}/.profile
@cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile @cp ${.CURDIR}/fixit.profile ${CD_DVD1}/.profile
@ -1321,7 +1327,7 @@ makeFloppySet:
IMAGEDIR= ${RD}/image.${FSIMAGE} IMAGEDIR= ${RD}/image.${FSIMAGE}
BOOTDIR= ${RD}/trees/base/boot BOOTDIR= ${RD}/trees/base/boot
HINTSFILE= ${BOOTDIR}/device.hints HINTSFILE= ${BOOTDIR}/device.hints
ACPI_KO= ${RD}/kernels/GENERIC/acpi.ko ACPI_KO= ${RD}/kernels/${KERN_GENERIC}/acpi.ko
IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp IMAGEFILE= ${RD}/floppies/${FSIMAGE}.flp
.if defined(FDSIZE) && ${FDSIZE} == "SMALL" .if defined(FDSIZE) && ${FDSIZE} == "SMALL"
FLPSIZE= ${SMALLFLOPPYSIZE} FLPSIZE= ${SMALLFLOPPYSIZE}