Cleanup CGO_*FLAGS
Use CGO_CPPFLAGS, remove non-ld options from CGO_LDFLAGS.
This commit is contained in:
parent
27fab38b87
commit
029373835c
|
@ -272,8 +272,9 @@ else
|
|||
# Do not install if only downloading
|
||||
:
|
||||
elif [[ "${status}" -eq 0 ]] ; then
|
||||
cgo_cflags="-g -O2 -I${linkpath}/bindings/c"
|
||||
cgo_ldflags="-g -O2 -L${FDBLIBDIR}"
|
||||
cgo_cppflags="-I${linkpath}/bindings/c"
|
||||
cgo_cflags="-g -O2"
|
||||
cgo_ldflags="-L${FDBLIBDIR}"
|
||||
fdb_go_path="${REMOTE}/${FDBREPO}/bindings/go/src"
|
||||
|
||||
if [[ ! -e "${FDBLIBDIR}/${libfdbc}" ]] ; then
|
||||
|
@ -282,7 +283,7 @@ else
|
|||
echo "WARNING: The FoundationDB C library was not found within ${FDBLIBDIR}."
|
||||
echo "Your installation may be incomplete."
|
||||
echo
|
||||
elif ! CGO_CFLAGS="${cgo_cflags}" CGO_LDFLAGS="${cgo_ldflags}" go install "${fdb_go_path}/fdb" "${fdb_go_path}/fdb/tuple" "${fdb_go_path}/fdb/subspace" "${fdb_go_path}/fdb/directory" ; then
|
||||
elif ! CGO_CPPFLAGS="${cgo_cppflags}" CGO_CFLAGS="${cgo_cflags}" CGO_LDFLAGS="${cgo_ldflags}" go install "${fdb_go_path}/fdb" "${fdb_go_path}/fdb/tuple" "${fdb_go_path}/fdb/subspace" "${fdb_go_path}/fdb/directory" ; then
|
||||
let status="${status} + 1"
|
||||
echo "Could not build FoundationDB go libraries."
|
||||
fi
|
||||
|
@ -295,6 +296,7 @@ else
|
|||
echo "The FoundationDB go bindings were successfully installed."
|
||||
echo "To build packages which use the go bindings, you will need to"
|
||||
echo "set the following environment variables:"
|
||||
echo " CGO_CPPFLAGS=\"${cgo_cppflags}\""
|
||||
echo " CGO_CFLAGS=\"${cgo_cflags}\""
|
||||
echo " CGO_LDFLAGS=\"${cgo_ldflags}\""
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue