Fix bootstrapping libmd on older systems after r314709.

This follows another fix to bootstrap libmd after r313404.  The
MD5FileChunk prototype is needed to build libmd, but it is
only reliably in the src tree's sys/md5.h header.  Rather than
polluting the legacy build with this header for the entire build,
just symlink it in here for now as is done in the elftoolchain
build.  Libmd is already referencing other src tree headers by
its used of CFLAGS+= ${SRCTOP}/sys/crypto/sha2.  This, and
other uses of CFLAGS+= ${SRCTOP}/sys..., may later change to
be in the legacy mechanism.

Reported by:	bde, ian, sjg
Tested by:	ian
This commit is contained in:
Bryan Drewery 2017-03-06 21:06:55 +00:00
parent 63bb40b55d
commit a1b9cad56b

View File

@ -72,6 +72,13 @@ CLEANFILES+= md[245]hl.c md[245].ref md[245].3 mddriver \
skein256.ref skein512.ref skein1024.ref \
skeindriver
# Need src tree sys/md5.h for MD5FileChunk prototype on older systems.
SRCS+= sys/md5.h
CLEANDIRS= sys
CFLAGS+= -I.
sys/md5.h: ${SRCTOP}/sys/${.TARGET} .NOMETA
ln -sf ${.ALLSRC} ${.TARGET}
# Define WEAK_REFS to provide weak aliases for libmd symbols
#
# Note that the same sources are also used internally by libcrypt,