From 964b04ba173da3184213301721b41e6dc74e96f5 Mon Sep 17 00:00:00 2001 From: jperkin Date: Wed, 27 Jun 2012 13:36:08 +0000 Subject: Ensure the Solaris native linker is used by default, avoids conflicts where GNU ld is picked up first via $PATH. --- mk/compiler.mk | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'mk/compiler.mk') diff --git a/mk/compiler.mk b/mk/compiler.mk index b7074d982e6..c8a28c4972c 100644 --- a/mk/compiler.mk +++ b/mk/compiler.mk @@ -1,4 +1,4 @@ -# $NetBSD: compiler.mk,v 1.75 2012/04/13 03:03:36 sbd Exp $ +# $NetBSD: compiler.mk,v 1.76 2012/06/27 13:36:08 jperkin Exp $ # # This Makefile fragment implements handling for supported C/C++/Fortran # compilers. @@ -131,6 +131,15 @@ _COMPILER_STRIP_VARS= # empty PKG_CPP:=${CPP} .endif +# Ensure the Solaris linker is used by default. +.if ${OPSYS} == "SunOS" +. if exists(/usr/ccs/bin/ld) +PKG_LD?= /usr/ccs/bin/ld +. elif exists(/usr/bin/ld) +PKG_LD?= /usr/bin/ld +. endif +.endif + # Strip the leading paths from the toolchain variables since we manipulate # the PATH to use the correct executable. # -- cgit v1.2.3