1
0
mirror of https://git.FreeBSD.org/src.git synced 2024-12-24 11:29:10 +00:00
freebsd/gnu/usr.bin/cc/Makefile.inc
David E. O'Brien d0248b64a3 Move -I of cc_tool/ before the GCCDIR ones.
When I imported EGCS into contrib/egcs/ I failed to prune out
egcs/gcc/cp/hash.h which is generated from gxx.gperf.  Thus `cc1plus' wasn't
using the hash.h we generated by cc/cc_tools/Makefile, but rather the one in
egcs/gcc/cp/.

When I imported contrib/gcc/ I did prune gcc/cp/hash.h.  Unfortunately the
GCC maintainers weren't smart on their file nameing and there is also a
egcs/gcc/hash.h (name overloading does NOT work as well on the filesystem
as in C++...).  Due to the -I ordering we are were then picking up gcc/hash.h
when compiling `cc1plus'.
1999-10-12 20:22:38 +00:00

62 lines
1.5 KiB
Makefile

# $FreeBSD$
.include "../Makefile.inc"
# Sometimes this is .include'd several times...
.if !defined(GCCDIR)
GCCDIR= ${.CURDIR}/../../../../contrib/egcs/gcc
.if ${MACHINE_ARCH} == "mipsel" || ${MACHINE_ARCH} == "mipseb"
GCC_ARCH=mips
.else
GCC_ARCH=${MACHINE_ARCH}
.endif
# Machine description.
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 (${GCC_ARCH} == "alpha") || (${GCC_ARCH} == "sparc")
USE_EGCS_HAIFA=1
.endif
version!= sed -e 's/.*\"\([^ \"]*\)[ \"].*/\1/' < ${GCCDIR}/version.c
#version!= sed -e 's/.*\(egcs-[0-9\.]*\).*/\1/' < ${GCCDIR}/version.c
CFLAGS+= -DFREEBSD_NATIVE -DHAVE_CONFIG_H
CFLAGS+= -DDEFAULT_TARGET_VERSION=\"$(version)\"
CFLAGS+= -DDEFAULT_TARGET_MACHINE=\"$(target)\"
.if defined(USE_EGCS_HAIFA)
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
CFLAGS+= -I${.CURDIR}/../cc_tools
CFLAGS+= -I${GCCDIR} -I${GCCDIR}/config
.if exists(${.OBJDIR}/../cc_int)
LIBDESTDIR= ${.OBJDIR}/../cc_int
LIBCC_DRV= ${.OBJDIR}/../cc_drv/libcc_drv.a
.else
LIBDESTDIR= ${.CURDIR}/../cc_int
LIBCC_DRV= ${.CURDIR}/../cc_drv/libcc_drv.a
.endif
LIBCC_INT= ${LIBDESTDIR}/libcc_int.a
.endif # !GCCDIR