summaryrefslogtreecommitdiff
path: root/Makefile.cross
diff options
context:
space:
mode:
authorMiod Vallat <miod@cvs.openbsd.org>2013-07-05 21:29:52 +0000
committerMiod Vallat <miod@cvs.openbsd.org>2013-07-05 21:29:52 +0000
commit1a2a6a7db7b9fe8a0cbab3485a330fdf4f35559e (patch)
treee609ea01858edbfe16a611838276446148fd418e /Makefile.cross
parente02df503da80168b71a858e6a8c7131e586e322a (diff)
ELF_TOOLCHAIN bye bye.
Diffstat (limited to 'Makefile.cross')
-rw-r--r--Makefile.cross67
1 files changed, 7 insertions, 60 deletions
diff --git a/Makefile.cross b/Makefile.cross
index 6b3dde0ba3b..0af570cd678 100644
--- a/Makefile.cross
+++ b/Makefile.cross
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile.cross,v 1.64 2013/04/04 10:45:33 jasper Exp $
+# $OpenBSD: Makefile.cross,v 1.65 2013/07/05 21:29:51 miod Exp $
cross-tools: cross-includes cross-binutils cross-gcc cross-lib
cross-distrib: cross-tools cross-bin cross-share cross-sys cross-etc-root-var
@@ -82,8 +82,6 @@ CROSSGCC= ${CROSSDIR}/.gcc_done
.include <bsd.own.mk>
-OLD_BINUTILS_ARCH=vax
-
.for _arch in ${TARGET_ARCH}
.if !empty(GCC2_ARCH:M${_arch})
COMPILER_VERSION=gcc2
@@ -108,14 +106,8 @@ NOPIE_FLAGS=
PIE_DEFAULT=
.endif
-.if !empty(OLD_BINUTILS_ARCH:M${_arch})
-NEW_BINUTILS?= No
-BINUTILS= ar as ld nm ranlib objcopy objdump strings strip
-.else
-NEW_BINUTILS?= Yes
BINUTILS= ar as gasp ld nm objcopy objdump ranlib readelf size \
strings strip
-.endif
BINUTILS_DIR=gnu/usr.bin/${BINUTILS_VERSION}
.endfor
@@ -147,10 +139,10 @@ cross-env:
${CROSSDIRS}:
.if ${TARGET_ARCH} == "arm" && ${MACHINE_IS_LP64} == "yes"
- # this config is allowed
+# this config is allowed
.elif ${TARGET_IS_LP64} != ${MACHINE_IS_LP64}
- @echo "host and target have different size longs"
- @echo "cross compiler generates bad code; aborting"; exit 1
+@echo "host and target have different size longs"
+@echo "cross compiler generates bad code; aborting"; exit 1
.endif
@-mkdir -p ${CROSSDIR}
@echo ${TARGET_ARCH} > ${CROSSDIR}/TARGET_ARCH
@@ -201,65 +193,20 @@ ${CROSSINCLUDES}: ${CROSSOBJ}
${CROSSBINUTILS}: ${CROSSINCLUDES}
(cd ${.CURDIR}/${BINUTILS_DIR}; \
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- USING_NEW_BINUTILS=${NEW_BINUTILS} PIE_DEFAULT=${PIE_DEFAULT} \
+ PIE_DEFAULT=${PIE_DEFAULT} \
TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \
PATH=${CROSSPATH} \
${MAKE} -f Makefile.bsd-wrapper depend && \
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- USING_NEW_BINUTILS=${NEW_BINUTILS} PIE_DEFAULT=${PIE_DEFAULT} \
+ PIE_DEFAULT=${PIE_DEFAULT} \
TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \
${MAKE} -f Makefile.bsd-wrapper all && \
DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
COMPILER_VERSION=${COMPILER_VERSION} \
- USING_NEW_BINUTILS=${NEW_BINUTILS} PIE_DEFAULT=${PIE_DEFAULT} \
+ PIE_DEFAULT=${PIE_DEFAULT} \
MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- USING_NEW_BINUTILS=${NEW_BINUTILS} \
TARGET_ARCH=${TARGET_ARCH} TARGET_CPU=${TARGET_CPU} \
${MAKE} -f Makefile.bsd-wrapper install)
-.if ${NEW_BINUTILS:L} != "yes"
- (cd ${.CURDIR}/gnu/usr.bin/gas; \
- TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} depend all; \
- TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} NOMAN= install)
- ln -sf ${CROSSDIR}/usr/bin/as \
- ${CROSSDIR}/usr/${TARGET_CANON}/bin/as
- (cd ${.CURDIR}/gnu/usr.bin/ld; \
- TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} NOPIC= NOMAN= depend all; \
- TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} NOPIC= NOMAN= install)
- ln -sf ${CROSSDIR}/usr/bin/ld \
- ${CROSSDIR}/usr/${TARGET_CANON}/bin/ld
- (cd ${.CURDIR}/usr.bin/ar; \
- ELF_TOOLCHAIN=no \
- MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} NOMAN= depend all; \
- ELF_TOOLCHAIN=no \
- DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} NOMAN= install)
- ln -sf ${CROSSDIR}/usr/bin/ar \
- ${CROSSDIR}/usr/${TARGET_CANON}/bin/ar
- @(cd ${.CURDIR}/usr.bin/ranlib; \
- ELF_TOOLCHAIN=no \
- MAKEOBJDIR=obj.${MACHINE}.${TARGET} ${MAKE} NOMAN= depend all; \
- ELF_TOOLCHAIN=no \
- DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} NOMAN= install)
- ln -sf ${CROSSDIR}/usr/bin/ranlib \
- ${CROSSDIR}/usr/${TARGET_CANON}/bin/ranlib
- (cd ${.CURDIR}/usr.bin/strip; \
- MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- NOMAN= depend all; \
- DESTDIR=${CROSSDIR} MAKEOBJDIR=obj.${MACHINE}.${TARGET} \
- ${MAKE} TARGET_MACHINE_ARCH=${TARGET_ARCH} \
- NOMAN= install)
- ln -sf ${CROSSDIR}/usr/bin/strip \
- ${CROSSDIR}/usr/${TARGET_CANON}/bin/strip
-.endif
@for cmd in ${BINUTILS}; do \
if [ -e ${CROSSDIR}/usr/bin/${TARGET_CANON}-$$cmd ] ; then \
cp -f ${CROSSDIR}/usr/bin/${TARGET_CANON}-$$cmd \