Use GNU_ARCH' in most places where MACHINE_ARCH' was used. Building for

mips has some particularlies.
This commit is contained in:
David E. O'Brien 1999-04-22 19:35:16 +00:00
parent 9a15e81395
commit a834cf28a5
3 changed files with 27 additions and 13 deletions

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile.inc,v 1.30 1999/04/18 09:41:49 obrien Exp $
# $Id: Makefile.inc,v 1.31 1999/04/18 09:42:17 obrien Exp $
#
.include "../Makefile.inc"
@ -10,14 +10,20 @@ GCCDIR= ${.CURDIR}/../../../../contrib/egcs/gcc
BISON?= bison
.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
GCC_ARCH=mips
.else
GCC_ARCH=${MACHINE_ARCH}
.endif
# Machine description.
MD_FILE= ${GCCDIR}/config/${MACHINE_ARCH}/${MACHINE_ARCH}.md
OUT_FILE= ${MACHINE_ARCH}.c
OUT_OBJ= ${MACHINE_ARCH}
MD_FILE= ${GCCDIR}/config/${GCC_ARCH}/${GCC_ARCH}.md
OUT_FILE= ${GCC_ARCH}.c
OUT_OBJ= ${GCC_ARCH}
target= ${MACHINE_ARCH}-unknown-freebsd
# These architectures are Cygnus's default for enabling Haifa
.if (${MACHINE_ARCH} == "alpha") || (${MACHINE_ARCH} == "sparc")
.if (${GCC_ARCH} == "alpha") || (${GCC_ARCH} == "sparc")
USE_EGCS_HAIFA=1
.endif
@ -33,6 +39,14 @@ CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\"
CFLAGS+= -DHAIFA
.endif
# If hw.machine_arch doesn't match ${MACHINE_ARCH}, then we're cross
# compiling. gcc needs to know about this, so we set the -DCROSS_COMPILE
# define.
__M!=/sbin/sysctl -b hw.machine_arch
.if ${__M} != ${MACHINE_ARCH}
CFLAGS+= -DCROSS_COMPILE
.endif
.if exists(${.OBJDIR}/../cc_tools)
CFLAGS+= -I${.OBJDIR}/../cc_tools
.endif

View File

@ -1,9 +1,9 @@
#
# $Id: Makefile,v 1.16 1999/04/04 16:36:34 obrien Exp $
# $Id: Makefile,v 1.17 1999/04/06 20:08:01 obrien Exp $
#
.include "../Makefile.inc"
.PATH: ../cc_tools ${GCCDIR}/config/${MACHINE_ARCH} ${GCCDIR}
.PATH: ../cc_tools ${GCCDIR}/config/${GCC_ARCH} ${GCCDIR}
SRCS= c-common.c c-pragma.c \
caller-save.c calls.c combine.c convert.c cse.c \

View File

@ -133,7 +133,7 @@ GENSRCS+= ${COMMONHDRS}
config.h hconfig.h:
echo '#include "auto-host.h"' > ${.TARGET}
echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' >> ${.TARGET}
echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' >> ${.TARGET}
multilib.h:
echo 'static char *multilib_raw[] = { \
@ -151,13 +151,13 @@ specs.h:
echo '#include "f/lang-specs.h"' >> ${.TARGET}
tconfig.h:
echo '#include "${MACHINE_ARCH}/xm-${MACHINE_ARCH}.h"' > ${.TARGET}
echo '#include "${GCC_ARCH}/xm-${GCC_ARCH}.h"' > ${.TARGET}
tm.h:
echo '#include "${MACHINE_ARCH}/${MACHINE_ARCH}.h"' > ${.TARGET}
echo '#include "${MACHINE_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${MACHINE_ARCH} == "i386"
echo '#include "${MACHINE_ARCH}/perform.h"' >> ${.TARGET}
echo '#include "${GCC_ARCH}/${GCC_ARCH}.h"' > ${.TARGET}
echo '#include "${GCC_ARCH}/freebsd.h"' >> ${.TARGET}
.if ${GCC_ARCH} == "i386"
echo '#include "${GCC_ARCH}/perform.h"' >> ${.TARGET}
.endif
#-----------------------------------------------------------------------