-
Notifications
You must be signed in to change notification settings - Fork 18.4k
Description
Please answer these questions before submitting your issue. Thanks!
What operating system and processor architecture are you using (go env
)?
x86_64, slackware 14.2
What did you do?
In my build directory: cmake -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD="X86" -G "Unix Makefiles" ../llvm && make all -j4
but as far as I can tell, it just happens on my system regardless of other options when I build x86 (use gold linker, build with other targets, etc.)
What did you expect to see?
Successful build.
What did you see instead?
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected ')'
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected '='
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5966:32: error: expected ';' or newline after top level declaration
/[my-build-path]/tools/gollvm/libgo/runtime_sysinfo.go:5965:36: use of undefined type 'ext'
make[2]: *** [tools/gollvm/libgo/CMakeFiles/libgotool.dir/build.make:1737: tools/gollvm/libgo/.pic/runtime.o] Error 3
make[1]: *** [CMakeFiles/Makefile2:15851: tools/gollvm/libgo/CMakeFiles/libgotool.dir/all] Error 2
make: *** [Makefile:152: all] Error 2
Those lines in runtime_sysinfo.go
contain:
const ___glibc_clang_has_extension(ext) = 0
const ___glibc_clang_prereq(maj,min) = 0
A little investigation seemed to indicate these slipped through libgo/godumpspec/m{parser,tokenizer} because their bodies don't reference their parameters.
If I comment these lines out, and analogous lines in /[my-build-path]/tools/gollvm/libgo/sysinfo.go
when building syscall, the build errors out while building libgo_shared because ld.gold can't find __morestack
, -lgcc
, crt1.o
, etc. This part superficially has more in common with building gccgo. My binutils use gold, so even when I don't tell CMake to use gold, eventually it gets invoked. I am still investigating this latter part, but the above const/macro stuff seemed reportable.