Permalink
Browse files

MFC r257530

Reimplement r257525 such that it work with the historic FreeBSD make
implementation.  This fixes the toolchain and kernel-toolchain targets
when building from older FreeBSD versions where make is fmake.

Sponsored by:	DARPA/AFRL
Approved by:	re (glebius)
  • Loading branch information...
1 parent 8ca6127 commit fe917e2f9d1832d92298ca01a86fcac01b206d1a @brooksdavis brooksdavis committed Nov 4, 2013
Showing with 6 additions and 1 deletion.
  1. +6 −1 gnu/usr.bin/binutils/ld/Makefile
View
7 gnu/usr.bin/binutils/ld/Makefile
@@ -31,7 +31,12 @@ CFLAGS+= -DTARGET=\"${TARGET_TUPLE}\"
CFLAGS+= -DDEFAULT_EMULATION=\"${NATIVE_EMULATION}\"
CFLAGS+= -DSCRIPTDIR=\"${TOOLS_PREFIX}/usr/libdata\"
CFLAGS+= -DBFD_VERSION_STRING=\"${VERSION}\"
-CFLAGS+= -DBINDIR=\"${BINDIR}\" -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX:U/}\"
+CFLAGS+= -DBINDIR=\"${BINDIR}\"
+.if defined(TOOLS_PREFIX)
+CFLAGS+= -DTARGET_SYSTEM_ROOT=\"${TOOLS_PREFIX}\"
+.else
+CFLAGS+= -DTARGET_SYSTEM_ROOT=\"/\"
+.endif
CFLAGS+= -DTOOLBINDIR=\"${TOOLS_PREFIX}/${BINDIR}/libexec\"
CFLAGS+= -D_GNU_SOURCE
CFLAGS+= -I${SRCDIR}/ld -I${SRCDIR}/bfd

0 comments on commit fe917e2

Please sign in to comment.