summaryrefslogtreecommitdiff
path: root/mk/compiler.mk
diff options
context:
space:
mode:
Diffstat (limited to 'mk/compiler.mk')
-rw-r--r--mk/compiler.mk11
1 files changed, 10 insertions, 1 deletions
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.
#