1
0
mirror of https://github.com/golang/go synced 2024-10-03 08:11:27 -06:00
go/misc/cgo/testso/test.bash
Francisco Souza dc57ed8caf misc/cgo: re-enable testso
The test.bash file generates .so file using gcc, builds the executable
using the go tool and then run it with the $LD_LIBRARY_PATH variable
pointing to the directory where the .so file lives.

Fixes #2982.

R=rsc, remyoudompheng
CC=golang-dev
https://golang.org/cl/5788043
2012-03-08 12:13:41 -05:00

11 lines
294 B
Bash
Executable File

#!/bin/sh
# Copyright 2011 The Go Authors. All rights reserved.
# Use of this source code is governed by a BSD-style
# license that can be found in the LICENSE file.
set -e
gcc -fPIC -g -shared -o libcgosotest.so cgoso_c.c
go build main.go
LD_LIBRARY_PATH=. ./main
rm -f libcgosotest.so main