Skip to content

Commit

Permalink
x
Browse files Browse the repository at this point in the history
  • Loading branch information
bassosimone committed Dec 13, 2023
1 parent d362eca commit c52bc26
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 0 deletions.
1 change: 1 addition & 0 deletions internal/cmd/buildtool/linuxstatic.go
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ func linuxStaticBuildPackage(
envp.Append("CGO_ENABLED", "1")
envp.Append("GOOS", "linux")
envp.Append("GOARCH", goarch)
envp.Append("CGO_CFLAGS", "-D_LARGEFILE64_SOURCE")
if goarm > 0 {
envp.Append("GOARM", strconv.FormatInt(goarm, 10))
}
Expand Down
8 changes: 8 additions & 0 deletions internal/cmd/buildtool/linuxstatic_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"CGO_ENABLED=1",
"GOARCH=arm64",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-tags", "ooni_psiphon_config",
Expand All @@ -62,6 +63,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"CGO_ENABLED=1",
"GOARCH=arm64",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-tags", "ooni_psiphon_config",
Expand All @@ -84,6 +86,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"CGO_ENABLED=1",
"GOARCH=amd64",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-ldflags", "-s -w -extldflags -static",
Expand All @@ -96,6 +99,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"CGO_ENABLED=1",
"GOARCH=amd64",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-ldflags", "-s -w -extldflags -static",
Expand All @@ -118,6 +122,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"GOARCH=arm",
"GOARM=7",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-tags", "ooni_psiphon_config",
Expand All @@ -132,6 +137,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"GOARCH=arm",
"GOARM=7",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-tags", "ooni_psiphon_config",
Expand All @@ -155,6 +161,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"GOARCH=arm",
"GOARM=6",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-ldflags", "-s -w -extldflags -static",
Expand All @@ -168,6 +175,7 @@ func TestLinuxStaticBuildAll(t *testing.T) {
"GOARCH=arm",
"GOARM=6",
"GOOS=linux",
"CGO_CFLAGS=-D_LARGEFILE64_SOURCE",
},
Argv: []string{
"go", "build", "-ldflags", "-s -w -extldflags -static",
Expand Down

0 comments on commit c52bc26

Please sign in to comment.