<html><head></head><body><div id="appVersion:飞书-4.8.1-editorVersion:0.9.6"></div><div><div style="line-height:1.68"><div style="font-family:arial,helvetica,sans-serif;color:rgb(31,35,41);line-height:1.68"><div class="" dir="auto" style="margin:4px 0px"><span class=" backgroundcolor fontweight  fontsize fontcolor " style="background-color:rgb(255,255,255);font-weight:400;font-size:13px;color:#232629">Thanks for your reply. It does work!</span></div></div></div></div><div style="list-style-position:inside" id="lark-mail-quote-163841971"><div style="list-style-position:inside"><div style="margin:12px 0px 0px;padding-left:12px;border-left:0.5px solid rgb(187,191,196)" class="adit-html-block ignore-collect adit-html-block--collapsed"><div><div id="lark-mail-quote-a2f1d9eda4637566af58c6843581bf4a"><div style="color:rgb(187,191,196)" class="adit-html-block__attr">On Wed, Dec 1, 2021, 17:44 <<a style="white-space:pre-wrap;word-break:break-word;text-decoration:none;color:rgb(51,112,255)" href="mailto:rzhboyao@gmail.com">rzhboyao@gmail.com</a>> wrote:</div><div style="margin-top:8px"><div class="" style="word-wrap:break-word;line-break:after-white-space"><div class=""><br class=""></div><blockquote class=""><div class="" style="margin:0px"><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b class="">From: </b></span><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">PoYao Chang <<a rel="nofollow noopener noreferrer" class="" href="mailto:rzhboyao@gmail.com">rzhboyao@gmail.com</a>><br class=""></span></div><div class="" style="margin:0px"><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b class="">Subject: </b></span><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b class="">Re: [llvm-dev] How can I build LLVM with my gcc toolchain exactly</b><br class=""></span></div><div class="" style="margin:0px"><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b class="">Date: </b></span><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif">November 24, 2021 at 1:06:21 AM GMT+8<br class=""></span></div><div class="" style="margin:0px"><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><b class="">To: </b></span><span class="" style="font-family:-webkit-system-font,"Helvetica Neue",Helvetica,sans-serif"><a rel="nofollow noopener noreferrer" class="" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br class=""></span></div><br class=""><div class="">Give “-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON” a try. </div></blockquote><div class=""><a rel="nofollow noopener noreferrer" class="" href="https://lists.llvm.org/pipermail/llvm-dev/2021-November/153909.html">https://lists.llvm.org/pipermail/llvm-dev/2021-November/153909.html</a></div><div class=""><br class=""></div>Have you tried it as I told you a week ago. <br class=""><div><br class=""><blockquote class=""><div id="lark-mail-quote-2536aecdbcd7536dd446a16de3f4f393"><div class="">On Dec 1, 2021, at 2:29 PM, 刘可 via llvm-dev <<a rel="nofollow noopener noreferrer" class="" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class="" id="appVersion:飞书-4.8.1-editorVersion:0.9.6"></div><div class=""><div class="" style="line-height:1.68"><div class="" style="font-family:arial,helvetica,sans-serif;color:rgb(31,35,41);line-height:1.68"><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">Hi, </span><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:#1f2329" class="fontsize fontcolor backgroundcolor fontweight">I got an error when I specified gcc8.3 toolchain to build LLVM13. </span><span style="font-size:14px" class="fontsize">Here is my host environment:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">Debian9</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">gcc6.3</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">Manully built toolchain: gcc8.3</span></div><div style="margin:4px 0px" dir="auto" class=""><br class=""></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">===============================================================================================</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">Here is my command:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">$ CXX=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/g++ CC=/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/bin/gcc cmake -G Ninja -DLLVM_ENABLE_PROJECTS="clang;clang-tools-extra;lld;lldb;openmp" -DLLVM_ENABLE_RUNTIMES="compiler-rt;libcxx;libcxxabi;libunwind" -DLLVM_TARGETS_TO_BUILD="X86;ARM;AArch64" -DCMAKE_BUILD_TYPE=Release  -DLLVM_BUILD_LLVM_DYLIB=ON -DLLVM_LINK_LLVM_DYLIB=ON -DCMAKE_CXX_LINK_FLAGS="-Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/lib64 -Wl,-rpath /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64 -Wl,-dynamic-linker /home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span class="outer-u-container"><span style="font-size:14px" class="fontsize hyperlink-href:ld-linux-x86-64.so"><a rel="nofollow noopener noreferrer" class="" style="text-decoration:none;color:rgb(51,112,255)" href="http://ld-linux-x86-64.so/">ld-linux-x86-64.so</a></span></span><span style="font-size:14px" class="fontsize">.2 -L/home/liuke.gehry/toolchain/x86_64-x86_64-gcc-830/sysroot/lib64/</span><span class="outer-u-container"><span style="font-size:14px" class="fontsize hyperlink-href:ld-linux-x86-64.so"><a rel="nofollow noopener noreferrer" class="" style="text-decoration:none;color:rgb(51,112,255)" href="http://ld-linux-x86-64.so/">ld-linux-x86-64.so</a></span></span><span style="font-size:14px" class="fontsize">.2" ../llvm</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">$ ninja</span></div><div style="margin:4px 0px" dir="auto" class=""><br class=""></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">[99/302] Building C object CMakeFiles/clang_rt.builtins-i386.dir/floatsisf.c.o</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">FAILED: CMakeFiles/clang_rt.builtins-i386.dir/floatsisf.c.o</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">/home/liuke.gehry/llvm/llvm-project/build_with_gcc/./bin/clang --target=x86_64-unknown-linux-gnu -DVISIBILITY_HIDDEN  -O3 -DNDEBUG    -m32 -std=c11 -fPIC -fno-builtin -fvisibility=hidden -MD -MT CMakeFiles/clang_rt.builtins-i386.dir/floatsisf.c.o -MF CMakeFiles/clang_rt.builtins-i386.dir/floatsisf.c.o.d -o CMakeFiles/clang_rt.builtins-i386.dir/floatsisf.c.o   -c /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/floatsisf.c</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/floatsisf.c:16:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/fp_lib.h:23:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">In file included from /home/liuke.gehry/llvm/llvm-project/compiler-rt/lib/builtins/int_lib.h:93:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">In file included from /data00/home/liuke.gehry/llvm/llvm-project/build_with_gcc/lib/clang/13.0.1/include/limits.h:21:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">In file included from /usr/include/limits.h:25:</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">/usr/include/features.h:364:12: fatal error: 'sys/cdefs.h' file not found</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">#  include <sys/cdefs.h></span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">           ^~~~~~~~~~~~~</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="font-size:14px" class="fontsize">1 error generated.</span></div><div style="margin:4px 0px" dir="auto" class=""><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:#1f2329" class="fontsize fontcolor backgroundcolor fontweight">===============================================================================================</span></div><div style="margin:4px 0px" dir="auto" class=""><br class=""></div><div style="margin:4px 0px" dir="auto" class=""><span style="background-color:rgba(0,0,0,0);font-weight:400;font-size:14px;color:#1f2329" class="fontsize fontcolor backgroundcolor fontweight">I know I can solve it through 'apt install'. But I do not need 32-bits binary . How can I disable '-m32' when building builtins? Or is it a necessary process?</span></div></div></div></div>
_______________________________________________<br class="">LLVM Developers mailing list<br class=""><a rel="nofollow noopener noreferrer" class="" href="mailto:llvm-dev@lists.llvm.org">llvm-dev@lists.llvm.org</a><br class=""><span><a rel="nofollow noopener noreferrer" href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a></span><br class=""></div></div></blockquote></div><br class=""></div></div></div></div></div></div></div></body></html>