Only use /usr/include and /usr/libdata/gcc41 prefixed by
${USRDATA_PREFIX}. This requires r83302 of LLVM/clang or
higher for the -nostdclanginc option.
While here, remove an 'else' I put in for debugging purposes
which is now useless.
NOMAN=
${.OBJDIR}/cc: cc.sh
- sed "s#@@PREFIX2@@#${USRDATA_PREFIX}/usr#g" $> > $@
+ sed "s#@@INCPREFIX@@#${USRDATA_PREFIX}#g" $> > $@
.include <bsd.prog.mk>
export beenhere=1
oldargs="$@"
export oldargs
- INCOPT="-isystem @@PREFIX2@@/include \
- -isystem @@PREFIX2@@/libdata/gcc41"
+ INCOPT="-isysroot @@INCPREFIX@@ -nostdclanginc"
elif [ "${CNAME}" = "cc" -o "${CNAME}" = "gcc" ]; then
exec ${CDIR}/../gcc41/cc $oldargs
fi
exec ${CUSTOM_CXX} ${INCOPT} ${CUSTOM_CXXFLAGS} "$@"
elif [ "${CNAME}" = "cpp" ]; then
exec ${CUSTOM_CPP} ${INCOPT} ${CUSTOM_CPPFLAGS} "$@"
-else
- echo "unknown compiler ${CNAME}"
- exit 1
fi