<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: ‘__va_copy’ was not declared in this scope" while building libomp against musl libc"
href="https://bugs.llvm.org/show_bug.cgi?id=34040">34040</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>"error: ‘__va_copy’ was not declared in this scope" while building libomp against musl libc
</td>
</tr>
<tr>
<th>Product</th>
<td>OpenMP
</td>
</tr>
<tr>
<th>Version</th>
<td>unspecified
</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>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>Runtime Library
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>plevine457@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvm-bugs@lists.llvm.org
</td>
</tr></table>
<p>
<div>
<pre>Building libomp-3.9.0 in Gentoo Linux with musl as libc using GCC-6.3.0 or
GCC-5.4.0 results in:
<span class="quote">> /var/tmp/portage/sys-libs/libomp-3.9.0/work/openmp-3.9.0.src/runtime/src/kmp_str.c:211:40: error: ‘__va_copy’ was not declared in this scope
> __va_copy( _args, args ); // Make copy of args.
> ^</span >
musl had previously provided "__va_copy" but has since relegated it only for
scenarios in which "__GNUC__ < 3", in favor of using "va_copy" (see
<a href="http://git.musl-libc.org/cgit/musl/commit/?id=def0af189871a499efdc9bc37438d8b20eb702ab">http://git.musl-libc.org/cgit/musl/commit/?id=def0af189871a499efdc9bc37438d8b20eb702ab</a>).
Seeing as libomp source code already uses one-line, double-slash style comments
which require at least C99 dialect, and that va_copy is a C99 macro, the best
course of action would be to change "__va_copy" to "va_copy".</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>