Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 88596 | Differences between
and this patch

Collapse All | Expand All

(-)file_not_specified_in_diff (-7 / +75 lines)
Line  Link Here
0
-- butt/ltmain.in
0
++ monkey/ltmain.in
Lines 214-219 Link Here
214
}
214
}
215
215
216
216
217
# Ripped from libtool.m4 to address hardcoding of toolchain paths.
218
# http://bugs.gentoo.org/88596
219
get_shared_dep_info() {
220
	ret=0 pre_test_object_deps_done="no"
221
	compiler_lib_search_path="" predeps_objects="" postdeps_objects=""
222
223
	# Only support CXX atm, and only use this hack on a Gentoo system
224
	tag=$1 shift
225
	request=$1 shift
226
	if test -f /etc/gentoo-release && test "X$tag" = "XCXX" ; then
227
228
	echo 'class Foo{public:Foo(void){a=0;}private:int a;};' > .my_conftest.cpp || ret=1
229
	${CC} -c -o .my_conftest.${objext} .my_conftest.cpp &> /dev/null || ret=1
230
231
	output=`${CC} -shared -v -o .my_conftest.so .my_conftest.${objext} 2>&1 | grep "\-L"` || ret=1
232
	for p in $output ; do
233
		case $p in
234
		-L* | -R* | -l*)
235
			if test "$p" = "-L" || test "$p" = "-R" ; then
236
				prev=$p
237
				continue
238
			else
239
				prev=
240
			fi
241
			if test "$pre_test_object_deps_done" = no; then
242
				case $p in
243
				-L* | -R*) compiler_lib_search_path="${compiler_lib_search_path} ${prev}${p}";;
244
				esac
245
			else
246
				postdeps="${postdeps} ${prev}${p}"
247
			fi
248
		;;
249
		*.${objext})
250
			if test "$p" = ".my_conftest.$objext"; then
251
				pre_test_object_deps_done=yes
252
				continue
253
			fi
254
			if test "$pre_test_object_deps_done" = no; then
255
				predep_objects="$predep_objects $p"
256
			else
257
				postdep_objects="$postdep_objects $p"
258
			fi
259
		;;
260
		*) ;;
261
		esac
262
	done
263
264
	rm -f .my_conftest.*
265
266
	else
267
		ret=1
268
	fi
269
270
	if test "X$ret" != "X0" ; then
271
		request=boo
272
	fi
273
274
	case $request in
275
		pre)     echo $predeps;;
276
		post)    echo $postdeps;;
277
		comp)    echo $compiler_lib_search_path;;
278
		preobj)  echo $predep_objects;;
279
		postobj) echo $postdep_objects;;
280
		*)       echo $@ ;;
281
	esac
282
}
283
284
217
# func_infer_tag arg
285
# func_infer_tag arg
218
# Infer tagged configuration to use if any are available and
286
# Infer tagged configuration to use if any are available and
219
# if one wasn't chosen via the "--tag" command line option.
287
# if one wasn't chosen via the "--tag" command line option.
220
-- butt/libtool.m4
288
++ monkey/libtool.m4
Lines 4411-4433 Link Here
4411
4411
4412
# Dependencies to place before the objects being linked to create a
4412
# Dependencies to place before the objects being linked to create a
4413
# shared library.
4413
# shared library.
4414
predep_objects=$lt_[]_LT_AC_TAGVAR(predep_objects, $1)
4414
predep_objects=\`test x"$1" != x"" && get_shared_dep_info $1 preobj $lt_[]_LT_AC_TAGVAR(predep_objects, $1)\`
4415
4415
4416
# Dependencies to place after the objects being linked to create a
4416
# Dependencies to place after the objects being linked to create a
4417
# shared library.
4417
# shared library.
4418
postdep_objects=$lt_[]_LT_AC_TAGVAR(postdep_objects, $1)
4418
postdep_objects=\`test x"$1" != x"" && get_shared_dep_info $1 postobj $lt_[]_LT_AC_TAGVAR(postdep_objects, $1)\`
4419
4419
4420
# Dependencies to place before the objects being linked to create a
4420
# Dependencies to place before the objects being linked to create a
4421
# shared library.
4421
# shared library.
4422
predeps=$lt_[]_LT_AC_TAGVAR(predeps, $1)
4422
predeps=\`test x"$1" != x"" && get_shared_dep_info $1 pre $lt_[]_LT_AC_TAGVAR(predeps, $1)\`
4423
4423
4424
# Dependencies to place after the objects being linked to create a
4424
# Dependencies to place after the objects being linked to create a
4425
# shared library.
4425
# shared library.
4426
postdeps=$lt_[]_LT_AC_TAGVAR(postdeps, $1)
4426
postdeps=\`test x"$1" != x"" && get_shared_dep_info $1 post $lt_[]_LT_AC_TAGVAR(postdeps, $1)\`
4427
4427
4428
# The library search path used internally by the compiler when linking
4428
# The library search path used internally by the compiler when linking
4429
# a shared library.
4429
# a shared library.
4430
compiler_lib_search_path=$lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)
4430
compiler_lib_search_path=\`test x"$1" != x"" && get_shared_dep_info $1 comp $lt_[]_LT_AC_TAGVAR(compiler_lib_search_path, $1)\`
4431
4431
4432
# Method to check whether dependent libraries are shared objects.
4432
# Method to check whether dependent libraries are shared objects.
4433
deplibs_check_method=$lt_deplibs_check_method
4433
deplibs_check_method=$lt_deplibs_check_method

Return to bug 88596