When building 5.9 cross tools ("cross-tools" target in Makefile.cross) on 5.8, cross tools are installed to e.g. ${CROSSDIR}/usr/*-openbsd5.9, not .../*-openbsd5.8.
Don't use ${OSREV} which is derived from hardcoded ${OSMINOR} in building host's /usr/share/mk/sys.mk (still 5.8), but use ${CROSSDIR}/TARGET_CANON, which comes from building target's src/sys/conf/newvers.sh (5.9). Index: gnu/usr.bin/cc/Makefile.inc =================================================================== RCS file: /cvs/src/gnu/usr.bin/cc/Makefile.inc,v retrieving revision 1.6 diff -u -p -r1.6 Makefile.inc --- gnu/usr.bin/cc/Makefile.inc 16 Sep 2012 20:46:35 -0000 1.6 +++ gnu/usr.bin/cc/Makefile.inc 9 Mar 2016 06:52:35 -0000 @@ -18,7 +18,11 @@ GCCDIR= ${GCCLIB}/gcc # Machine description. MD_FILE= ${GCCDIR}/config/${GCC_CPU}/${GCC_CPU}.md +.if defined(CROSSDIR) +GCC_TARGET!= cat ${CROSSDIR}/TARGET_CANON +.else GCC_TARGET= ${TARGET_ARCH}-unknown-openbsd${OSREV} +.endif NOPIE= Yes