use --sysroot with GCC 4.5. (maybe could with 4.1 too? the 4.1 code

here is broken right now, anyway, ever since the sysroot changes were
merged into our tree.)
This commit is contained in:
mrg 2011-06-21 09:37:41 +00:00
parent 2c77b0841d
commit 63da379d23
1 changed files with 6 additions and 1 deletions

View File

@ -1,4 +1,4 @@
# $NetBSD: Makefile,v 1.37 2011/06/21 04:11:12 mrg Exp $
# $NetBSD: Makefile,v 1.38 2011/06/21 09:37:41 mrg Exp $
.include <bsd.own.mk>
@ -98,8 +98,13 @@ GCCSRCDIR=${.CURDIR}/../../gnu/dist/gcc4
GCCSRCDIR=${.CURDIR}/../../external/gpl3/gcc/dist
.endif
.if ${HAVE_GCC} >= 45
CXXADDFLAGS= --sysroot=${DESTDIR}
CCADDFLAGS= --sysroot=${DESTDIR} -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
.else
CXXADDFLAGS= ${CPPFLAG_ISYSTEMXX} ${DESTDIR}/usr/include/g++
CCADDFLAGS= ${CPPFLAG_ISYSTEM} ${DESTDIR}/usr/include -L${DESTDIR}/lib -L${DESTDIR}/usr/lib -B${DESTDIR}/usr/lib/
.endif
NEWCONFIGDIR?= ${.CURDIR}/../..
MKNATIVE?= ${.CURDIR}/mknative-gcc