aboutsummaryrefslogtreecommitdiff
path: root/gnu/usr.bin
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>1999-04-22 19:35:16 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>1999-04-22 19:35:16 +0000
commita834cf28a5e1214b0ab8515a41e6ac477a28d4a6 (patch)
treeaf3c47bf0ee92f8944426955c0afe155e82d99b7 /gnu/usr.bin
parent9a15e81395bd186928c8fa0838a78863b7ca6290 (diff)
downloadsrc-a834cf28a5e1214b0ab8515a41e6ac477a28d4a6.tar.gz
src-a834cf28a5e1214b0ab8515a41e6ac477a28d4a6.zip
Use `GNU_ARCH' in most places where `MACHINE_ARCH' was used. Building for
mips has some particularlies.
Notes
Notes: svn path=/head/; revision=45943
Diffstat (limited to 'gnu/usr.bin')
-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 d88ed11a7563..5e370e9b0960 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 d14194861f74..b2eb2673a6e9 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 8f084c3f3865..9ed40ca691de 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
#-----------------------------------------------------------------------