summaryrefslogtreecommitdiff
blob: bd7d7e6116c376ab219991934014dc573833fb3c (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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
Index: work/share/mk/bsd.lib.mk
===================================================================
--- work.orig/share/mk/bsd.lib.mk
+++ work/share/mk/bsd.lib.mk
@@ -146,11 +146,7 @@ _LIBS=		lib${LIB}.a
 lib${LIB}.a: ${OBJS} ${STATICOBJS}
 	@${ECHO} building static ${LIB} library
 	@rm -f ${.TARGET}
-.if !defined(NM)
-	@${AR} cq ${.TARGET} `lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
-.else
-	@${AR} cq ${.TARGET} `NM='${NM}' lorder ${OBJS} ${STATICOBJS} | tsort -q` ${ARADD}
-.endif
+	@${AR} cq ${.TARGET} ${OBJS} ${STATICOBJS} ${ARADD}
 	${RANLIB} ${.TARGET}
 .endif
 
@@ -163,11 +159,7 @@ POBJS+=		${OBJS:.o=.po} ${STATICOBJS:.o=
 lib${LIB}_p.a: ${POBJS}
 	@${ECHO} building profiled ${LIB} library
 	@rm -f ${.TARGET}
-.if !defined(NM)
-	@${AR} cq ${.TARGET} `lorder ${POBJS} | tsort -q` ${ARADD}
-.else
-	@${AR} cq ${.TARGET} `NM='${NM}' lorder ${POBJS} | tsort -q` ${ARADD}
-.endif
+	@${AR} cq ${.TARGET} ${POBJS} ${ARADD}
 	${RANLIB} ${.TARGET}
 .endif
 
@@ -189,15 +181,9 @@ ${SHLIB_NAME}: ${SOBJS}
 .if defined(SHLIB_LINK)
 	@ln -fs ${.TARGET} ${SHLIB_LINK}
 .endif
-.if !defined(NM)
 	@${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
 	    -o ${.TARGET} -Wl,-soname,${SONAME} \
-	    `lorder ${SOBJS} | tsort -q` ${LDADD}
-.else
-	@${CC} ${LDFLAGS} ${SSP_CFLAGS} -shared -Wl,-x \
-	    -o ${.TARGET} -Wl,-soname,${SONAME} \
-	    `NM='${NM}' lorder ${SOBJS} | tsort -q` ${LDADD}
-.endif
+	    `echo ${SOBJS} | xargs -n 1 echo | sort -u` ${LDADD}
 	@[ -z "${CTFMERGE}" -o -n "${NO_CTF}" ] || \
 		(${ECHO} ${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS} && \
 		${CTFMERGE} ${CTFFLAGS} -o ${.TARGET} ${SOBJS})
@@ -245,13 +231,6 @@ _EXTRADEPEND:
 
 .if !target(install)
 
-.if defined(PRECIOUSLIB)
-.if !defined(NO_FSCHG)
-SHLINSTALLFLAGS+= -fschg
-.endif
-SHLINSTALLFLAGS+= -S
-.endif
-
 _INSTALLFLAGS:=	${INSTALLFLAGS}
 .for ie in ${INSTALLFLAGS_EDIT}
 _INSTALLFLAGS:=	${_INSTALLFLAGS${ie}}
Index: work/share/mk/bsd.prog.mk
===================================================================
--- work.orig/share/mk/bsd.prog.mk
+++ work/share/mk/bsd.prog.mk
@@ -134,13 +134,6 @@ _EXTRADEPEND:
 
 .if !target(install)
 
-.if defined(PRECIOUSPROG)
-.if !defined(NO_FSCHG)
-INSTALLFLAGS+= -fschg
-.endif
-INSTALLFLAGS+= -S
-.endif
-
 _INSTALLFLAGS:=	${INSTALLFLAGS}
 .for ie in ${INSTALLFLAGS_EDIT}
 _INSTALLFLAGS:=	${_INSTALLFLAGS${ie}}