From 1e2b13910635fb28a10591262a87573e34717391 Mon Sep 17 00:00:00 2001 From: brooks Date: Mon, 4 Nov 2013 23:36:49 +0000 Subject: [PATCH] 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) git-svn-id: svn://svn.freebsd.org/base/stable/10@257662 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f --- gnu/usr.bin/binutils/ld/Makefile | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/binutils/ld/Makefile b/gnu/usr.bin/binutils/ld/Makefile index 926bac42f..dff112169 100644 --- a/gnu/usr.bin/binutils/ld/Makefile +++ b/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 -- 2.45.0