ziglang/zig-bootstrap

s390x-linux-musl baseline

oldendick opened this issue · 2 comments

Aborts with "TODO implement mapping for c_longdouble" which appears to come from src/stage1/codegen.cpp:8736

Currently fails with

-- Found ccache /usr/bin/ccache
-- Configuring zig version 0.10.0-dev.2931+bdf3fa12f
-- Configuring done
-- Generating done
-- Build files have been written to: /home/user/zig-bootstrap/out/build-zig-host
[  1%] Built target opt_c_util
[ 82%] Built target embedded_softfloat
[ 86%] Built target zigcpp
[ 98%] Built target zigstage1
[ 99%] Built target zig0
[100%] Built target zig
Install the project...
-- Install configuration: "Release"
-- Installing: /home/user/zig-bootstrap/out/host/bin/zig
-- Set runtime path of "/home/user/zig-bootstrap/out/host/bin/zig" to ""
-- Installing: /home/user/zig-bootstrap/out/host/lib
CMake Deprecation Warning at CMakeLists.txt:1 (cmake_minimum_required):
  Compatibility with CMake < 2.8.12 will be removed from a future version of
  CMake.

  Update the VERSION argument <min> value or use a ...<max> suffix to tell
  CMake that the project does not need compatibility with older versions.


-- The C compiler identification is unknown
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Check for working C compiler: /home/user/zig-bootstrap/out/host/bin/zig
-- Check for working C compiler: /home/user/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/share/cmake/Modules/CMakeTestCCompiler.cmake:69 (message):
  The C compiler

    "/home/user/zig-bootstrap/out/host/bin/zig"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: /home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeTmp

    Run Build Command(s):/usr/bin/gmake -f Makefile cmTC_a0d8c/fast && /usr/bin/gmake  -f CMakeFiles/cmTC_a0d8c.dir/build.make CMakeFiles/cmTC_a0d8c.dir/build
    gmake[1]: Entering directory '/home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeTmp'
    Building C object CMakeFiles/cmTC_a0d8c.dir/testCCompiler.c.o
    /home/user/zig-bootstrap/out/host/bin/zig  cc -fno-sanitize=all -s -target s390x-linux-musl -mcpu=baseline    -o CMakeFiles/cmTC_a0d8c.dir/testCCompiler.c.o -c /home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeTmp/testCCompiler.c
    error: unknown target CPU 'generic'
    note: valid target CPU values are: arch8, z10, arch9, z196, arch10, zEC12, arch11, z13, arch12, z14, arch13, z15, arch14
    gmake[1]: *** [CMakeFiles/cmTC_a0d8c.dir/build.make:78: CMakeFiles/cmTC_a0d8c.dir/testCCompiler.c.o] Error 1
    gmake[1]: Leaving directory '/home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeTmp'
    gmake: *** [Makefile:127: cmTC_a0d8c/fast] Error 2





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:4 (project)


-- Configuring incomplete, errors occurred!
See also "/home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeOutput.log".
See also "/home/user/zig-bootstrap/out/build-zlib-s390x-linux-musl-baseline/CMakeFiles/CMakeError.log".

(host: x86_64-gentoo-linux-musl)

install
└─ install zig
   └─ zig build-exe zig ReleaseFast s390x-linux-musl 9 errors
/home/alexrp/Source/zig-bootstrap/out/host/lib/zig/std/os/linux.zig:55:34: error: struct 'os.linux.arch_bits__struct_3245' has no member named 'syscall0'
pub const syscall0 = syscall_bits.syscall0;
                     ~~~~~~~~~~~~^~~~~~~~~
/home/alexrp/Source/zig-bootstrap/out/host/lib/zig/std/os/linux.zig:50:13: note: struct declared here
    else => struct {
            ^~~~~~
/home/alexrp/Source/zig-bootstrap/out/host/lib/zig/std/os/linux.zig:58:34: error: struct 'os.linux.arch_bits__struct_3245' has no member named 'syscall3'
pub const syscall3 = syscall_bits.syscall3;
                     ~~~~~~~~~~~~^~~~~~~~~
/home/alexrp/Source/zig-bootstrap/out/host/lib/zig/std/os/linux.zig:50:13: note: struct declared here
    else => struct {
            ^~~~~~
...snip...

Need to fill in the std.os.linux arch bits for s390x.