[LLVMbugs] [Bug 22623] New: Possible regression in clang regarding discarded section at link time
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Tue Feb 17 20:00:15 PST 2015
http://llvm.org/bugs/show_bug.cgi?id=22623
Bug ID: 22623
Summary: Possible regression in clang regarding discarded
section at link time
Product: clang
Version: 3.6
Hardware: PC
OS: Linux
Status: NEW
Severity: normal
Priority: P
Component: -New Bugs
Assignee: unassignedclangbugs at nondot.org
Reporter: benpope81 at gmail.com
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
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 https://github.com/BenPope/RxCpp.git
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20150218/da774f5f/attachment.html>
More information about the llvm-bugs
mailing list