summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorobrien <obrien@FreeBSD.org>1999-04-22 19:35:16 +0000
committerobrien <obrien@FreeBSD.org>1999-04-22 19:35:16 +0000
commitc506ddebe9f9b989dbc457ec9ba986871f1711f8 (patch)
tree8547a7aa3a8c28974d7e6f213671177be4ae4ede
parentaffc3564d85c4d3cd27c926c5cc964b57cde939d (diff)
downloadFreeBSD-src-c506ddebe9f9b989dbc457ec9ba986871f1711f8.zip
FreeBSD-src-c506ddebe9f9b989dbc457ec9ba986871f1711f8.tar.gz
Use `GNU_ARCH' in most places where `MACHINE_ARCH' was used. Building for
mips has some particularlies.
-rw-r--r--gnu/usr.bin/cc/Makefile.inc24
-rw-r--r--gnu/usr.bin/cc/cc_int/Makefile4
-rw-r--r--gnu/usr.bin/cc/cc_tools/Makefile12
3 files changed, 27 insertions, 13 deletions
diff --git a/gnu/usr.bin/cc/Makefile.inc b/gnu/usr.bin/cc/Makefile.inc
index d88ed11..5e370e9 100644
--- a/gnu/usr.bin/cc/Makefile.inc
+++ b/gnu/usr.bin/cc/Makefile.inc
@@ -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
diff --git a/gnu/usr.bin/cc/cc_int/Makefile b/gnu/usr.bin/cc/cc_int/Makefile
index d141948..b2eb267 100644
--- a/gnu/usr.bin/cc/cc_int/Makefile
+++ b/gnu/usr.bin/cc/cc_int/Makefile
@@ -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 \
diff --git a/gnu/usr.bin/cc/cc_tools/Makefile b/gnu/usr.bin/cc/cc_tools/Makefile
index 8f084c3..9ed40ca 100644
--- a/gnu/usr.bin/cc/cc_tools/Makefile
+++ b/gnu/usr.bin/cc/cc_tools/Makefile
@@ -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
#-----------------------------------------------------------------------
OpenPOWER on IntegriCloud