From 3e8847491c14751e1e55fa3703dad96f8dc8e330 Mon Sep 17 00:00:00 2001 From: mrg Date: Tue, 16 Apr 2019 08:08:18 +0000 Subject: [PATCH] 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. --- external/gpl3/gcc/lib/libgcc/Makefile.inc | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/external/gpl3/gcc/lib/libgcc/Makefile.inc b/external/gpl3/gcc/lib/libgcc/Makefile.inc index df19a15b730b..28fb0221976b 100644 --- a/external/gpl3/gcc/lib/libgcc/Makefile.inc +++ b/external/gpl3/gcc/lib/libgcc/Makefile.inc @@ -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 \n' >${.TARGET} + printf '#include \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"