<html>
<head>
<base href="https://bugs.llvm.org/">
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW - error in backend: Segmented stacks do not support vararg functions."
href="https://bugs.llvm.org/show_bug.cgi?id=40718">40718</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>error in backend: Segmented stacks do not support vararg functions.
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>8.0
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>enhancement
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benjima@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>htmldeveloper@gmail.com, llvm-bugs@lists.llvm.org, neeilans@live.com, richard-llvm@metafoo.co.uk
</td>
</tr></table>
<p>
<div>
<pre>Created <span class=""><a href="attachment.cgi?id=21473" name="attach_21473" title="packed cgo-gcc-input-266913532-73e194.c and cgo-gcc-input-266913532-73e194.sh">attachment 21473</a> <a href="attachment.cgi?id=21473&action=edit" title="packed cgo-gcc-input-266913532-73e194.c and cgo-gcc-input-266913532-73e194.sh">[details]</a></span>
packed cgo-gcc-input-266913532-73e194.c and cgo-gcc-input-266913532-73e194.sh
Hi!
I'm not really sure what the problem with the code is, but I've attached the
files mentioned by clang.
Some background: I'm working with gollvm to compile C code that is being used
in Go.
Hopefully this can shed some light on a workaround, as I would like to be able
to compile. Could it be, that the "-fsplit-stack" invokation leads to this?
CGO_LDFLAGS='"-g" "-O2" "-lrt"' /root/llvm-install/tools/cgo -objdir
$WORK/b002/ -importpath karalabe-hid/karalabe/hid -gccgo
-gccgopkgpath=karalabe-hid/karalabe/hid -exportheader=$WORK/b002/_cgo_install.h
-- -fsanitize=fuzzer,memory -I $WORK/b002/ -g -O2
-I/root/go/src/karalabe-hid/karalabe/hid/hidapi/hidapi
-I/root/go/src/karalabe-hid/karalabe/hid/libusb/libusb -DDEFAULT_VISIBILITY=
-DOS_LINUX -D_GNU_SOURCE -DPOLL_NFDS_TYPE=int -fsplit-stack ./hid_enabled.go
./wchar.go
# karalabe-hid/karalabe/hid
fatal error: error in backend: Segmented stacks do not support vararg
functions.
clang-8: error: clang frontend command failed with exit code 70 (use -v to see
invocation)
clang version 8.0.0
Target: x86_64-unknown-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
clang-8: note: diagnostic msg: PLEASE submit a bug report to
<a href="https://bugs.llvm.org/">https://bugs.llvm.org/</a> and include the crash backtrace, preprocessed source,
and associated run script.
clang-8: note: diagnostic msg:
********************
PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
Preprocessed source(s) and associated run script(s) are located at:
clang-8: note: diagnostic msg: /tmp/cgo-gcc-input-266913532-73e194.c
clang-8: note: diagnostic msg: /tmp/cgo-gcc-input-266913532-73e194.sh
clang-8: note: diagnostic msg:
********************</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>