<html>
<head>
<base href="http://llvm.org/bugs/" />
</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 --- - Possible regression in clang regarding discarded section at link time"
href="http://llvm.org/bugs/show_bug.cgi?id=22623">22623</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Possible regression in clang regarding discarded section at link time
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>3.6
</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>-New Bugs
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>benpope81@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>Whilst compiling RxCpp with clang 3.6.0 (branches/release_36 229488) I get this
error (and lots more very similar):
`.text.startup' referenced in section `.text.startup' of
CMakeFiles/rxcppv2_test.dir/home/ben/development/test/rxcpp/RxCpp/Rx/v2/test/subscriptions/subscription.cpp.o:
defined in discarded section
`.text.startup[_ZN5rxcpp22composite_subscription12shared_emptyE]' of
CMakeFiles/rxcppv2_test.dir/home/ben/development/test/rxcpp/RxCpp/Rx/v2/test/subscriptions/subscription.cpp.o
shared_empty is declared like this, in a header file:
__attribute__((weak)) composite_subscription
composite_subscription::shared_empty =
composite_subscription(detail::tag_composite_subscription_empty());
Instructions to compile RxCpp:
mkdir rxcpp_clang
cd rxcpp_clang/
git clone --recursive <a href="https://github.com/BenPope/RxCpp.git">https://github.com/BenPope/RxCpp.git</a>
mkdir build
cd build
cmake -GNinja -DCMAKE_C_COMPILER=clang-3.6 -DCMAKE_CXX_COMPILER=clang++-3.6
-DCMAKE_CXX_FLAGS="-std=c++14" ../projects/CMake
ninja rxcppv2_test
That should reproduce the errors.
It compiles and links fine with clang-3.5.1, gcc-4.6.3, gcc-4.8.4, gcc-4.9.2,
I've made some changes to the branch that allow it to link, but I'm not sure if
they are equivalent:
cd ../RxCpp
git checkout tweak-static-symbols
cd ../build/
ninja
Should compile and link.</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>