buildsys  Check-in [bdf6dfeb42]

Overview
Comment:Do not use LIB_LDFLAGS for .frameworks

Instead, use FRAMEWORK_LDFLAGS.

Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: bdf6dfeb42dce0a4a221d43f0796ad5ce0fcda979e88013f69a18afbaf09d5ea
User & Date: js on 2017-10-15 20:22:10
Other Links: manifest | tags
Context
2017-10-15
20:50
Use module.modulemap instead of module.map check-in: b4d7f6b2a0 user: js tags: trunk
20:22
Do not use LIB_LDFLAGS for .frameworks check-in: bdf6dfeb42 user: js tags: trunk
19:32
Include Info.plist in .framework check-in: 7dacde6581 user: js tags: trunk
Changes

Modified buildsys.mk.in from [c5732ed9ef] to [45df8377b9].

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
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







-







+





+
+







CPPFLAGS = @CPPFLAGS@
DFLAGS = @DFLAGS@
ERLCFLAGS = @ERLCFLAGS@
OBJCFLAGS = @OBJCFLAGS@
OBJCXXFLAGS = @OBJCXXFLAGS@
LDFLAGS = @LDFLAGS@
LDFLAGS_RPATH = @LDFLAGS_RPATH@
LDFLAGS_INSTALL_NAME = @LDFLAGS_INSTALL_NAME@
LIBS = @LIBS@
PYTHON_FLAGS = @PYTHON_FLAGS@
PROG_IMPLIB_NEEDED = @PROG_IMPLIB_NEEDED@
PROG_IMPLIB_LDFLAGS = @PROG_IMPLIB_LDFLAGS@
PROG_SUFFIX = @EXEEXT@
LIB_CFLAGS = @LIB_CFLAGS@
LIB_LDFLAGS = @LIB_LDFLAGS@
LIB_LDFLAGS_INSTALL_NAME = @LIB_LDFLAGS_INSTALL_NAME@
LIB_PREFIX = @LIB_PREFIX@
LIB_SUFFIX = @LIB_SUFFIX@
PLUGIN_CFLAGS = @PLUGIN_CFLAGS@
PLUGIN_LDFLAGS = @PLUGIN_LDFLAGS@
PLUGIN_SUFFIX = @PLUGIN_SUFFIX@
FRAMEWORK_LDFLAGS = @FRAMEWORK_LDFLAGS@
FRAMEWORK_LDFLAGS_INSTALL_NAME = @FRAMEWORK_LDFLAGS_INSTALL_NAME@
INSTALL_LIB = @INSTALL_LIB@
UNINSTALL_LIB = @UNINSTALL_LIB@
CLEAN_LIB = @CLEAN_LIB@
AS_DEPENDS = @AS_DEPENDS@
CC_DEPENDS = @CC_DEPENDS@
CXX_DEPENDS = @CXX_DEPENDS@
OBJC_DEPENDS = @OBJC_DEPENDS@
260
261
262
263
264
265
266
267

268
269
270
271
272
273
274
262
263
264
265
266
267
268

269
270
271
272
273
274
275
276







