sparc64-linux-gnu support #172

Open
opened 2024-08-22 10:47:02 +00:00 by alexrp · 5 comments
BERJAYA
Owner
https://github.com/llvm/llvm-project/issues/105639
BERJAYA
Author
Owner
-- Check for working C compiler: /home/alexrp/Source/zig-bootstrap/out/host/bin/zig
-- Check for working C compiler: /home/alexrp/Source/zig-bootstrap/out/host/bin/zig - broken
CMake Error at /usr/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message):
  The C compiler

    "/home/alexrp/Source/zig-bootstrap/out/host/bin/zig"

  is not able to compile a simple test program.

  It fails with the following output:

    Change Dir: '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms'

    Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_87520/fast
    /usr/bin/gmake  -f CMakeFiles/cmTC_87520.dir/build.make CMakeFiles/cmTC_87520.dir/build
    gmake[1]: Entering directory '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms'
    Building C object CMakeFiles/cmTC_87520.dir/testCCompiler.c.o
    /home/alexrp/Source/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -s -target sparc64-linux-gnu -mcpu=baseline    -MD -MT CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_87520.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -c /home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms/testCCompiler.c
    Linking C executable cmTC_87520
    /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_87520.dir/link.txt --verbose=1
    /home/alexrp/Source/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -s -target sparc64-linux-gnu -mcpu=baseline CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -o cmTC_87520
    ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x10): unknown relocation (80) against symbol __gmon_start__
    ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x14): unknown relocation (81) against symbol __gmon_start__
    ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x18): unknown relocation (84) against symbol __gmon_start__
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x1c): unknown relocation (80) against symbol main
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x20): unknown relocation (80) against symbol __libc_csu_init
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x24): unknown relocation (80) against symbol __libc_csu_fini
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x28): unknown relocation (81) against symbol main
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x2c): unknown relocation (81) against symbol __libc_csu_init
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x30): unknown relocation (81) against symbol __libc_csu_fini
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x34): unknown relocation (84) against symbol main
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x38): unknown relocation (84) against symbol __libc_csu_init
    ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x3c): unknown relocation (84) against symbol __libc_csu_fini
    gmake[1]: *** [CMakeFiles/cmTC_87520.dir/build.make:100: cmTC_87520] Error 1
    gmake[1]: Leaving directory '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms'
    gmake: *** [Makefile:127: cmTC_87520/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!
``` -- Check for working C compiler: /home/alexrp/Source/zig-bootstrap/out/host/bin/zig -- Check for working C compiler: /home/alexrp/Source/zig-bootstrap/out/host/bin/zig - broken CMake Error at /usr/share/cmake-3.27/Modules/CMakeTestCCompiler.cmake:67 (message): The C compiler "/home/alexrp/Source/zig-bootstrap/out/host/bin/zig" is not able to compile a simple test program. It fails with the following output: Change Dir: '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms' Run Build Command(s): /usr/bin/cmake -E env VERBOSE=1 /usr/bin/gmake -f Makefile cmTC_87520/fast /usr/bin/gmake -f CMakeFiles/cmTC_87520.dir/build.make CMakeFiles/cmTC_87520.dir/build gmake[1]: Entering directory '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms' Building C object CMakeFiles/cmTC_87520.dir/testCCompiler.c.o /home/alexrp/Source/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -s -target sparc64-linux-gnu -mcpu=baseline -MD -MT CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -MF CMakeFiles/cmTC_87520.dir/testCCompiler.c.o.d -o CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -c /home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms/testCCompiler.c Linking C executable cmTC_87520 /usr/bin/cmake -E cmake_link_script CMakeFiles/cmTC_87520.dir/link.txt --verbose=1 /home/alexrp/Source/zig-bootstrap/out/host/bin/zig cc -fno-sanitize=all -s -target sparc64-linux-gnu -mcpu=baseline CMakeFiles/cmTC_87520.dir/testCCompiler.c.o -o cmTC_87520 ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x10): unknown relocation (80) against symbol __gmon_start__ ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x14): unknown relocation (81) against symbol __gmon_start__ ld.lld: error: /home/alexrp/.cache/zig/o/6e69573c6d912b9996e0a89ae4b432b8/crti.o:(.init+0x18): unknown relocation (84) against symbol __gmon_start__ ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x1c): unknown relocation (80) against symbol main ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x20): unknown relocation (80) against symbol __libc_csu_init ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x24): unknown relocation (80) against symbol __libc_csu_fini ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x28): unknown relocation (81) against symbol main ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x2c): unknown relocation (81) against symbol __libc_csu_init ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x30): unknown relocation (81) against symbol __libc_csu_fini ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x34): unknown relocation (84) against symbol main ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x38): unknown relocation (84) against symbol __libc_csu_init ld.lld: error: /home/alexrp/.cache/zig/o/dac795b422915e84fa20334dc19530a7/Scrt1.o:(function _start: .text+0x3c): unknown relocation (84) against symbol __libc_csu_fini gmake[1]: *** [CMakeFiles/cmTC_87520.dir/build.make:100: cmTC_87520] Error 1 gmake[1]: Leaving directory '/home/alexrp/Source/zig-bootstrap/out/build-zlib-sparc64-linux-gnu-baseline/CMakeFiles/CMakeScratch/TryCompile-yiL0Ms' gmake: *** [Makefile:127: cmTC_87520/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! ```
BERJAYA
Author
Owner

@koachan any chance you have some ideas off the top of your head re: the relocation errors above?

@koachan any chance you have some ideas off the top of your head re: the relocation errors above?
BERJAYA
brad0 commented 2024-08-23 00:06:36 +00:00 (Migrated from github.com)

I definitely wouldn't be trying LLD just yet. It needs work.

I definitely wouldn't be trying LLD just yet. It needs work.
BERJAYA
Author
Owner

https://github.com/llvm/llvm-project/pull/137919 will unblock this, I just need to find time to write some tests to make it mergeable.

https://github.com/llvm/llvm-project/pull/137919 will unblock this, I just need to find time to write some tests to make it mergeable.
BERJAYA
brad0 commented 2025-05-09 08:52:16 +00:00 (Migrated from github.com)

Thanks for the work on LLD and some of the other bits.

Thanks for the work on LLD and some of the other bits.
BERJAYA alexrp changed title from sparc64-linux-gnu to sparc64-linux-gnu support 2026-04-26 12:37:59 +00:00
Sign in to join this conversation.
No description provided.