consolidate the tconfig.h generation.
This commit is contained in:
parent
be40ac2f1f
commit
a98337dbce
|
@ -0,0 +1,10 @@
|
|||
# $NetBSD: Makefile.tconfigh,v 1.1 2011/06/29 01:56:58 mrg Exp $
|
||||
|
||||
tconfig.h:
|
||||
${_MKTARGET_CREATE}
|
||||
TM_DEFINES="$(G_tm_defines)" \
|
||||
HEADERS="$(G_xm_include_list)" DEFINES="USED_FOR_TARGET $(G_xm_defines)" \
|
||||
TARGET_CPU_DEFAULT="" \
|
||||
${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
||||
|
||||
CLEANFILES+= cs-tconfig.h tconfig.h
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.2 2011/06/23 11:47:12 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2011/06/29 01:56:57 mrg Exp $
|
||||
|
||||
REQUIRETOOLS= yes
|
||||
NOLINT= # defined
|
||||
|
@ -17,11 +17,18 @@ GALLCFLAGS= ${G_CRTSTUFF_CFLAGS} ${G_CRTSTUFF_T_CFLAGS}
|
|||
|
||||
CPPFLAGS+= -I${GCCARCH} ${GALLCFLAGS:M-D*} ${GALLCFLAGS:M-I*:N-I.*}
|
||||
CPPFLAGS+= -I.
|
||||
COPTS+= -finhibit-size-directive \
|
||||
-fno-inline \
|
||||
-fno-exceptions \
|
||||
-fno-zero-initialized-in-bss \
|
||||
-fno-toplevel-reorder \
|
||||
-fno-tree-vectorize \
|
||||
-fno-omit-frame-pointer \
|
||||
-fno-asynchronous-unwind-tables
|
||||
|
||||
GCFLAGS= ${GALLCFLAGS:N-D*:N-I*:N-i*:N./*}
|
||||
|
||||
DPSRCS+= ${.CURDIR}/arch/${MACHINE_ARCH}.mk tconfig.h
|
||||
CLEANFILES+= cs-tconfig.h tconfig.h
|
||||
|
||||
.include "${.CURDIR}/arch/${MACHINE_ARCH}.mk"
|
||||
|
||||
|
@ -30,6 +37,8 @@ OBJS+= crtbegin.o crtend.o
|
|||
.if ${MKPIC} != "no"
|
||||
SRCS+= crtbeginS.c crtendS.c
|
||||
OBJS+= crtbeginS.o crtendS.o # for shared libraries
|
||||
CPPFLAGS.crtbeginS.o+= -fPIC -DPIC
|
||||
CPPFLAGS.crtendS.o+= -fPIC -DPIC
|
||||
SRCS+= crtbeginT.c
|
||||
OBJS+= crtbeginT.o # for -static links
|
||||
.endif
|
||||
|
@ -41,12 +50,7 @@ FILESDIR=${LIBDIR}
|
|||
|
||||
.PATH: ${DIST}/gcc ${DIST}/gcc/config ${G_CONFIGDIR}
|
||||
|
||||
tconfig.h:
|
||||
${_MKTARGET_CREATE}
|
||||
TM_DEFINES="$(G_tm_defines)" \
|
||||
HEADERS="$(G_xm_file)" XM_DEFINES="$(G_xm_defines)" \
|
||||
TARGET_CPU_DEFAULT="" \
|
||||
${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
||||
.include "../Makefile.tconfigh"
|
||||
|
||||
# these aren't necessary but are #include'd
|
||||
FAKEHEADERS=options.h insn-flags.h insn-constants.h
|
||||
|
@ -63,7 +67,7 @@ ${OBJS}: ${DPSRCS}
|
|||
# Override the default .c -> .o rule.
|
||||
.c.o:
|
||||
${_MKTARGET_COMPILE}
|
||||
${CC} ${CPPFLAGS} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
|
||||
${CC} ${CPPFLAGS} ${CPPFLAGS.${.TARGET}} ${GCFLAGS} ${CPUFLAGS} -c ${.IMPSRC} -o ${.TARGET}.o
|
||||
mv ${.TARGET}.o ${.TARGET}
|
||||
|
||||
.if (${MACHINE_ARCH} == "mips64eb") || (${MACHINE_ARCH} == "mips64el")
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile.inc,v 1.3 2011/06/28 04:03:56 mrg Exp $
|
||||
# $NetBSD: Makefile.inc,v 1.4 2011/06/29 01:56:57 mrg Exp $
|
||||
|
||||
.if ${MKGCC} != "no"
|
||||
.if exists(${.CURDIR}/../arch/${MACHINE_ARCH}.mk)
|
||||
|
@ -134,13 +134,8 @@ dp-bit.c: ${.CURDIR}/Makefile
|
|||
.PATH: ${DIST}/gcc ${DIST}/gcc/cp ${DIST}/gcc/cp/inc ${DIST}/gcc/config \
|
||||
${G_CONFIGDIR}
|
||||
|
||||
tconfig.h:
|
||||
${_MKTARGET_CREATE}
|
||||
TARGET_CPU_DEFAULT="" \
|
||||
HEADERS="$(G_xm_include_list)" DEFINES="USED_FOR_TARGET $(G_xm_defines)" \
|
||||
${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
||||
.include "../Makefile.tconfigh"
|
||||
DPSRCS+= tconfig.h
|
||||
CLEANFILES+= tconfig.h
|
||||
|
||||
BUILDSYMLINKS+= ${G_UNWIND_H} unwind.h
|
||||
DPSRCS+= unwind.h
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# $NetBSD: Makefile,v 1.2 2011/06/23 11:47:12 mrg Exp $
|
||||
# $NetBSD: Makefile,v 1.3 2011/06/29 01:56:58 mrg Exp $
|
||||
|
||||
REQUIRETOOLS= yes
|
||||
NOLINT= # defined
|
||||
|
@ -83,18 +83,14 @@ CLEANFILES+= ${FAKEHEADERS}
|
|||
|
||||
${SRCS}: tconfig.h unwind.h options.h
|
||||
|
||||
tconfig.h:
|
||||
${_MKTARGET_CREATE}
|
||||
TARGET_CPU_DEFAULT="" \
|
||||
HEADERS="$(G_xm_include_list)" DEFINES="USED_FOR_TARGET $(G_xm_defines)" \
|
||||
${HOST_SH} $(GNUHOSTDIST)/gcc/mkconfig.sh tconfig.h
|
||||
.include "../Makefile.tconfigh"
|
||||
|
||||
unwind.h: ${G_UNWIND_H}
|
||||
${_MKTARGET_CREATE}
|
||||
rm -f ${.TARGET}
|
||||
ln -s ${G_UNWIND_H} ${.TARGET}
|
||||
|
||||
CLEANFILES+= cs-tconfig.h tconfig.h unwind.h
|
||||
CLEANFILES+= unwind.h
|
||||
|
||||
# XXX just while all platforms defs.mk are updated..
|
||||
.if exists(${.CURDIR}/arch/${MACHINE_ARCH}/defs.mk)
|
||||
|
|
Loading…
Reference in New Issue