opnsense-src/gnu/usr.bin/binutils/as/Makefile
Warner Losh 0b972ac92e Support armv7 builds for userland
Make armv7 as a new MACHINE_ARCH.

Copy all the places we do armv6 and add armv7 as basically an
alias. clang appears to generate code for armv7 by default. armv7 hard
float isn't supported by the the in-tree gcc, so it hasn't been
updated to have a new default.

Support armv7 as a new valid MACHINE_ARCH (and by extension
TARGET_ARCH).

Add armv7 to the universe build.

Differential Revision: https://reviews.freebsd.org/D12010
2017-10-05 23:01:33 +00:00

103 lines
2.1 KiB
Makefile

# $FreeBSD$
# BINDIR
.include "${.CURDIR}/../../Makefile.inc"
.include "${.CURDIR}/../Makefile.inc0"
.include <src.opts.mk>
.PATH: ${SRCDIR}/gas ${SRCDIR}/gas/config
.if ${TARGET_ARCH:Marm*} || ${TARGET_ARCH} == "powerpc64"
NO_WERROR.clang=
.endif
PROG= as
SRCS+= app.c \
as.c \
atof-generic.c \
atof-ieee.c \
cond.c \
depend.c \
dw2gencfi.c \
dwarf2dbg.c \
ecoff.c \
ehopt.c \
expr.c \
flonum-copy.c \
flonum-konst.c \
flonum-mult.c \
frags.c \
hash.c \
input-file.c \
input-scrub.c \
listing.c \
literal.c \
macro.c \
messages.c \
obj-elf.c \
output-file.c \
read.c \
sb.c \
stabs.c \
subsegs.c \
symbols.c \
write.c
# DEO: why not used?
#SRCS+= itbl-ops.c
.if ${TARGET_ARCH:Marmv6*} != ""
CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V6K
.endif
.if ${TARGET_ARCH:Marmv7*} != ""
CFLAGS+= -DCPU_DEFAULT=ARM_ARCH_V7A
.endif
.if ${TARGET_CPUARCH} == "mips"
SRCS+= itbl-ops.c itbl-parse.y itbl-lex.l
.if ${TARGET_ARCH:Mmips64*} != ""
CFLAGS+= -DMIPS_DEFAULT_ABI=N64_ABI -DMIPS_DEFAULT_64BIT=1
.elif ${TARGET_ARCH:Mmipsn32*} != ""
CFLAGS+= -DMIPS_DEFAULT_ABI=N32_ABI
.else
MIPS_ABI_DEFAULT=ABI_32
.endif
.endif
.if ${TARGET_ARCH} == "amd64"
SRCS+= tc-i386.c
.elif ${TARGET_CPUARCH} == "powerpc"
SRCS+= tc-ppc.c
.elif ${TARGET_ARCH} == "sparc64"
SRCS+= tc-sparc.c
.else
SRCS+= tc-${TARGET_CPUARCH}.c
.endif
.if ${TARGET_ARCH} == "sparc64"
CFLAGS+= -DDEFAULT_ARCH=\"v9-64\"
.else
CFLAGS+= -DDEFAULT_ARCH=\"${BINUTILS_ARCH}\"
.endif
.if defined(TARGET_BIG_ENDIAN)
CFLAGS+= -DTARGET_BYTES_BIG_ENDIAN=1
.endif
CFLAGS+= -DTARGET_CPU=\"${BINUTILS_ARCH}\"
CFLAGS+= -DTARGET_OS=\"${TARGET_OS}\"
CFLAGS+= -DTARGET_CANONICAL=\"${TARGET_TUPLE}\"
CFLAGS+= -DTARGET_ALIAS=\"${TARGET_TUPLE}\"
CFLAGS+= -DVERSION=\"${VERSION}\"
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/gas -I${SRCDIR}/bfd -I${SRCDIR}/gas/config -I${SRCDIR}
CFLAGS+= -I${.CURDIR} -I${.CURDIR}/${TARGET_CPUARCH}-freebsd
.if ${MK_SHARED_TOOLCHAIN} == "no"
NO_SHARED?= yes
.endif
DPADD= ${RELTOP}/libbfd/libbfd.a
DPADD+= ${RELTOP}/libiberty/libiberty.a
DPADD+= ${RELTOP}/libopcodes/libopcodes.a
LDADD= ${DPADD}
.include <bsd.prog.mk>