-
+







		cd $$dir; \
		${AR} x ../$$i; \
		for j in *.o; do \
			objs="$$objs $$dir/$$j"; \
		done; \
		cd ..; \
	done; \
	if ${LD} -o $@ $$objs ${LIB_LDFLAGS} ${LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
	if ${LD} -o $@ $$objs ${LIB_LDFLAGS} ${LIB_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
		${LINK_OK}; \
	else \
		${LINK_FAILED}; \
	fi; \
	for i in $$ars; do \
		dir=".$$(echo $$i | sed 's/\//_/g').objs"; \
		rm -fr $$dir; \
298
299
300
301
302
303
304
305

306
307
308
309
310
311
312
300
301
302
303
304
305
306

307
308
309
310
311
312
313
314







-
+







		for j in *.o; do \
			objs="$$objs $$dir/$$j"; \
		done; \
		cd ..; \
	done; \
	rm -fr $$out; \
	${MKDIR_P} $$out; \
	if ${LD} -o $$out/$${out%.framework} $$objs ${LIB_LDFLAGS} -Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework} ${LDFLAGS} ${LIBS}; then \
	if ${LD} -o $$out/$${out%.framework} $$objs ${FRAMEWORK_LDFLAGS} ${FRAMEWORK_LDFLAGS_INSTALL_NAME} ${LDFLAGS} ${LIBS}; then \
		${LINK_OK}; \
	else \
		rm -fr $$out; \
		${LINK_FAILED}; \
	fi; \
	for i in $$ars; do \
		dir=".$$(echo $$i | sed 's/\//_/g').objs"; \

Modified m4/buildsys.m4 from [fd2ba37db2] to [3eb613c258].

131
132
133
134
135
136
137

138
139
140
141
142
143
144


145
146
147
148
149
150
151
152

153
154
155
156
157
158


159
160
161
162
163
164
165
166

167
168
169
170
171
172


173
174
175
176
177
178
179
180

181
182
183
184
185
186


187
188
189
190
191
192
193
194

195
196
197
198
199
200


201
202
203
204
205
206
207
208

209
210
211
212
213
214


215
216
217
218
219
220
221
222

223
224
225
226
227
228
229


230
231
232
233
131
132
133
134
135
136
137
138
139
140
141

142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243

244
245
246
247
248
249
250
251
252







+



-



+
+








+






+
+








+






+
+








+






+
+








+






+
+








+






+
+








+



-



+
+




	AC_REQUIRE([AC_CANONICAL_HOST])
	AC_MSG_CHECKING(for shared library system)
	case "$host_os" in
		darwin*)
			AC_MSG_RESULT(Darwin)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
			LIB_PREFIX='lib'
			LIB_SUFFIX='.dylib'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			LDFLAGS_INSTALL_NAME='-Wl,-install_name,${libdir}/$${out%.dylib}.${LIB_MAJOR}.dylib'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-bundle -undefined dynamic_lookup'
			PLUGIN_SUFFIX='.bundle'
			FRAMEWORK_LDFLAGS='-dynamiclib -current_version ${LIB_MAJOR}.${LIB_MINOR} -compatibility_version ${LIB_MAJOR}'
			FRAMEWORK_LDFLAGS_INSTALL_NAME='-Wl,-install_name,@executable_path/../Frameworks/$$out/$${out%.framework}'
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib && ${LN_S} -f $${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.dylib ${DESTDIR}${libdir}/$${i%.dylib}.${LIB_MAJOR}.${LIB_MINOR}.dylib'
			CLEAN_LIB=''
			;;
		mingw* | cygwin*)
			AC_MSG_RESULT(MinGW / Cygwin)
			LIB_CFLAGS=''
			LIB_LDFLAGS='-shared -Wl,--export-all-symbols,--out-implib,${SHARED_LIB}.a'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.dll'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS=''
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.dll'
			FRAMEWORK_LDFLAGS=''
			FRAMEWORK_LDFLAGS_INSTALL_NAME=''
			INSTALL_LIB='&& ${MKDIR_P} ${DESTDIR}${bindir} && ${INSTALL} -m 755 $$i ${DESTDIR}${bindir}/$$i && ${INSTALL} -m 755 $$i.a ${DESTDIR}${libdir}/$$i.a'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${bindir}/$$i ${DESTDIR}${libdir}/$$i.a'
			CLEAN_LIB='${SHARED_LIB}.a'
			;;
		openbsd* | mirbsd*)
			AC_MSG_RESULT(OpenBSD)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so.${LIB_MAJOR}.${LIB_MINOR}'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			FRAMEWORK_LDFLAGS=''
			FRAMEWORK_LDFLAGS_INSTALL_NAME=''
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i'
			CLEAN_LIB=''
			;;
		solaris*)
			AC_MSG_RESULT(Solaris)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}.${LIB_MINOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			FRAMEWORK_LDFLAGS=''
			FRAMEWORK_LDFLAGS_INSTALL_NAME=''
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR} && rm -f ${DESTDIR}${libdir}/$$i && ${LN_S} $$i.${LIB_MAJOR}.${LIB_MINOR} ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}'
			CLEAN_LIB=''
			;;
		*-android*)
			AC_MSG_RESULT(Android)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH=''
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			FRAMEWORK_LDFLAGS=''
			FRAMEWORK_LDFLAGS_INSTALL_NAME=''
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			CLEAN_LIB=''
			;;
		*)
			AC_MSG_RESULT(ELF)
			LIB_CFLAGS='-fPIC -DPIC'
			LIB_LDFLAGS='-shared -Wl,-soname=${SHARED_LIB}.${LIB_MAJOR}'
			LIB_LDFLAGS_INSTALL_NAME=''
			LIB_PREFIX='lib'
			LIB_SUFFIX='.so'
			LDFLAGS_RPATH='-Wl,-rpath,${libdir}'
			PLUGIN_CFLAGS='-fPIC -DPIC'
			PLUGIN_LDFLAGS='-shared'
			PLUGIN_SUFFIX='.so'
			FRAMEWORK_LDFLAGS=''
			FRAMEWORK_LDFLAGS_INSTALL_NAME=''
			INSTALL_LIB='&& ${INSTALL} -m 755 $$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0 && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} && ${LN_S} -f $$i.${LIB_MAJOR}.${LIB_MINOR}.0 ${DESTDIR}${libdir}/$$i'
			UNINSTALL_LIB='&& rm -f ${DESTDIR}${libdir}/$$i ${DESTDIR}${libdir}/$$i.${LIB_MAJOR} ${DESTDIR}${libdir}/$$i.${LIB_MAJOR}.${LIB_MINOR}.0'
			CLEAN_LIB=''
			;;
	esac

	AC_SUBST(LIB_CFLAGS)
	AC_SUBST(LIB_LDFLAGS)
	AC_SUBST(LIB_LDFLAGS_INSTALL_NAME)
	AC_SUBST(LIB_PREFIX)
	AC_SUBST(LIB_SUFFIX)
	AC_SUBST(LDFLAGS_RPATH)
	AC_SUBST(LDFLAGS_INSTALL_NAME)
	AC_SUBST(PLUGIN_CFLAGS)
	AC_SUBST(PLUGIN_LDFLAGS)
	AC_SUBST(PLUGIN_SUFFIX)
	AC_SUBST(FRAMEWORK_LDFLAGS)
	AC_SUBST(FRAMEWORK_LDFLAGS_INSTALL_NAME)
	AC_SUBST(INSTALL_LIB)
	AC_SUBST(UNINSTALL_LIB)
	AC_SUBST(CLEAN_LIB)
])