fix -I paths for powerpc*. convert amd64 specific hack.

we've been building dp-bit.c and fp-bit.c backwards, but as they
use the same input source, they just had opposite objects and
the right total was provided.  oops.
This commit is contained in:
mrg 2019-04-16 08:08:18 +00:00
parent 134005bc02
commit 3e8847491c
1 changed files with 7 additions and 9 deletions

View File

@ -1,6 +1,7 @@
# $NetBSD: Makefile.inc,v 1.41 2019/04/03 02:13:56 mrg Exp $
# $NetBSD: Makefile.inc,v 1.42 2019/04/16 08:08:18 mrg Exp $
LIBGCC_MACHINE_ARCH?=${MACHINE_ARCH:S/earmv5/earm/}
GCC_MACHINE_SUBDIR=${MACHINE_CPU:C/powerpc.*/rs6000/:C/x86_64/i386/}
.if ${MKGCC} != "no"
.if exists(${.CURDIR}/../arch/${LIBGCC_MACHINE_ARCH}/defs.mk)
@ -22,11 +23,7 @@ CPPFLAGS+= -I${GCCARCH} ${GCPPFLAGS:M-D*} ${GCPPFLAGS:M-I*:N-I.*}
CPPFLAGS+= ${GCPPFLAGS:M-m*} ${GCPPFLAGS:M-f*}
CPPFLAGS+= ${G_EXTRA_HEADERS:M/*:H:u:S/^/-I/g}
CPPFLAGS+= -I${DIST}/libgcc -I${DIST}/libgcc/config
.if ${LIBGCC_MACHINE_ARCH} == "x86_64"
CPPFLAGS+= -I${DIST}/libgcc/config/i386
.else
CPPFLAGS+= -I${DIST}/libgcc/config/${LIBGCC_MACHINE_ARCH}
.endif
CPPFLAGS+= -I${DIST}/libgcc/config/${GCC_MACHINE_SUBDIR}
CPPFLAGS+= -I${DIST}/gcc -I${DIST}/include -I.
CPPFLAGS+= ${G_INTERNAL_CFLAGS:M-DHAVE_CC_TLS}
@ -120,7 +117,7 @@ LIB2_EHASM= ${G_LIB2ADDEH:M*.S:T}
# from the list of files we create.
.if !empty(G_LIB1ASMFUNCS)
. for f in ${G_LIB1ASMFUNCS:=.S}
. if !exists(${DIST}/libgcc/config/${MACHINE_CPU}/${f})
. if !exists(${DIST}/libgcc/config/${GCC_MACHINE_SUBDIR}/${f})
LIB1ASMFUNCS+= ${f}
. endif
. endfor
@ -184,16 +181,17 @@ ${G_LIB2_DIVMOD_FUNCS:=.pico}: $(.PREFIX).c
${_MKTARGET_COMPILE}
${COMPILE.c} ${CPICFLAGS} -fexceptions -fnon-call-exceptions ${COPTS.${.IMPSRC:T}} -o ${.TARGET} ${.IMPSRC}
CPPFLAGS.fp-bit.c+= -DFLOAT=1
dp-bit.c: ${.CURDIR}/Makefile
${_MKTARGET_CREATE}
printf '#define FLOAT\n#include <fp-bit.c>\n' >${.TARGET}
printf '#include <fp-bit.c>\n' >${.TARGET}
#
# Common rules.
#
.PATH: ${DIST}/gcc ${DIST}/gcc/cp ${DIST}/gcc/cp/inc ${DIST}/gcc/config \
${DIST}/libgcc/config ${DIST}/libgcc/config/${MACHINE_CPU} \
${DIST}/libgcc/config ${DIST}/libgcc/config/${GCC_MACHINE_SUBDIR} \
${G_LIB2ADD:H:O:u} ${G_LIB2ADDEH:H:O:u} ${GCCARCHLIBGCC}
.include "../Makefile.tconfigh"