Thanks for direction, I think the root cause of this issue is exactly the same in #38728 but I afraid the patch in #38728 only fix the building of gollvm (i.e. add -fcd-branch=none to the build flags). In the above case, gollvm uses /usr/bin/cc to compile gccgo_c.o during the building of hugo without -fcd-branch=none and finally fails in linking time. So I guess we need also add this flag in somewhere gollvm calling /usr/bin/cc. This is only needed for newer linux distributions, I can't reproduce it in ubuntu 18.04.
Thanks, Ting On Monday, August 10, 2020 at 9:30:45 PM UTC+8, Than McIntosh wrote: > > Hello, > > >># github.com/gohugoio/hugo > >>/usr/bin/ld.gold: error: $WORK/b029/_pkg_.a(gccgo_c.o): failed to match > split-stack sequence at section 1 offset 0 > > This issue is https://github.com/golang/go/issues/38728, which should be > fixed at this point at tip. > > Thanks, Than > > > On Mon, Jul 20, 2020 at 2:33 PM Ian Lance Taylor <ia...@golang.org > <javascript:>> wrote: > >> [ + thanm, cherryyz ] >> >> On Mon, Jul 20, 2020 at 4:24 AM Yuan Ting <yuan...@ict.ac.cn >> <javascript:>> wrote: >> > >> > Hi, I try to build hugo with fresh gollvm but the linker complains that: >> > >> > # github.com/gohugoio/hugo >> > /usr/bin/ld.gold: error: $WORK/b029/_pkg_.a(gccgo_c.o): failed to match >> split-stack sequence at section 1 offset 0 >> > /usr/bin/ld.gold: error: $WORK/b029/_pkg_.a(gccgo_c.o): failed to match >> split-stack sequence at section 1 offset a6 >> > >> > To reproduce: >> > >> > git clone https://github.com/gohugoio/hugo.git >> > cd hugo && go build >> > >> > Platform: x86_64 ubuntu:20.04 >> > Gollvm build flags: >> > cmake ../llvm -DCMAKE_BUILD_TYPE=Release -DLLVM_TARGETS_TO_BUILD=X86 >> -DLLVM_ENABLE_ASSERTIONS=On -DLLVM_ENABLE_RTTI=On -DLLVM_USE_LINKER=gold -G >> Ninja >> > >> > -- >> > You received this message because you are subscribed to the Google >> Groups "golang-nuts" group. >> > To unsubscribe from this group and stop receiving emails from it, send >> an email to golan...@googlegroups.com <javascript:>. >> > To view this discussion on the web visit >> https://groups.google.com/d/msgid/golang-nuts/d722a1e8-d205-4c9e-8ae4-623c19dd2946o%40googlegroups.com >> . >> > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to golang-nuts+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/golang-nuts/263c45b3-597a-4cbb-878c-5d199defd6f7o%40googlegroups.com.