Index: head/gnu/usr.bin/binutils/Makefile.inc0 =================================================================== --- head/gnu/usr.bin/binutils/Makefile.inc0 (revision 322520) +++ head/gnu/usr.bin/binutils/Makefile.inc0 (revision 322521) @@ -1,52 +1,52 @@ # $FreeBSD$ # # This is included explicitly at the top of each sub-Makefile. We can't # use the normal "Makefile.inc" mechanism, because we need some of these # definitions before the sub-Makefile is processed. VERSION= "2.17.50 [FreeBSD] 2007-07-03" .if defined(TARGET_ARCH) TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif TARGET_ARCH?= ${MACHINE_ARCH} TARGET_VENDOR?= unknown TARGET_OS?= freebsd BINUTILS_ARCH=${TARGET_ARCH:C/amd64/x86_64/} TARGET_TUPLE?= ${BINUTILS_ARCH}-${TARGET_VENDOR}-${TARGET_OS} -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ +.if ${TARGET_ARCH:Marm*eb} != "" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "") TARGET_BIG_ENDIAN=t .endif # RELTOP is the relative path to this point in the source or object # tree, from any subdirectory of same. It gets extra "../" prefixes # added to it as we descend into subdirectories. RELTOP:= .. RELSRC= ${RELTOP}/../../../contrib/binutils SRCDIR= ${.CURDIR}/${RELSRC} .if ${TARGET_CPUARCH} == "arm" || ${TARGET_CPUARCH} == "i386" || \ ${TARGET_ARCH} == "powerpc" || ${TARGET_ARCH} == "powerpcspe" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips64*} == "") CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=32 .else CFLAGS+= -DBFD_DEFAULT_TARGET_SIZE=64 .endif CFLAGS+= -I. CFLAGS+= -I${.CURDIR} CFLAGS+= -I${.CURDIR}/${RELTOP}/libbfd CFLAGS+= -I${.OBJDIR}/${RELTOP}/libbfd CFLAGS+= -I${SRCDIR}/include ARCHS= ${TARGET_CPUARCH} .if exists(${.CURDIR}/Makefile.${TARGET_ARCH}) .include "${.CURDIR}/Makefile.${TARGET_ARCH}" .elif exists(${.CURDIR}/Makefile.${TARGET_CPUARCH}) .include "${.CURDIR}/Makefile.${TARGET_CPUARCH}" .endif Index: head/gnu/usr.bin/binutils/ld/Makefile.arm =================================================================== --- head/gnu/usr.bin/binutils/ld/Makefile.arm (revision 322520) +++ head/gnu/usr.bin/binutils/ld/Makefile.arm (revision 322521) @@ -1,17 +1,17 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" NATIVE_EMULATION= armelfb_fbsd .else NATIVE_EMULATION= armelf_fbsd .endif SRCS+= e${NATIVE_EMULATION}.c CLEANFILES+= e${NATIVE_EMULATION}.c e${NATIVE_EMULATION}.c: ${.CURDIR}/${NATIVE_EMULATION}.sh emultempl/elf32.em \ scripttempl/elf.sc genscripts.sh stringify.sed sh ${.CURDIR}/genscripts.sh ${SRCDIR}/ld ${LIBSEARCHPATH} \ ${TOOLS_PREFIX}/usr \ ${HOST} ${TARGET_TUPLE} ${TARGET_TUPLE} \ ${NATIVE_EMULATION} "" no ${NATIVE_EMULATION} ${TARGET_TUPLE} \ ${.CURDIR}/${NATIVE_EMULATION}.sh Index: head/gnu/usr.bin/binutils/libbfd/Makefile.arm =================================================================== --- head/gnu/usr.bin/binutils/libbfd/Makefile.arm (revision 322520) +++ head/gnu/usr.bin/binutils/libbfd/Makefile.arm (revision 322521) @@ -1,21 +1,21 @@ # $FreeBSD$ -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" DEFAULT_VECTOR= bfd_elf32_bigarm_vec .else DEFAULT_VECTOR= bfd_elf32_littlearm_vec .endif SRCS+= cpu-arm.c \ elf32.c \ elf32-arm.c \ elf32-gen.c \ elf32-target.h \ elflink.c VECS+= ${DEFAULT_VECTOR} -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" VECS+= bfd_elf32_littlearm_vec .else VECS+= bfd_elf32_bigarm_vec .endif Index: head/gnu/usr.bin/cc/Makefile.inc =================================================================== --- head/gnu/usr.bin/cc/Makefile.inc (revision 322520) +++ head/gnu/usr.bin/cc/Makefile.inc (revision 322521) @@ -1,111 +1,111 @@ # $FreeBSD$ .include .include "../Makefile.inc" # Sometimes this is .include'd several times... .if !defined(__CC_MAKEFILE_INC__) __CC_MAKEFILE_INC__= ${MFILE} GCCVER= 4.2 GCCDIR= ${SRCTOP}/contrib/gcc GCCLIB= ${SRCTOP}/contrib/gcclibs .include "Makefile.tgt" # Machine description. MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md GCC_TARGET= ${TARGET_ARCH}-undermydesk-freebsd CFLAGS+= -DGCCVER=\"${GCCVER}\" CFLAGS+= -DIN_GCC -DHAVE_CONFIG_H CFLAGS+= -DPREFIX=\"${TOOLS_PREFIX}/usr\" #CFLAGS+= -DWANT_COMPILER_INVARIANTS CSTD?= gnu89 .if ${TARGET_ARCH} != ${MACHINE_ARCH} CFLAGS+= -DCROSS_DIRECTORY_STRUCTURE .endif .if ${TARGET_CPUARCH} == "arm" CFLAGS+= -DTARGET_ARM_EABI .endif -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" +.if ${TARGET_ARCH:Marm*eb} != "" CFLAGS += -DTARGET_ENDIAN_DEFAULT=MASK_BIG_END .endif .if ${TARGET_ARCH} == "armv6" || ${TARGET_ARCH} == "armv6eb" CFLAGS += -DFREEBSD_ARCH_armv6 .endif .if ${TARGET_CPUARCH} == "mips" .if ${TARGET_ARCH:Mmips*el*} != "" CFLAGS += -DTARGET_ENDIAN_DEFAULT=0 .endif .if ${TARGET_ARCH:Mmips64*} != "" MIPS_ABI_DEFAULT=ABI_64 .elif ${TARGET_ARCH:Mmipsn32*} != "" MIPS_ABI_DEFAULT=ABI_N32 .else MIPS_ABI_DEFAULT=ABI_32 .endif CFLAGS += -DMIPS_ABI_DEFAULT=${MIPS_ABI_DEFAULT} # If we are compiling for the O32 ABI, we need to default to MIPS-III rather # than taking the ISA from the ABI requirements, since FreeBSD is built with # a number of MIPS-III features/instructions and that is the minimum ISA we # support, not the O32 default MIPS-I. .if ${MIPS_ABI_DEFAULT} == "ABI_32" TARGET_CPUTYPE?=mips3 .endif # GCC by default takes the ISA from the ABI's requirements. If world is built # with a superior ISA, since we lack multilib, we have to set the right # default ISA to be able to link against what's in /usr/lib. Terrible stuff. .if defined(TARGET_CPUTYPE) CFLAGS += -DMIPS_CPU_STRING_DEFAULT=\"${TARGET_CPUTYPE}\" .endif .endif .if defined(WANT_FORCE_OPTIMIZATION_DOWNGRADE) CFLAGS+= -DFORCE_OPTIMIZATION_DOWNGRADE=${WANT_FORCE_OPTIMIZATION_DOWNGRADE} .endif .if exists(${.OBJDIR}/../cc_tools) CFLAGS+= -I${.OBJDIR}/../cc_tools .endif CFLAGS+= -I${.CURDIR}/../cc_tools # This must go after the -I for cc_tools to resolve ambiguities for hash.h # correctly. CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config CFLAGS+= -I${GCCLIB}/include CFLAGS+= -I${GCCLIB}/libcpp/include CFLAGS+= -I${GCCLIB}/libdecnumber .if exists(${.OBJDIR}/../cc_int) LIBBACKEND= ${.OBJDIR}/../cc_int/libbackend.a .else LIBBACKEND= ${.CURDIR}/../cc_int/libbackend.a .endif .if exists(${.OBJDIR}/../libiberty) LIBIBERTY= ${.OBJDIR}/../libiberty/libiberty.a .else LIBIBERTY= ${.CURDIR}/../libiberty/libiberty.a .endif .if exists(${.OBJDIR}/../libcpp) LIBCPP= ${.OBJDIR}/../libcpp/libcpp.a .else LIBCPP= ${.CURDIR}/../libcpp/libcpp.a .endif .if exists(${.OBJDIR}/../libdecnumber) LIBDECNUMBER= ${.OBJDIR}/../libdecnumber/libdecnumber.a .else LIBDECNUMBER= ${.CURDIR}/../libdecnumber/libdecnumber.a .endif .endif # !__CC_MAKEFILE_INC__ Index: head/gnu/usr.bin/cc/Makefile.tgt =================================================================== --- head/gnu/usr.bin/cc/Makefile.tgt (revision 322520) +++ head/gnu/usr.bin/cc/Makefile.tgt (revision 322521) @@ -1,23 +1,23 @@ # $FreeBSD$ # These assignments duplicate much of the functionality of # MACHINE_CPUARCH, but there's no easy way to export make functions... .if defined(TARGET_ARCH) TARGET_CPUARCH=${TARGET_ARCH:${__TO_CPUARCH}} .else TARGET_CPUARCH=${MACHINE_CPUARCH} .endif TARGET_ARCH?= ${MACHINE_ARCH} GCC_CPU=${TARGET_CPUARCH:C/amd64/i386/:C/powerpc/rs6000/:C/sparc64/sparc/} .if ${TARGET_ARCH} == "sparc64" TARGET_CPU_DEFAULT= TARGET_CPU_ultrasparc .endif -.if ${TARGET_ARCH} == "armeb" || ${TARGET_ARCH} == "armv6eb" || \ +.if ${TARGET_ARCH:Marm*eb} != "" || \ (${TARGET_CPUARCH} == "mips" && ${TARGET_ARCH:Mmips*el*} == "") TARGET_BIG_ENDIAN=t .endif .if ${TARGET_ARCH} == "powerpc64" TARGET_CPU_DEFAULT= \"powerpc64\" .endif