avr.c (avr_option_override): Warn if asked to generate position independent code.

* 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.

From-SVN: r205633
This commit is contained in:
Senthil Kumar Selvaraj 2013-12-03 14:02:35 +00:00 committed by Denis Chertykov
parent a566cb5e81
commit 9af06df30b
3 changed files with 17 additions and 1 deletions

View File

@ -1,3 +1,9 @@
2013-12-03 Senthil Kumar Selvaraj <senthil_kumar.selvaraj@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.
2013-12-03 H.J. Lu <hongjiu.lu@intel.com>
PR target/59363

View File

@ -314,6 +314,15 @@ avr_option_override (void)
flag_omit_frame_pointer = 0;
}
if (flag_pic == 1)
warning (OPT_fpic, "-fpic is not supported");
if (flag_pic == 2)
warning (OPT_fPIC, "-fPIC is not supported");
if (flag_pie == 1)
warning (OPT_fpie, "-fpie is not supported");
if (flag_pie == 2)
warning (OPT_fPIE, "-fPIE is not supported");
avr_current_device = &avr_mcu_types[avr_mcu_index];
avr_current_arch = &avr_arch_types[avr_current_device->arch];

View File

@ -522,7 +522,8 @@ extern const char *avr_device_to_sp8 (int argc, const char **argv);
mmcu=at90can64*|\
mmcu=at90usb64*:--pmem-wrap-around=64k}}}\
%:device_to_ld(%{mmcu=*:%*})\
%:device_to_data_start(%{mmcu=*:%*})"
%:device_to_data_start(%{mmcu=*:%*})\
%{shared:%eshared is not supported}"
#define LIB_SPEC \
"%{!mmcu=at90s1*:%{!mmcu=attiny11:%{!mmcu=attiny12:%{!mmcu=attiny15:%{!mmcu=attiny28: -lc }}}}}"