1 #!/usr/bin/sh 2 # 3 # CDDL HEADER START 4 # 5 # The contents of this file are subject to the terms of the 6 # Common Development and Distribution License, Version 1.0 only 7 # (the "License"). You may not use this file except in compliance 8 # with the License. 9 # 10 # You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE 11 # or http://www.opensolaris.org/os/licensing. 12 # See the License for the specific language governing permissions 13 # and limitations under the License. 14 # 15 # When distributing Covered Code, include this CDDL HEADER in each 16 # file and include the License file at usr/src/OPENSOLARIS.LICENSE. 17 # If applicable, add the following below this CDDL HEADER, with the 18 # fields enclosed by brackets "[]" replaced with your own identifying 19 # information: Portions Copyright [yyyy] [name of copyright owner] 20 # 21 # CDDL HEADER END 22 # 23 # Copyright (c) 1984, 1986, 1987, 1988, 1989 AT&T 24 # All Rights Reserved 25 26 27 #ident "%Z%%M% %I% %E% SMI" /* SVr4.0 1.7 */ 28 29 # Copyright (c) 1984 AT&T 30 # All Rights Reserved 31 32 33 # Portions Copyright(c) 1988, Sun Microsystems, Inc. 34 # All Rights Reserved 35 36 # ld command for BSD compatibility package: 37 # 38 # BSD compatibility package libraries (/usr/ucblib) are 39 # searched next to third to last. SVr4 default libraries 40 # (/usr/ccs/lib and /usr/lib) are searched next to last and 41 # last respectively. 42 # 43 # Because the BSD compatibility package C library does not 44 # contain all the C library routines of /usr/ccs/lib/libc.a, 45 # the BSD package C library is named /usr/ucblib/libucb.a 46 # and is passed explicitly to ld. This ensures that libucb.a 47 # will be searched first for routines and that 48 # /usr/ccs/lib/libc.a will be searched afterwards for routines 49 # not found in /usr/ucblib/libucb.a. Also because sockets is 50 # provided in libc under BSD, /usr/lib/libsocket and /usr/lib/nsl 51 # are also included as default libraries. 52 # 53 # NOTE: the -Y L, and -Y U, options of ld are not valid 54 55 opts= 56 LIBS="-lucb -lresolv -lsocket -lnsl -lelf" 57 58 if [ $# -eq 0 ] 59 then 60 exit 1 61 elif [ $# -gt 0 ] 62 then 63 for i in $* 64 do 65 case $i in 66 -r) 67 LIBS="" 68 opts="$opts $i" 69 shift;; 70 *) 71 opts="$opts $i" 72 shift;; 73 esac 74 done 75 fi 76 77 LD_RUN_PATH=/usr/ucblib /usr/ccs/bin/ld -YP,:/usr/ucblib:/usr/ccs/lib:/usr/lib $opts $LIBS 78