diff options
| author | 2024-04-17 17:10:51 +0100 | |
|---|---|---|
| committer | 2024-04-17 17:10:51 +0100 | |
| commit | b3f2d441439af9d36096d11036220136588def43 (patch) | |
| tree | 87e7f8808fed70fa6b3d303bd139f03de67b8621 /vendor/modernc.org/libc/Makefile | |
| parent | update to set requesting account when deleting status (#2849) (diff) | |
| download | gotosocial-b3f2d441439af9d36096d11036220136588def43.tar.xz | |
bump to modernc.org/sqlite v1.29.7 (#2850)
Diffstat (limited to 'vendor/modernc.org/libc/Makefile')
| -rw-r--r-- | vendor/modernc.org/libc/Makefile | 265 |
1 files changed, 92 insertions, 173 deletions
diff --git a/vendor/modernc.org/libc/Makefile b/vendor/modernc.org/libc/Makefile index 1b87fd28a..69467cfca 100644 --- a/vendor/modernc.org/libc/Makefile +++ b/vendor/modernc.org/libc/Makefile @@ -1,197 +1,116 @@ -# Copyright 2019 The Libc Authors. All rights reserved. +# Copyright 2024 The Libc Authors. All rights reserved. # Use of this source code is governed by a BSD-style # license that can be found in the LICENSE file. -.PHONY: all bench build_all_targets clean cover cpu editor internalError later mem nuke todo edit work devbench \ - darwin_amd64 \ - darwin_arm64 \ - linux_386 \ - linux_amd64 \ - linux_arm \ - linux_arm64 \ - strace \ +.PHONY: all build_all_targets check clean download edit editor generate dev membrk-test test work xtest short-test xlibc libc-test surface +SHELL=/bin/bash -o pipefail -grep=--include=*.go --include=*.l --include=*.y --include=*.yy --include=*.qbe --include=*.ssa -ngrep='internalError\|TODOOK' -log=log-$(shell go env GOOS)-$(shell go env GOARCH) +DIR = /tmp/libc +TAR = musl-7ada6dde6f9dc6a2836c3d92c2f762d35fd229e0.tar.gz +URL = https://git.musl-libc.org/cgit/musl/snapshot/$(TAR) -all: - date - go version 2>&1 | tee $(log) - go generate - gofmt -l -s -w *.go - go install -v ./... - go test - go test 2>&1 -timeout 1h | tee -a $(log) - # go vet -unsafeptr=false 2>&1 | grep -v $(ngrep) || true - # golint 2>&1 | grep -v $(ngrep) || true - # make todo - # misspell *.go - # staticcheck || true - grep -n 'FAIL\|PASS' $(log) - go version - date 2>&1 | tee -a $(log) +all: editor + golint 2>&1 + staticcheck 2>&1 build_all_targets: ./build_all_targets.sh echo done -darwin_amd64: - @echo "Should be executed only on darwin/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - -darwin_arm64: - @echo "Should be executed only on darwin/arm64." - go generate 2>&1 | tee log-generate - go build -v ./... - -# only on freebsd/amd64 -freebsd_amd64: - @echo "Should be executed only on freebsd/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - -# only on freebsd/386 -freebsd_386: - @echo "Should be executed only on freebsd/386." - go generate 2>&1 | tee log-generate - go build -v ./... - -# only on freebsd/arm -freebsd_arm: - @echo "Should be executed only on freebsd/arm." - go generate 2>&1 | tee log-generate - go build -v ./... - -freebsd_arm64: - go run addport.go freebsd_amd64 freebsd_arm64 - go build -v ./... - -# only on netbsd/amd64 -netbsd_amd64: - @echo "Should be executed only on netbsd/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - -# only on netbsd/arm -netbsd_arm: - @echo "Should be executed only on netbsd/arm." - go generate 2>&1 | tee log-generate - go build -v ./... - -linux_amd64: - @echo "Should be executed only on linux/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - -linux_386: - CCGO_CPP=i686-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=386 go generate - GOOS=linux GOARCH=386 go build -v ./... - -linux_arm: - CCGO_CPP=arm-linux-gnueabi-cpp TARGET_GOOS=linux TARGET_GOARCH=arm go generate - GOOS=linux GOARCH=arm go build -v ./... - -linux_arm64: - CCGO_CPP=aarch64-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=arm64 go generate - GOOS=linux GOARCH=arm64 go build -v ./... - -linux_s390x: - CCGO_CPP=s390x-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=s390x go generate - GOOS=linux GOARCH=s390x go build -v ./... - -linux_ppc64le: - CCGO_CPP=powerpc64le-linux-gnu-cpp TARGET_GOOS=linux TARGET_GOARCH=ppc64le go generate - GOOS=linux GOARCH=ppc64le go build -v ./... - -# only on openbsd/amd64 -openbsd_amd64: - @echo "Should be executed only on openbsd/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - # -# only on openbsd/386 -openbsd_386: - @echo "Should be executed only on openbsd/386." - go generate 2>&1 | tee log-generate - go build -v ./... - -# only on openbsd/arm64 -openbsd_arm64: - @echo "Should be executed only on openbsd/arm64." - go generate 2>&1 | tee log-generate - go build -v ./... - -windows_amd64: - @echo "Should be executed only on windows/amd64." - go generate 2>&1 | tee log-generate - go build -v ./... - -windows_arm64: - @echo "Should be executed only on windows/arm64." - go generate 2>&1 | tee log-generate - go build -v ./... - -windows_386: - @echo "Should be executed only on linux/amd64." - CCGO_CPP=i686-w64-mingw32-cpp TARGET_GOOS=windows TARGET_GOARCH=386 go generate - GOOS=windows GOARCH=386 go build -v ./... - -all_targets: linux_amd64 linux_386 linux_arm linux_arm64 linux_s390x # windows_amd64 windows_386 - echo done - -devbench: - date 2>&1 | tee log-devbench - go test -timeout 24h -dev -run @ -bench . 2>&1 | tee -a log-devbench - grep -n 'FAIL\|SKIP' log-devbench || true - -bench: - date 2>&1 | tee log-bench - go test -timeout 24h -v -run '^[^E]' -bench . 2>&1 | tee -a log-bench - grep -n 'FAIL\|SKIP' log-bench || true - clean: + rm -f log-* cpu.test mem.test *.out + git clean -fd + find testdata/nsz.repo.hu/ -name \*.go -delete + make -C testdata/nsz.repo.hu/libc-test/ cleanall go clean - rm -f *~ *.test *.out -cover: - t=$(shell mktemp) ; go test -coverprofile $$t && go tool cover -html $$t && unlink $$t +check: + staticcheck 2>&1 | grep -v U1000 -cpu: clean - go test -run @ -bench . -cpuprofile cpu.out - go tool pprof -lines *.test cpu.out +download: + @if [ ! -f $(TAR) ]; then wget $(URL) ; fi edit: @touch log - @if [ -f "Session.vim" ]; then novim -S & else novim -p Makefile libc.go & fi + @if [ -f "Session.vim" ]; then novim -S & else novim -p Makefile all_musl_test.go generator.go libc.go libc_musl.go & fi editor: - # go generate 2>&1 | tee log - gofmt -l -s -w *.go - go test -short 2>&1 | tee -a log - go install -v ./... - go build -o /dev/null generate.go - go build -o /dev/null strace.go + gofmt -l -s -w *.go 2>&1 | tee log-editor + go test -c -o /dev/null 2>&1 | tee -a log-editor + go install -v 2>&1 | tee -a log-editor + go build -o /dev/null generator*.go + +generate: download + mkdir -p $(DIR) || true + rm -rf $(DIR)/* + GO_GENERATE_DIR=$(DIR) go run generator*.go 2>&1 | tee log-generate + go build -v + # go install github.com/mdempsky/unconvert@latest + go build -v 2>&1 | tee -a log-generate + go test -v -short -count=1 ./... | tee -a log-generate + git status | tee -a log-generate + grep 'TRC\|TODO\|ERRORF\|FAIL' log-generate || true + +dev: download + mkdir -p $(DIR) || true + rm -rf $(DIR)/* + echo -n > /tmp/ccgo.log + GO_GENERATE_DIR=$(DIR) GO_GENERATE_DEV=1 go run -tags=ccgo.dmesg,ccgo.assert generator*.go 2>&1 | tee log-generate + go build -v | tee -a log-generate + go test -v -short -count=1 ./... | tee -a log-generate + git status | tee -a log-generate + grep 'TRC\|TODO\|ERRORF\|FAIL' log-generate || true + grep 'TRC\|TODO\|ERRORF\|FAIL' /tmp/ccgo.log || true + +membrk-test: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 -tags=libc.membrk 2>&1 | tee log-test + grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test + +test: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 2>&1 | tee log-test + +short-test: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 -short 2>&1 | tee log-test + grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test -later: - @grep -n $(grep) LATER * || true - @grep -n $(grep) MAYBE * || true +xlibc: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 -tags=ccgo.dmesg,ccgo.assert 2>&1 -run TestLibc | tee log-test + grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test -mem: clean - go test -v -run ParserCS -memprofile mem.out -timeout 24h - go tool pprof -lines -web -alloc_space *.test mem.out +xpthread: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 2>&1 -run TestLibc -re pthread | tee log-test + grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test -nuke: clean - go clean -i +libc-test: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 2>&1 -run TestLibc | tee log-test + # grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test + grep -o 'undefined: \<.*\>' log-test | sort -u -todo: - @grep -nr $(grep) ^[[:space:]]*_[[:space:]]*=[[:space:]][[:alpha:]][[:alnum:]]* * | grep -v $(ngrep) || true - @grep -nr $(grep) 'TODO\|panic' * | grep -v $(ngrep) || true - @grep -nr $(grep) BUG * | grep -v $(ngrep) || true - @grep -nr $(grep) [^[:alpha:]]println * | grep -v $(ngrep) || true - @grep -nir $(grep) 'work.*progress' || true +xtest: + echo -n > /tmp/ccgo.log + touch log-test + cp log-test log-test0 + go test -v -timeout 24h -count=1 -tags=ccgo.dmesg,ccgo.assert 2>&1 | tee log-test + grep -a 'TRC\|TODO\|ERRORF\|FAIL' log-test || true 2>&1 | tee -a log-test work: rm -f go.work* @@ -201,6 +120,6 @@ work: go work use ../ccgo/v3 go work use ../cc/v4 -strace: - go run strace.go - go build -v ./... +surface: + surface > surface.new + surface surface.old surface.new > log-todo-surface || true |
