This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch, build] Restore bootstrap in building libcc1 on darwin


On Thu, Dec 4, 2014 at 2:43 PM, Iain Sandoe <iain@codesourcery.com> wrote:
> Hi Rainer,
>
> On 4 Dec 2014, at 13:32, Rainer Orth wrote:
>
>> FX <fxcoudert@gmail.com> writes:
>>
>>> 10-days ping
>>> This restores bootstrap on a secondary target, target maintainer is OK with
>>> it. I think I need build maintainers approval, so please review.
>>
>> While in my testing, 64-bit Mac OS X 10.10.1 (x86_64-apple-darwin14.0.0)
>> now bootstraps, but 32-bit (i386-apple-darwin14.0.0) does not:
>>
>> ld: illegal text-relocation to 'anon' in ../libiberty/pic/libiberty.a(regex.o) from '_byte_common_op_match_null_string_p' in ../libiberty/pic/libiberty.a(regex.o) for architecture i386
>> collect2: error: ld returned 1 exit status
>> make[3]: *** [libcc1.la] Error 1
>> make[2]: *** [all] Error 2
>> make[1]: *** [all-libcc1] Error 2
>
> For {i?86,ppc}-darwin* (i.e. m32 hosts) the PIC libiberty library is being incorrectly built.
>
> The default BOOT_CFLAGS are: -O2 -g -mdynamic-no-pic
> the libiberty pic build appends: -fno-common (and not even -fPIC) [NB -fPIC _won't_ override -mdynamic-no-pic, so that's not a simple way out]
>
> This means that the PIC library is being built with non-pic relocs.
>
> I have a local hack to allow build to proceed on m32-host-darwin (which I can send to you if you would like it) - however, it's not really a suitable patch for trunk... and I've not had time recently to try and fix this.
>
> If you would like to raise a PR for this, I can append the analysis there.

The libiberty PIC build shouldn't use BOOT_CFLAGS.  How does
lto-plugin get around being built for the host but as a shared library?

Richard.

> cheers
> Iain
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]