Fix for compiling on Solaris

Eric Christopher echristo at gmail.com
Fri Feb 27 11:15:49 PST 2015


Thanks!

-eric

On Fri, Feb 27, 2015 at 11:11 AM Bill Rushmore <bill.rushmore at oracle.com>
wrote:

>  Eric,
>
> The Solaris linker's equivalent is (sorry I didn't realize this earlier):
>
> -Wl,-z -Wl,discard-unused=sections
>
>
> We can use -ffunction-section/-fdata-sections with Solaris' GCC. We also
> need to pass -falign-functions=8.
>
> I will rework the patch with these changes, test it, and then resend.
>
> Bill
>
>
> On 2/27/2015 10:27 AM, Eric Christopher wrote:
>
> Hi Bill,
>
> Will the sun linker gc the sections itself then? or do we need to avoid
> using -ffunction-section/-fdata-sections as well?
>
>  -eric
>
> On Fri, Feb 27, 2015 at 10:09 AM bill rushmore <bill.rushmore at oracle.com>
> wrote:
>
>> I have a very simple patch for Makefile.rules that solves the problem of
>> trying to build on Solaris.  The issue is that Solaris' gcc uses the
>> Solaris linker and that linker doesn't have the --gc-sections flag.
>> This patch fixes Bug 18517.
>>
>> Bill Rushmore
>> _______________________________________________
>> llvm-commits mailing list
>> llvm-commits at cs.uiuc.edu
>> http://lists.cs.uiuc.edu/mailman/listinfo/llvm-commits
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20150227/ada0f701/attachment.html>


More information about the llvm-commits mailing list