#
# Auto-generated specs for AVR device ATxmega128D4 (core avrxmega6, 16-bit SP)
#
# Generated by   : ./gcc/config/avr/gen-avr-mmcu-specs.cc
# Generated from : ./gcc/config/gcc.cc
#                  ./gcc/config/avr/specs.h
#                  ./gcc/config/avr/avrlibc.h
# Used by        : avr-gcc compiler driver
# Used for       : building command options for sub-processes
#
# See <https://gcc.gnu.org/onlinedocs/gcc/Spec-Files.html>
# for a documentation of spec files.


# If you intend to use an existing device specs file as a starting point
# for a new device spec file, make sure you are copying from a specs file
# for a device from the same or compatible:
#     compiler version, compiler vendor, core architecture, SP width,
#     short-calls, features like CVT and FLMAP.
# Otherwise, errors and wrong or sub-optimal code may likely occur.
# See <https://gcc.gnu.org/wiki/avr-gcc#spec-files>
# and <https://gcc.gnu.org/gcc-5/changes.html> for a description
# of how to use such own spec files.

*avrlibc_startfile:
	%{!mcvt:crtatxmega128d4.o%s} %{mcvt:%eATxmega128D4 does not support a compact vector table (-mcvt)}

*avrlibc_devicelib:
	%{!nodevicelib:-latxmega128d4}

*check_rodata_in_ram:
	%{mno-rodata-in-ram: %e-mno-rodata-in-ram is not supported for ATxmega128D4 (arch=avrxmega6)}

*cc1_n_flash:
	%{!mn-flash=*:-mn-flash=3}

*cc1_rmw:
	%{mrmw}

*cc1_errata_skip:
	%{!mskip-bug: -mno-skip-bug}

*cc1_absdata:
	%{mabsdata}

*cc1_rodata_in_ram:
	%(check_rodata_in_ram)

*asm_arch:
	-mmcu=avrxmega6

*asm_relax:
	%{mrelax:--mlink-relax} 

*asm_rmw:
	%{mrmw}

*asm_gccisr:
	%{!mno-gas-isr-prologues: -mgcc-isr}

*asm_errata_skip:
	%{!mskip-bug: -mno-skip-bug}

*link_pmem_wrap:


*link_relax:
	%{mrelax:--relax} 

*link_arch:
	%{mmcu=*:-m%*}

*link_data_start:


*link_text_start:


*link_rodata_in_ram:
	%(check_rodata_in_ram)

*self_spec:
	%<mmcu=* -mmcu=avrxmega6 %<mflmap %<mshort-calls %<msp8

# AVR-LibC's avr/io.h uses the device specifying macro to determine
# the name of the device header.  For example, -mmcu=atmega8a triggers
# the definition of __AVR_ATmega8A__ and avr/io.h includes the device
# header 'iom8a.h' by means of:
#
#     ...
#     #elif defined (__AVR_ATmega8A__)
#     #  include <avr/iom8a.h>
#     #elif ...
# 
# If no device macro is defined, AVR-LibC uses __AVR_DEV_LIB_NAME__
# as fallback to determine the name of the device header as
#
#     "avr/io" + __AVR_DEV_LIB_NAME__ + ".h"
#
# If you provide your own specs file for a device not yet known to
# AVR-LibC, you can now define the hook macro __AVR_DEV_LIB_NAME__
# as needed so that
#
#     #include <avr/io.h>
#
# will include the desired device header.  For ATmega8A the supplement
# to *cpp_avrlibc would read
#
#     -D__AVR_DEV_LIB_NAME__=m8a


*cpp_avrlibc:
	-D__AVR_DEVICE_NAME__=atxmega128d4

*cpp_mcu:
	-D__AVR_ATxmega128D4__

*cpp_rodata_in_ram:
	-D__AVR_RODATA_IN_RAM__=1

*cpp:
	%(cpp_mcu) %(cpp_rodata_in_ram) %(cpp_avrlibc)

# End of file
