mirror of
https://github.com/ivabus/pantry
synced 2024-11-23 00:45:07 +03:00
cgo needs a compiler
This commit is contained in:
parent
e984ec4e28
commit
81ada1744b
2 changed files with 20 additions and 0 deletions
12
projects/ipfs.tech/ldflags.diff
Normal file
12
projects/ipfs.tech/ldflags.diff
Normal file
|
@ -0,0 +1,12 @@
|
||||||
|
diff -ru a/cmd/ipfs/Rules.mk b/cmd/ipfs/Rules.mk
|
||||||
|
--- a/cmd/ipfs/Rules.mk 2023-01-23 17:23:00
|
||||||
|
+++ b/cmd/ipfs/Rules.mk 2023-01-23 17:23:21
|
||||||
|
@@ -13,7 +13,7 @@
|
||||||
|
# DEPS_OO_$(d) += merkledag/pb/merkledag.pb.go namesys/pb/namesys.pb.go
|
||||||
|
# DEPS_OO_$(d) += pin/internal/pb/header.pb.go unixfs/pb/unixfs.pb.go
|
||||||
|
|
||||||
|
-$(d)_flags =-ldflags="-X "github.com/ipfs/kubo".CurrentCommit=$(git-hash)"
|
||||||
|
+$(d)_flags =-ldflags="-X "github.com/ipfs/kubo".CurrentCommit=$(git-hash) -buildmode=pie"
|
||||||
|
|
||||||
|
$(d)-try-build $(IPFS_BIN_$(d)): GOFLAGS += $(cmd/ipfs_flags)
|
||||||
|
|
|
@ -11,8 +11,16 @@ versions:
|
||||||
build:
|
build:
|
||||||
dependencies:
|
dependencies:
|
||||||
tea.xyz/gx/make: '*'
|
tea.xyz/gx/make: '*'
|
||||||
|
tea.xyz/gx/cc: c99
|
||||||
go.dev: 1
|
go.dev: 1
|
||||||
|
gnu.org/patch: '*'
|
||||||
script: |
|
script: |
|
||||||
|
if test "{{hw.platform}}" = "linux"; then
|
||||||
|
# Need to pass -buildmode=pie to the build
|
||||||
|
# or segmentation fault
|
||||||
|
# fix found here https://github.com/docker-library/golang/issues/402#issuecomment-982204575
|
||||||
|
patch -p1 <props/ldflags.diff
|
||||||
|
fi
|
||||||
make build
|
make build
|
||||||
mkdir -p {{prefix}}/bin
|
mkdir -p {{prefix}}/bin
|
||||||
mv cmd/ipfs/ipfs {{prefix}}/bin
|
mv cmd/ipfs/ipfs {{prefix}}/bin
|
||||||
|
|
Loading…
Reference in a new issue