<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Thanks for the suggestion. Here's an updated version that's a bit
cleaner.<br>
<br>
Bill<br>
<br>
<div class="moz-cite-prefix">On 2/27/2015 2:25 PM, Eric Christopher
wrote:<br>
</div>
<blockquote
cite="mid:CALehDX4vkGYMZcRcvHF-FyHvtQ4WXx-gwKEi0kLjXsdxDf9_0Q@mail.gmail.com"
type="cite">
<div dir="ltr">I think you want:<br>
<br>
<div>@@ -638,10 +641,13 @@</div>
<div> ifeq ($(HOST_OS),Darwin)</div>
<div> LD.Flags += -Wl,-dead_strip</div>
<div> else</div>
<div>- ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW))</div>
<div>+ ifneq ($(HOST_OS), $(filter $(HOST_OS), Cygwin MingW
SunOS))</div>
<div> LD.Flags += -Wl,--gc-sections</div>
<div> endif</div>
<div> endif</div>
<div>+ ifeq ($(HOST_OS),SunOS)</div>
<div>+ LD.Flags += -Wl,-z -Wl,discard-unused=sections</div>
<div>+ endif </div>
<div><br>
</div>
<div>to have and else ifeq under darwin and then else ifneq for
the Cygwin bits.</div>
<div><br>
</div>
<div>At any rate the SunOS bit should be hoisted.</div>
<div><br>
</div>
<div>-eric</div>
</div>
<br>
<div class="gmail_quote">On Fri, Feb 27, 2015 at 1:36 PM 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">
<div bgcolor="#FFFFFF" text="#000000"> Here's the updated
patch with the new flags for Solaris.</div>
<div bgcolor="#FFFFFF" text="#000000"><br>
<br>
Bill</div>
<div bgcolor="#FFFFFF" text="#000000"><br>
<br>
<div>On 2/27/2015 11:15 AM, Eric Christopher wrote:<br>
</div>
<blockquote type="cite">
<div dir="ltr">Thanks!<br>
<br>
-eric</div>
<br>
<div class="gmail_quote">On Fri, Feb 27, 2015 at 11:11 AM
Bill Rushmore <<a moz-do-not-send="true"
href="mailto:bill.rushmore@oracle.com" target="_blank">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">
<div bgcolor="#FFFFFF" text="#000000"> Eric,<br>
<br>
The Solaris linker's equivalent is (sorry I didn't
realize this earlier): <br>
<pre>-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>
</div>
<div bgcolor="#FFFFFF" text="#000000"> <br>
Bill</div>
<div bgcolor="#FFFFFF" text="#000000"><br>
<br>
<div>On 2/27/2015 10:27 AM, Eric Christopher wrote:<br>
</div>
<blockquote 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"
target="_blank">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>
</div>
</blockquote>
</div>
</blockquote>
<br>
</div>
</blockquote>
</div>
</blockquote>
<br>
</body>
</html>