<div dir="ltr"><div dir="ltr">Hi,<div><br><div>Here is a public gist with the repro steps: <a href="https://gist.github.com/akshithg/e5a58fc7012a65e6ec2e94794d66569f">https://gist.github.com/akshithg/e5a58fc7012a65e6ec2e94794d66569f</a></div></div><div>It should have 1) the config i'm using 2) the toolchain version 3) build steps</div><div><br></div><div>Feel free to shoot more questions if you need more details :)</div><div><br></div></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 8, 2021 at 7:24 AM Sriraman Tallam <<a href="mailto:tmsriram@google.com">tmsriram@google.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 7, 2021 at 10:39 PM David Blaikie <<a href="mailto:dblaikie@gmail.com" target="_blank">dblaikie@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr">BB sections has only been tested/implemented with a fairly narrow set of flags so far as I know, and is sufficiently novel that various features won't interact correctly with it without some work to support the combination of bb sections and those features.<br><br>I'd /guess/ BPF, for instance, probably doesn't work with BB sections out of the box & may require some work (like some work was needed to support BB sections with DWARF) - I believe BPF is mandatory/used by default when building the Linux kernel? So maybe that's what's being tripped over here. But could something else entirely - that's just my first guess.</div></blockquote><div><br></div><div>Right, we have not tried to build the linux kernel with these flags but it is something we would like to test and fix.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Mon, Jun 7, 2021 at 9:15 PM A G via llvm-dev <<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr">Hi,<div>I'm trying to build the linux kernel with <b>`clang -fbasic-block-sections=labels`.</b></div></div></div></div></div></div></blockquote></div></blockquote><div><br></div><div>Labels does not actually generate sections and it must be a simpler step as it only adds metadata to the binary.</div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div><br></div>I ran into this error:</div><div dir="ltr"><br><font face="monospace">/tmp/main-81886d.s: Assembler messages:<br>/tmp/main-81886d.s: Error: .size expression for .BB.set_reset_devices does not evaluate to a constant<br>/tmp/main-81886d.s: Error: .size expression for .BB.debug_kernel does not evaluate to a constant<br>/tmp/main-81886d.s: Error: .size expression for .BB.quiet_kernel does not evaluate to a constant<br>/tmp/main-81886d.s: Error: .size expression for .BB.loglevel does not evaluate to a constant</font></div></div></div></div></div></blockquote></div></blockquote><div><br></div><div><br></div><div>Would you be able to give us a smaller repro for this, we can take a look.  Basic block labels uses size expressions when generating metadata and it looks like we are not doing this right under some circumstances. </div><div><br></div><div> </div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><div dir="ltr"><br></div><div><span style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">make kernelversion</span><br style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><span style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">5.10.0</span><br></div><div><span style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px"><br></span></div><div><div style="color:rgba(0,0,0,0.87);font-family:Roboto,RobotoDraft,Helvetica,Arial,sans-serif;font-size:14px">clang version 11.1.0 (g...@github.com:llvm/llvm-project.git 1fdec59bffc11ae37eb51a1b9869f0696bfd5312)<br>Target: x86_64-unknown-linux-gnu</div><br style="color:rgb(0,0,0)"></div><div dir="ltr"><br></div><div>1. Can someone help me understand what this error means?</div><div>2. Is <b>clang-built-linux</b> a better place to ask this question?</div><div>3. Is there a workaround for this?</div><div><br></div><div>Thanks</div><div>Akshith</div><div><br></div></div></div></div></div>
_______________________________________________<br>
LLVM Developers mailing list<br>
<a href="mailto:llvm-dev@lists.llvm.org" target="_blank">llvm-dev@lists.llvm.org</a><br>
<a href="https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev" rel="noreferrer" target="_blank">https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev</a><br>
</blockquote></div>
</blockquote></div><br clear="all"><div><br></div>-- <br><div dir="ltr"><div dir="ltr"><span><br><div dir="ltr" style="margin-left:0pt" align="left"><table style="border:none;border-collapse:collapse"><colgroup><col width="111"><col width="158"><col width="190"><col width="16"></colgroup><tbody><tr style="height:29.25pt"><td style="border-top-width:1.5pt;border-top-style:solid;border-top-color:rgb(213,15,37);vertical-align:top;padding:5pt;overflow:hidden"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:13pt;font-family:Roboto,sans-serif;color:rgb(136,136,136);font-weight:700;vertical-align:baseline;white-space:pre-wrap">Sri</span><span style="font-size:12pt;font-family:Roboto,sans-serif;color:rgb(136,136,136);vertical-align:baseline;white-space:pre-wrap">    Tallam |</span></p></td><td style="border-top-width:1.5pt;border-top-style:solid;border-top-color:rgb(51,105,232);vertical-align:top;padding:5pt;overflow:hidden"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;font-family:Roboto,sans-serif;color:rgb(136,136,136);vertical-align:baseline;white-space:pre-wrap"> Software Engineer |</span></p></td><td style="border-top-width:1.5pt;border-top-style:solid;border-top-color:rgb(0,153,57);vertical-align:top;padding:5pt;overflow:hidden"><p dir="ltr" style="line-height:1.38;margin-top:0pt;margin-bottom:0pt"><span style="font-size:12pt;font-family:Roboto,sans-serif;color:rgb(136,136,136);vertical-align:baseline;white-space:pre-wrap"> </span><span style="font-size:12pt;font-family:Roboto,sans-serif;color:rgb(17,85,204);vertical-align:baseline;white-space:pre-wrap"><a href="mailto:tmsriram@google.com" target="_blank">tmsriram@google.com</a></span><span style="font-size:12pt;font-family:Roboto,sans-serif;color:rgb(136,136,136);vertical-align:baseline;white-space:pre-wrap"> |</span></p></td></tr></tbody></table></div></span><div></div></div></div></div>
</blockquote></div>