From e5817e65a2d360eb1089f384601e69ec0a54c16e Mon Sep 17 00:00:00 2001 From: jlam Date: Fri, 12 Nov 2004 05:02:41 +0000 Subject: Teach the native linker to accept "-pthread" by silently dropping it. This allows "-pthread" to be added to LDFLAGS for use by both the compiler and the linker. --- mk/wrapper/cmd-sink-ld | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) (limited to 'mk') diff --git a/mk/wrapper/cmd-sink-ld b/mk/wrapper/cmd-sink-ld index 1c62c6044e1..d260a9ea998 100644 --- a/mk/wrapper/cmd-sink-ld +++ b/mk/wrapper/cmd-sink-ld @@ -1,4 +1,4 @@ -# $NetBSD: cmd-sink-ld,v 1.1 2004/09/21 15:01:41 jlam Exp $ +# $NetBSD: cmd-sink-ld,v 1.2 2004/11/12 05:02:41 jlam Exp $ # # Copyright (c) 2004 The NetBSD Foundation, Inc. # All rights reserved. @@ -37,7 +37,7 @@ # Empty out the command buffer and build up the command line in $cmd. while ! queue_is_empty cmdbuf; do pop_queue cmdbuf arg - $debug_log $wrapperlog " (cmd-sink-ld) pop: $arg" + $debug_log $wrapperlog " (cmd-sink-ld) pop: $arg" case $arg in ############################################################ # Strip the "-Wl," from arguments that start with that prefix @@ -56,10 +56,19 @@ while ! queue_is_empty cmdbuf; do done IFS="${save_IFS}" for opt in $revlist; do - $debug_log $wrapperlog " (cmd-sink-ld) pre: $opt" + $debug_log $wrapperlog " (cmd-sink-ld) pre: $opt" prepend_queue cmdbuf "$opt" done ;; + ############################################################ + # Silently accept "-pthread" by dropping them. This allows + # "-pthread" to be added to LDFLAGS for use by both the + # compiler and the linker. + ############################################################ + -pthread) + $debug_log $wrapperlog " (cmd-sink-ld) drop: $arg" + arg= + ;; *) . $buildcmd ;; -- cgit v1.2.3