From: Ian Lance Taylor Date: Sat, 19 Nov 2016 02:14:11 +0000 (-0800) Subject: misc/cgo/testcshared: add explicit ./ to shared library argument X-Git-Tag: go1.8beta1~96 X-Git-Url: http://www.git.cypherpunks.su/?a=commitdiff_plain;h=7dc97d9e328edc800e2ce41d5b211ef4e0ef41d0;p=gostls13.git misc/cgo/testcshared: add explicit ./ to shared library argument Use an explicit ./ to make sure we link against the libgo.so we just built, not some other libgo.so that the compiler or linker may decide to seek out. Fixes #17986. Change-Id: Id23f6c95aa2b52f4f42c1b6dac45482c22b4290d Reviewed-on: https://go-review.googlesource.com/33413 Run-TryBot: Ian Lance Taylor TryBot-Result: Gobot Gobot Reviewed-by: Brad Fitzpatrick --- diff --git a/misc/cgo/testcshared/test.bash b/misc/cgo/testcshared/test.bash index e4bb7d33f9..052ee0e758 100755 --- a/misc/cgo/testcshared/test.bash +++ b/misc/cgo/testcshared/test.bash @@ -105,7 +105,7 @@ status=0 # test0: exported symbols in shared lib are accessible. # TODO(iant): using _shared here shouldn't really be necessary. -$(go env CC) ${GOGCCFLAGS} -I ${installdir} -o testp main0.c libgo.$libext +$(go env CC) ${GOGCCFLAGS} -I ${installdir} -o testp main0.c ./libgo.$libext binpush testp output=$(run LD_LIBRARY_PATH=. ./testp)