freebsd/amd64: initial port, GO111MODULE=off only, updates libc#10.

This commit is contained in:
Jan Mercl
2021-09-04 21:39:54 +02:00
parent 3e252fa613
commit 65c49f4def
12 changed files with 478695 additions and 4 deletions

View File

@@ -37,6 +37,7 @@ all: editor
build_all_targets:
GOOS=darwin GOARCH=amd64 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=amd64 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
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:
TARGET_GOOS=linux TARGET_GOARCH=amd64 go generate 2>&1 | tee /tmp/log-generate-sqlite-linux-amd64
GOOS=linux GOARCH=amd64 go build -v ./...

View File

@@ -625,6 +625,7 @@ outer:
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()
if err != nil {
t.Fatalf("%s\n%v", out, err)

View File

@@ -399,7 +399,7 @@ func main() {
configTest = append(configTest, "-DSQLITE_MUTEX_NOOP")
}
switch goos {
case "linux":
case "linux", "freebsd":
configProduction = append(configProduction, "-DSQLITE_OS_UNIX=1")
case "darwin":
configProduction = append(configProduction,
@@ -447,7 +447,7 @@ func configure(goos, goarch string) {
cmd.Run()
var args []string
switch goos {
case "linux":
case "linux", "freebsd":
// nop
case "darwin":
args = append(args, "--with-tcl=/Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/System/Library/Frameworks/Tcl.framework")

View 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": {},
}

View File

@@ -2,8 +2,8 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
//go:build linux || darwin
// +build linux darwin
//go:build linux || darwin || freebsd
// +build linux darwin freebsd
package libc2 // import "modernc.org/sqlite/internal/libc2"

File diff suppressed because it is too large Load Diff

File diff suppressed because one or more lines are too long

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

File diff suppressed because one or more lines are too long

File diff suppressed because it is too large Load Diff

193684
libtest/sqlite_freebsd_amd64.go Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long