summaryrefslogtreecommitdiff
path: root/mk/wrapper/cmd-sink-irix-ld
blob: 1e5579efab6e9aa0ab85553570bc71e670229f9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
# $NetBSD: cmd-sink-irix-ld,v 1.1 2008/02/19 17:36:51 tnn Exp $

# 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-irix-ld) pop:  $arg"
	case $arg in
	-R*|-Wl,-R*|-Wl,-rpath,*|-Wl,-rpath-link,*|-Wl,--rpath,*)
		case $arg in
		-R*)			R="-R" ;;
		-Wl,-R*)		R="-Wl,-R" ;;
		-Wl,-rpath,*)		R="-Wl,-rpath," ;;
		-Wl,-rpath-link,*)	R="-Wl,-rpath-link," ;;
		-Wl,--rpath,*)		R="-Wl,--rpath," ;;
		esac
		dir="${arg#$R}"
		arg="-rpath"
		. $buildcmd
		arg="$dir"
		. $buildcmd
		;;
	*)
		. $buildcmd
		;;
	esac
done