<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <div class="moz-cite-prefix">On 7/27/22 7:46 PM, Julian Waters
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:CAP2b4GNOci6vPi2fPpF1QFCqUrUn+xG3=-TG1gT3YC0xggeFuQ@mail.gmail.com">
      
      <div dir="ltr">What would be a good way to test for the strip
        executable? The easiest solution off the top of my head is to
        assume a particular compiler uses a particular strip, but that
        sounds a little too inflexible.
        <div><br>
        </div>
      </div>
    </blockquote>
    <p>Maybe assuming based on toolchain is good enough, it depends on
      how big the differences are between different tool variants. Maybe
      strip from llvm and gnu are similar enough that it doesn't matter?
      I haven't investigated so I don't know.</p>
    <p>To really probe, see examples of how we probe for compiler flags
      in flags.m4 FLAGS_C_COMPILER_CHECK_ARGUMENTS. We would need
      something similar for strip in that case. But as said, it might be
      overkill.</p>
    <p>In the case of strip, some toolchains (microsoft) doesn't even
      use it at all.</p>
    <p>/Erik<br>
    </p>
    <blockquote type="cite" cite="mid:CAP2b4GNOci6vPi2fPpF1QFCqUrUn+xG3=-TG1gT3YC0xggeFuQ@mail.gmail.com">
      <div dir="ltr">
        <div>best regards,</div>
        <div>Julian</div>
      </div>
      <br>
      <div class="gmail_quote">
        <div dir="ltr" class="gmail_attr">On Wed, Jul 27, 2022 at 1:04
          AM <<a href="mailto:erik.joelsson@oracle.com" moz-do-not-send="true" class="moz-txt-link-freetext">erik.joelsson@oracle.com</a>>
          wrote:<br>
        </div>
        <blockquote class="gmail_quote" style="margin:0px 0px 0px
          0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">I'm
          not very familiar with this, but it looks like clang/llvm does
          come <br>
          with its own strip utility, which would make this comment
          wrong.<br>
          <br>
          On Linux, it's likely common to find the gnu binutils strip on
          the path <br>
          even when trying to use clang to compile OpenJDK. Ideally we
          should <br>
          setup STRIPFLAGS based on probing the strip executable that
          was found.<br>
          <br>
          /Erik<br>
          <br>
          On 7/24/22 1:07 AM, Julian Waters wrote:<br>
          > Found something interesting in FLAGS_SETUP_STRIPFLAGS
          recently:<br>
          > ## Setup strip.<br>
          > # FIXME: should this really be per platform, or should it
          be per <br>
          > toolchain type?<br>
          > # strip is not provided by clang; so guessing platform
          makes most sense.<br>
          ><br>
          > STRIPFLAGS is set to -S after this for clang (or more
          accurately, when <br>
          > the OS being compiled for is MacOS), but STRIP for clang
          (Likely using <br>
          > the clang driver itself) doesn't seem to be set anywhere
          within make. <br>
          > The only place I can find it being set is in <br>
          > toolchain.m4, UTIL_LOOKUP_TOOLCHAIN_PROGS(STRIP, strip),
          when the OS <br>
          > that's being compiled for != windows. But if the comment
          that strip <br>
          > isn't available for clang is still correct and up to
          date, this <br>
          > doesn't seem right, considering Linux allows for
          compiling the JDK <br>
          > with clang as well, while -S is only set with MacOS, and
          the != <br>
          > windows check would also not work properly since it would
          still check <br>
          > for the regular strip utility even if the compiler was
          clang.<br>
          ><br>
          > best regards,<br>
          > Julian<br>
        </blockquote>
      </div>
    </blockquote>
  </body>
</html>