[llvm-bugs] [Bug 26128] libcxx fails to compile with newlib for cmath functions

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Jan 19 09:24:20 PST 2016


https://llvm.org/bugs/show_bug.cgi?id=26128

Rian Quinn <rianquinn at gmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|---                         |INVALID

--- Comment #15 from Rian Quinn <rianquinn at gmail.com> ---
I was able to verify that when using cmake, this does _not_ seem to be an
issue. We compiled using:

cmake ../libcxx/ \
    -DLLVM_PATH=~/clang/llvm \
    -DLIBCXX_CXX_ABI=libcxxabi \
    -DLIBCXX_CXX_ABI_INCLUDE_PATHS=../libcxxabi/include \
    -DCMAKE_INSTALL_PREFIX=$HOME/opt/cross/x86_64-elf/ \
    -DLIBCXX_SYSROOT=$HOME/opt/cross/x86_64-elf/ \
    -DCMAKE_C_COMPILER=$HOME/opt/cross/bin/x86_64-bareflank-gcc \
    -DCMAKE_CXX_COMPILER=$HOME/opt/cross/bin/x86_64-bareflank-g++ \
    -DLIBCXX_ENABLE_THREADS=OFF \
    -DLIBCXX_ENABLE_MONOTONIC_CLOCK=OFF

We had to wrap gcc in a bash script so that we could properly handle compiling
vs linking as cmake insists on using g++ for linking instead of ld, but it
seems to be working great. 

I will note that when you compile with GCC, you get a pretty alarming number of
warnings. And it doesn't seem to compile with "-fno-exceptions" as it complains
about "-Werror=return-type". 

I'll mark this as resolved, as it seems there is some magic in cmake that is
making this error go away.

-- 
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/20160119/e1b13d63/attachment.html>


More information about the llvm-bugs mailing list