2013/11/18 Senthil Kumar Selvaraj <senthil_kumar.selva...@atmel.com>:
> Ping!
>
> Regards
> Senthil
>
> On Mon, Nov 04, 2013 at 06:45:19PM +0530, Senthil Kumar Selvaraj wrote:
>> The AVR backend does not generate position independent code, yet it
>> happily accepts -fpic, -fPIC, -fpie and -fPIE. The generated code
>> doesn't change at all. Also, it accepts the -shared option to generate a
>> shared library, without really doing anything with it.
>>
>> This causes one of the regression tests
>> (gcc.dg/lto/pr54709 c_lto_pr54709_0.o-c_lto_pr54709_1.o link) to fail with
>> an 'undefined reference to main' error, when the test is trying to build
>> a shared object.
>>
>> The attached patch generates a warning if one of the -f{pic,PIC,pie,PIE}
>> options is provided, and an error if -shared is provided (
>> config/mep/mep.c and config/s390/tpf.h already do something very similar).
>>
>> Regression tested with no new failures.Tests which exercise PIC now report as
>> unsupported.
>>
>> If ok, could someone commit please? I don't have commit access.
>>
>> Regards
>> Senthil
>>
>> gcc/ChangeLog
>> 2013-11-04  Senthil Kumar Selvaraj  <senthil_kumar.selva...@atmel.com>
>>
>>       * config/avr/avr.c (avr_option_override): Warn if asked to generate
>>       position independent code.
>>       * config/avr/avr.h: Modify LINK_SPEC to reject -shared.
>>

Sorry for delay. (I was on vacation)

Committed.

Denis.

Reply via email to