diff options
author | jlam <jlam@pkgsrc.org> | 2004-11-12 05:02:41 +0000 |
---|---|---|
committer | jlam <jlam@pkgsrc.org> | 2004-11-12 05:02:41 +0000 |
commit | e5817e65a2d360eb1089f384601e69ec0a54c16e (patch) | |
tree | b07580614bec1abd8ee9a6b3c881e220b9d358fc /mk | |
parent | 88b9364ed30e4b0ad673ef8c4e8634d5fb8df3e2 (diff) | |
download | pkgsrc-e5817e65a2d360eb1089f384601e69ec0a54c16e.tar.gz |
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.
Diffstat (limited to 'mk')
-rw-r--r-- | mk/wrapper/cmd-sink-ld | 15 |
1 files changed, 12 insertions, 3 deletions
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 ;; |