Get more of the tests passing for FreeBSD (#3197)

* Add missing <stdint.h> include for uint8_t type declaration

* Add needed FreeBSD check to link to libpthread

* Apply patch to enable more tests in the FreeBSD CI
master
stratact 2019-09-10 11:50:54 -07:00 committed by Andrew Kelley
parent 68d159ea9d
commit a165cc0535
3 changed files with 41 additions and 4 deletions

View File

@ -18,13 +18,45 @@ cd build
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_PREFIX_PATH=$PREFIX -DCMAKE_INSTALL_PREFIX=$(pwd)/release -DZIG_STATIC=ON
make $JOBS install
# TODO test everything. right now it's skipping stuff including docs
# because for some reason @cImport is failing on the CI server.
release/bin/zig build --build-file ../build.zig test-behavior -Dskip-release
release/bin/zig build test-fmt
release/bin/zig build test-behavior
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build test-std
release/bin/zig build test-compiler-rt
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build test-compare-output
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build test-standalone
release/bin/zig build test-stack-traces
release/bin/zig build test-cli
release/bin/zig build test-asm-link
release/bin/zig build test-runtime-safety
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build test-translate-c
release/bin/zig build test-gen-h
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build test-compile-errors
# This test is disabled because it triggers "out of memory" on the sr.ht CI service.
# See https://github.com/ziglang/zig/issues/3210
# release/bin/zig build docs
if [ -f ~/.s3cfg ]; then
mv ../LICENSE release/
# TODO re-enable this
# Enable when `release/bin/zig build docs` passes without "out of memory" or failures
#mv ../zig-cache/langref.html release/
mv release/bin/zig release/
rmdir release/bin

View File

@ -1774,6 +1774,10 @@ static void construct_linker_job_elf(LinkJob *lj) {
lj->args.append("-lgcc_s");
lj->args.append("--no-as-needed");
}
if (g->zig_target->os == OsFreeBSD) {
lj->args.append("-lpthread");
}
} else if (target_is_glibc(g->zig_target)) {
if (target_supports_libunwind(g->zig_target)) {
lj->args.append(build_libunwind(g));

View File

@ -3,6 +3,7 @@
#include <assert.h>
#include <string.h>
#include <stdint.h>
extern int *x_ptr;