<html>
  <head>
    <meta content="text/html; charset=utf-8" http-equiv="Content-Type">
  </head>
  <body bgcolor="#FFFFFF" text="#000000">
    Eric,<br>
    <br>
    The Solaris linker's equivalent is (sorry I didn't realize this
    earlier): <br>
    <pre wrap="">-Wl,-z -Wl,discard-unused=sections

</pre>
    We can use -ffunction-section/-fdata-sections with Solaris' GCC. We
    also need to pass -falign-functions=8.<br>
    <br>
    I will rework the patch with these changes, test it, and then
    resend. <br>
    <br>
    Bill<br>
    <br>
    <div class="moz-cite-prefix">On 2/27/2015 10:27 AM, Eric Christopher
      wrote:<br>
    </div>
    <blockquote
cite="mid:CALehDX5S+g0z_BLwVADp9vgwEo_NSuKBTuupEguX6pbcEynh8Q@mail.gmail.com"
      type="cite">
      <div dir="ltr">Hi Bill,<br>
        <br>
        Will the sun linker gc the sections itself then? or do we need
        to avoid using -ffunction-section/-fdata-sections as well?
        <div><br>
        </div>
        <div>-eric</div>
      </div>
      <br>
      <div class="gmail_quote">On Fri, Feb 27, 2015 at 10:09 AM bill
        rushmore <<a moz-do-not-send="true"
          href="mailto:bill.rushmore@oracle.com">bill.rushmore@oracle.com</a>>
        wrote:<br>
        <blockquote class="gmail_quote" style="margin:0 0 0
          .8ex;border-left:1px #ccc solid;padding-left:1ex">I have a
          very simple patch for Makefile.rules that solves the problem
          of<br>
          trying to build on Solaris.  The issue is that Solaris' gcc
          uses the<br>
          Solaris linker and that linker doesn't have the --gc-sections
          flag.<br>
          This patch fixes Bug 18517.<br>
          <br>
          Bill Rushmore<br>
          _______________________________________________<br>
          llvm-commits mailing list<br>
          <a moz-do-not-send="true"
            href="mailto:llvm-commits@cs.uiuc.edu" target="_blank">llvm-commits@cs.uiuc.edu</a><br>
          <a moz-do-not-send="true"
            href="http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits"
            target="_blank">http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits</a><br>
        </blockquote>
      </div>
    </blockquote>
    <br>
  </body>
</html>