<div dir="ltr">All the Android versions I have used prior to my Android clang-kernel have been gcc-built from different ROMs(custom and AOSP) - none of them have given good experience<div>in terms of battery usage. AFAIK, <span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">for obvious reasons, </span>Google has announced they have switched over from GCC to LLVM/clang for userspace and for kernel, they have done it to</div><div>some extent - not yet for ARM(32-bit) as I got to know and that's why I was interested in it to accomplish it.</div><div><br></div><div>Having said that, I tried to use GCC-8-cross toolchain for gnueabi to build the Android kernel, there were some assembler error messages, so researched upon building the androideabi</div><div>version from gcc-8.1 source - the Android NDK toolchain source has some build scripts which need to be worked upon to pick out-of-tree gcc-source - so, not a straightforward process.</div><div>I saw some Linaro GCC toolchain but of the older 7.* version and not the latest 8.* one - I have seen some people using Linaro GCC as well to build the kernel but I didn't see any</div><div>positive notes with respect to battery usage with that.</div><div><br></div><div>Anyway, I am satisfied with my Android clang-built kernel as it has been battery efficient as opposed to earlier gcc-built kernels and that's with rest of the</div><div>Android(ramdisk, system image, etc) being the *same* including the hardware(Nexus 5).</div><div><br></div><div><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 14, 2018 at 11:01 PM, Jean-Michaël Celerier <span dir="ltr"><<a href="mailto:jeanmichael.celerier@gmail.com" target="_blank">jeanmichael.celerier@gmail.<wbr>com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">But... I still don't find any different GCC version? AFAIK they stopped updating gcc around ndk10. Did you test at some point with a custom built gcc / g++ 8 for instance ?<br></div><div class="gmail_extra"><span><br clear="all"><div><div class="m_-1282158820698773283m_1423502755819717575gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><br></div><div><font color="#783f04"><br></font></div><div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c">-------</font></div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c">Jean-Michaël Celerier</font><div><font face="arial, helvetica, sans-serif" size="2" color="#134f5c"><a href="http://www.jcelerier.name" target="_blank">http://www.jcelerier.name</a></font></div></div></div></div>
<br></span><div><div class="m_-1282158820698773283h5"><div class="gmail_quote">On Fri, Jun 15, 2018 at 2:10 AM, Raghavan Santhanam <span dir="ltr"><<a href="mailto:raghavanil4m@gmail.com" target="_blank">raghavanil4m@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr"><div class="gmail_extra">Looks like you didn't read the whole article. Well, for more complete comparison between GCC and LLVM/clang, I have used four different LLVM/clang</div><div class="gmail_extra">versions(old to to the new), from within the Google's Android NDK and from outside of the NDK i.e., from other sources, in my project as under :</div><div class="gmail_extra"><div class="gmail_extra"><ol><li><font face="monospace, monospace"><b>NDK r13b LLVM/clang : Android clang version 3.8.256229  (based on LLVM 3.8.256229)<br><br></b></font></li><li><font face="monospace, monospace"><b><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">Qualcomm Snapdragon LLVM/clang for Android : Snapdragon LLVM ARM Compiler 4.0.2 for Android NDK (based on <a href="http://llvm.org" target="_blank">llvm.org</a> 4.0+) - clang version 4.0.2 for Android NDK<br></span><br></b></font></li><li><font face="monospace, monospace"><b><span style="font-size:small;background-color:rgb(255,255,255);text-decoration-style:initial;text-decoration-color:initial;float:none;display:inline">NDK r17 LLVM/clang : </span>Android (4691093 based on r316199) clang version 6.0.2 (<a href="https://android.googlesource.com/toolchain/clang" target="_blank">https://android.googlesource.<wbr>com/toolchain/clang</a> 183abd29fc496f55536e7d904e0aba<wbr>e47888fc7f) (<a href="https://android.googlesource.com/toolchain/llvm" target="_blank">https://android.googlesource.<wbr>com/toolchain/llvm</a> 34361f192e41ed6e4e8f9aca80a4ea<wbr>7e9856f327) (based on LLVM 6.0.2svn)<br><br></b></font></li><li><font face="monospace, monospace"><b>Main LLVM/clang : Flash clang version 7.0.332826 (<a href="https://git.llvm.org/git/clang" target="_blank">https://git.llvm.org/git/clan<wbr>g</a> 4029c7ddda99ecbfa144f0afec44a1<wbr>92c442b6e5) (<a href="https://git.llvm.org/git/llvm" target="_blank">https://git.llvm.org/git/llvm</a> 1181c40e0e24e0cca32e2609686db1<wbr>f14151fc1a) (based on LLVM 7.0.332826)</b></font></li></ol></div></div><div class="gmail_extra">And I saw improved battery usage in all these cases as published over there in my article. So, read the entire article before making assumptions... :p</div><div><div class="m_-1282158820698773283m_1423502755819717575h5"><div class="gmail_extra"><br></div><div class="gmail_extra"><div class="gmail_quote">On Thu, Jun 14, 2018 at 3:16 PM, Jean-Michaël Celerier <span dir="ltr"><<a href="mailto:jeanmichael.celerier@gmail.com" target="_blank">jeanmichael.celerier@gmail.co<wbr>m</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><span class="m_-1282158820698773283m_1423502755819717575m_-5890353271184140739gmail-"><div>> The main advantage of the clang-built Android ARM(32-bit) hammerhead kernel for my Nexus 5 has been the better battery usage when compared to that of gcc-built kernel, with the same kernel config and hardware(my Nexus 5 Android Smartphone). Details of the same can be found below.</div><div><br></div></span><div>To be fair, the GCC version which comes with the android ndk has not been updated for four years, while the clang version is kept up-to-date. It would be interesting to compare clang and GCC latest releases instead... that's where the future lies :p <br></div><div class="gmail_extra"><div><div class="m_-1282158820698773283m_1423502755819717575m_-5890353271184140739gmail-m_-4749345979364312879gmail_signature"><div dir="ltr"><div><font color="#783f04"><br></font></div><div><font size="2" face="arial, helvetica, sans-serif" color="#134f5c">-------</font></div><font size="2" face="arial, helvetica, sans-serif" color="#134f5c">Jean-Michaël Celerier</font><div><font size="2" face="arial, helvetica, sans-serif" color="#134f5c"><a href="http://www.jcelerier.name" target="_blank">http://www.jcelerier.name</a></font></div></div></div></div>
<br></div></div>
</blockquote></div><br></div></div></div></div>
</blockquote></div><br></div></div></div>
</blockquote></div><br></div></div></div>