mirror of
https://github.com/glebarez/go-sqlite.git
synced 2025-10-04 23:42:40 +08:00
freebsd/amd64: initial port, GO111MODULE=off only, updates libc#10.
This commit is contained in:
5
Makefile
5
Makefile
@@ -37,6 +37,7 @@ all: editor
|
|||||||
build_all_targets:
|
build_all_targets:
|
||||||
GOOS=darwin GOARCH=amd64 go build -v ./...
|
GOOS=darwin GOARCH=amd64 go build -v ./...
|
||||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||||
|
GOOS=freebsd GOARCH=amd64 go build -v ./...
|
||||||
GOOS=linux GOARCH=386 go build -v ./...
|
GOOS=linux GOARCH=386 go build -v ./...
|
||||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||||
GOOS=linux GOARCH=arm go build -v ./...
|
GOOS=linux GOARCH=arm go build -v ./...
|
||||||
@@ -54,6 +55,10 @@ darwin_arm64:
|
|||||||
TARGET_GOOS=darwin TARGET_GOARCH=arm64 go generate 2>&1 | tee /tmp/log-generate-sqlite-darwin-arm64
|
TARGET_GOOS=darwin TARGET_GOARCH=arm64 go generate 2>&1 | tee /tmp/log-generate-sqlite-darwin-arm64
|
||||||
GOOS=darwin GOARCH=arm64 go build -v ./...
|
GOOS=darwin GOARCH=arm64 go build -v ./...
|
||||||
|
|
||||||
|
freebsd_amd64:
|
||||||
|
TARGET_GOOS=freebsd TARGET_GOARCH=amd64 go generate 2>&1 | tee /tmp/log-generate-sqlite-freebsd-amd64
|
||||||
|
GOOS=freebsd GOARCH=amd64 go build -v ./...
|
||||||
|
|
||||||
linux_amd64:
|
linux_amd64:
|
||||||
TARGET_GOOS=linux TARGET_GOARCH=amd64 go generate 2>&1 | tee /tmp/log-generate-sqlite-linux-amd64
|
TARGET_GOOS=linux TARGET_GOARCH=amd64 go generate 2>&1 | tee /tmp/log-generate-sqlite-linux-amd64
|
||||||
GOOS=linux GOARCH=amd64 go build -v ./...
|
GOOS=linux GOARCH=amd64 go build -v ./...
|
||||||
|
@@ -625,6 +625,7 @@ outer:
|
|||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fmt.Printf("exec: %s db --trace 2 %s\n", filepath.FromSlash(bin), script)
|
||||||
out, err := exec.Command(filepath.FromSlash(bin), "db", "--trace", "2", script).CombinedOutput()
|
out, err := exec.Command(filepath.FromSlash(bin), "db", "--trace", "2", script).CombinedOutput()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
t.Fatalf("%s\n%v", out, err)
|
t.Fatalf("%s\n%v", out, err)
|
||||||
|
@@ -399,7 +399,7 @@ func main() {
|
|||||||
configTest = append(configTest, "-DSQLITE_MUTEX_NOOP")
|
configTest = append(configTest, "-DSQLITE_MUTEX_NOOP")
|
||||||
}
|
}
|
||||||
switch goos {
|
switch goos {
|
||||||
case "linux":
|
case "linux", "freebsd":
|
||||||
configProduction = append(configProduction, "-DSQLITE_OS_UNIX=1")
|
configProduction = append(configProduction, "-DSQLITE_OS_UNIX=1")
|
||||||
case "darwin":
|
case "darwin":
|
||||||
configProduction = append(configProduction,
|
configProduction = append(configProduction,
|
||||||
@@ -447,7 +447,7 @@ func configure(goos, goarch string) {
|
|||||||
cmd.Run()
|
cmd.Run()
|
||||||
var args []string
|
var args []string
|
||||||
switch goos {
|
switch goos {
|
||||||
case "linux":
|
case "linux", "freebsd":
|
||||||
// nop
|
// nop
|
||||||
case "darwin":
|
case "darwin":
|
||||||
args = append(args, "--with-tcl=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework")
|
args = append(args, "--with-tcl=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework")
|
||||||
|
21
internal/libc2/capi_freebsd_amd64.go
Normal file
21
internal/libc2/capi_freebsd_amd64.go
Normal file
@@ -0,0 +1,21 @@
|
|||||||
|
// Copyright 2021 The Sqlite Authors. All rights reserved.
|
||||||
|
// Use of this source code is governed by a BSD-style
|
||||||
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
|
package libc2 // import "modernc.org/sqlite/internal/libc2"
|
||||||
|
|
||||||
|
var CAPI = map[string]struct{}{
|
||||||
|
"pthread_cond_broadcast": {},
|
||||||
|
"pthread_cond_destroy": {},
|
||||||
|
"pthread_cond_init": {},
|
||||||
|
"pthread_cond_signal": {},
|
||||||
|
"pthread_cond_wait": {},
|
||||||
|
"pthread_create": {},
|
||||||
|
"pthread_detach": {},
|
||||||
|
"pthread_mutex_destroy": {},
|
||||||
|
"pthread_mutex_init": {},
|
||||||
|
"pthread_mutex_lock": {},
|
||||||
|
"pthread_mutex_trylock": {},
|
||||||
|
"pthread_mutex_unlock": {},
|
||||||
|
"sched_yield": {},
|
||||||
|
}
|
@@ -2,8 +2,8 @@
|
|||||||
// Use of this source code is governed by a BSD-style
|
// Use of this source code is governed by a BSD-style
|
||||||
// license that can be found in the LICENSE file.
|
// license that can be found in the LICENSE file.
|
||||||
|
|
||||||
//go:build linux || darwin
|
//go:build linux || darwin || freebsd
|
||||||
// +build linux darwin
|
// +build linux darwin freebsd
|
||||||
|
|
||||||
package libc2 // import "modernc.org/sqlite/internal/libc2"
|
package libc2 // import "modernc.org/sqlite/internal/libc2"
|
||||||
|
|
||||||
|
5758
internal/mptest/main_freebsd_amd64.go
Normal file
5758
internal/mptest/main_freebsd_amd64.go
Normal file
File diff suppressed because it is too large
Load Diff
80367
internal/testfixture/testfixture_freebsd_amd64.go
Normal file
80367
internal/testfixture/testfixture_freebsd_amd64.go
Normal file
File diff suppressed because one or more lines are too long
1305
lib/capi_freebsd_amd64.go
Normal file
1305
lib/capi_freebsd_amd64.go
Normal file
File diff suppressed because it is too large
Load Diff
189971
lib/sqlite_freebsd_amd64.go
Normal file
189971
lib/sqlite_freebsd_amd64.go
Normal file
File diff suppressed because one or more lines are too long
1346
libtest/capi_freebsd_amd64.go
Normal file
1346
libtest/capi_freebsd_amd64.go
Normal file
File diff suppressed because it is too large
Load Diff
193684
libtest/sqlite_freebsd_amd64.go
Normal file
193684
libtest/sqlite_freebsd_amd64.go
Normal file
File diff suppressed because one or more lines are too long
6233
speedtest1/main_freebsd_amd64.go
Normal file
6233
speedtest1/main_freebsd_amd64.go
Normal file
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user