Fix various problems like: Fix wrong function parameter types, fix build warnings, handle -march= in DRIVER_SELF_SPEC, fix non-existing %-code, add avr-libc awareness as of PR54461, do not use avr-libc features if configured with --with-avrlibc=no, code clean-up, remove dead files, code and macros ...
Author: gjl Date: Tue Mar 3 11:03:16 2015 New Revision: 221141 URL: https://gcc.gnu.org/viewcvs?rev=221141&root=gcc&view=rev Log: gcc/ Fix various problems with specs file generation. PR target/65296 * config.gcc (extra_gcc_objs) [avr]: Remove. * config/avr/driver-avr.c: Remove file. * config/avr/t-avr (driver-avr.o): Remove rule. (gen-avr-mmcu-specs): Use CXX_FOR_BUILD, CXXFLAGS_FOR_BUILD and INCLUDES to build. Depend on TM_H. * config/avr/gen-avr-mmcu-specs.c: Tidy up code. Fix various build warnings. Fix non-matching types and non-existing %-codes. (tm.h): Include. (*lib) [!WITH_AVRLIBC]: Don't link libdev.a. (*libgcc) [WITH_AVRLIBC]: Add "-lm". * config/avr/avrlibc.h (LIBGCC_SPEC): Remove definition. * config/avr/avr.h (DRIVER_SELF_SPECS): Fix handling of -march=. (CPP_SPEC, CC1PLUS_SPEC, ASM_SPEC, LINK_SPEC, LIB_SPEC) (LIBGCC_SPEC): Remove definitions. Removed: trunk/gcc/config/avr/driver-avr.c Modified: trunk/gcc/ChangeLog trunk/gcc/config.gcc trunk/gcc/config/avr/avr.h trunk/gcc/config/avr/avrlibc.h trunk/gcc/config/avr/gen-avr-mmcu-specs.c trunk/gcc/config/avr/t-avr
Author: gjl Date: Tue Mar 3 11:31:05 2015 New Revision: 221144 URL: https://gcc.gnu.org/viewcvs?rev=221144&root=gcc&view=rev Log: PR target/65296 * config.gcc (extra_gcc_objs) [avr-*-rtems*]: Remove. Modified: trunk/gcc/ChangeLog trunk/gcc/config.gcc
Author: gjl Date: Tue Mar 10 09:50:41 2015 New Revision: 221316 URL: https://gcc.gnu.org/viewcvs?rev=221316&root=gcc&view=rev Log: PR target/65296 * config.gcc (extra_options) [avr]: Remove. (extra_gcc_objs) [avr]: Use driver-avr.o, avr-devices.o. (tm_file) [avr]: Add avr/specs.h after avr/avr.h. (tm_defines) [avr-*-rtems*]: Add WITH_RTEMS. * config/avr/avr.opt (config/avr/avr-arch.h): Remove include. (-mmcu=): Add Var and MissingArgError properties. (-march=): Remove. * config/avr/genmultilib.awk: Use -mmcu= instead of -march=. * config/avr/t-multilib: Regenerate. * config/avr/specs.h: New file. * config/avr/driver-avr.c: New file. * config/avr/genopt.sh: Remove file. * config/avr/avr-tables.opt: Remove file. * config/avr/predicates.md (avr_current_arch): Rename to avr_arch. * config/avr/avr-c.c: Same. * avr-arch.h: Same. (avr_current_device): Remove proto. * config/avr/avr.h (avr_current_arch): Rename to avr_arch. (AVR_HAVE_8BIT_SP): Don't depend on avr_current_device. (EXTRA_SPEC_FUNCTIONS): Define. (avr_devicespecs_file): New specs function proto. (DRIVER_SELF_SPECS): Use device-specs-file spec function. * config/avr/avr.c (avr_current_arch): Rename to avr_arch. (avr_current_device): Remove definition and usage. (avr_set_core_architecture): New static function. (avr_option_override): Use it. * config/avr/avr-devices.c (diagnostic.h, avr-arch.h): Include them. (mcu_name): New static array. (comparator, avr_archs_str, avr_mcus_str): New static functions. (avr_inform_devices, avr_inform_core_architectures): New functions. * config/avr/gen-avr-mmcu-specs.c (avr-arch.h, specs.h): Include. (avrlibc.h) [WITH_AVRLIBC]: Include. (../rtems.h, rtems.h) [WITH_RTEMS]: Include. (print_mcu): Rewrite from scratch. * config/avr/avrlibc.h (LIB_SPEC, LIBGCC_SPEC, STARTFILE_SPEC): Forward to avr-specific specs defined in device-specs file. * config/avr/t-avr (driver-avr.o): New rule. (avr-devices.o): Depend on avr-arch.h. (avr-mcus): No more depend on avr-tables.opt. (avr-tables.opt): Remove rule. (install-device-specs): Use INSTALL_DATA, not INSTALL_PROGRAM. Added: trunk/gcc/config/avr/driver-avr.c trunk/gcc/config/avr/specs.h Removed: trunk/gcc/config/avr/avr-tables.opt trunk/gcc/config/avr/genopt.sh Modified: trunk/gcc/ChangeLog trunk/gcc/config.gcc trunk/gcc/config/avr/avr-arch.h trunk/gcc/config/avr/avr-c.c trunk/gcc/config/avr/avr-devices.c trunk/gcc/config/avr/avr-mcus.def trunk/gcc/config/avr/avr.c trunk/gcc/config/avr/avr.h trunk/gcc/config/avr/avr.opt trunk/gcc/config/avr/avrlibc.h trunk/gcc/config/avr/gen-avr-mmcu-specs.c trunk/gcc/config/avr/gen-avr-mmcu-texi.c trunk/gcc/config/avr/genmultilib.awk trunk/gcc/config/avr/predicates.md trunk/gcc/config/avr/t-avr trunk/gcc/config/avr/t-multilib
Author: gjl Date: Wed Mar 11 18:35:52 2015 New Revision: 221354 URL: https://gcc.gnu.org/viewcvs?rev=221354&root=gcc&view=rev Log: gcc/ PR target/65296 * configure.ac [avr]: Check as for option -mrmw. * configure: Regenerate. * config.in: Regenerate. * config/avr/driver-avr.c (avr_device_to_as): Don't add -mrmw to assembler options if not HAVE_AS_AVR_MRMW_OPTION. Modified: branches/gcc-4_9-branch/gcc/ChangeLog branches/gcc-4_9-branch/gcc/config.in branches/gcc-4_9-branch/gcc/config/avr/driver-avr.c branches/gcc-4_9-branch/gcc/configure branches/gcc-4_9-branch/gcc/configure.ac
Author: gjl Date: Wed Mar 11 18:51:09 2015 New Revision: 221355 URL: https://gcc.gnu.org/viewcvs?rev=221355&root=gcc&view=rev Log: gcc/ PR target/65296 * configure.ac [avr]: Check as for options -mrmw, --mlink-relax. * configure: Regenerate. * config.in: Regenerate. * doc/invoke.texi (AVR Options) [-mrmw]: Document it. [-mn-flash]: Document it. [__AVR_ARCH__]: Document avrtiny. * config/avr/gen-avr-mmcu-specs.c (config.h): Include it. (*asm_relax): Only define spec if HAVE_AS_AVR_MLINK_RELAX_OPTION. (*asm_rmw): Only define spec if HAVE_AS_AVR_MRMW_OPTION. gcc/testsuite/ PR target/65296 * gcc.target/avr/tiny-memx: Use -mmcu instead of -march. * gcc.target/avr/tiny-caller-save.c: Same. Modified: trunk/gcc/ChangeLog trunk/gcc/config.in trunk/gcc/config/avr/gen-avr-mmcu-specs.c trunk/gcc/configure trunk/gcc/configure.ac trunk/gcc/doc/invoke.texi trunk/gcc/testsuite/ChangeLog trunk/gcc/testsuite/gcc.target/avr/tiny-caller-save.c trunk/gcc/testsuite/gcc.target/avr/tiny-memx.c
Author: gjl Date: Tue Mar 17 10:34:11 2015 New Revision: 221475 URL: https://gcc.gnu.org/viewcvs?rev=221475&root=gcc&view=rev Log: PR target/65296 * config/avr/avr.opt (-nodevicelib): New option. * doc/invoke.texi (AVR Options): Document it. * config/avr/avrlibc.h (LIB_SPEC, LIBGCC_SPEC) [avr1]: Don't link libgcc.a, libc.a, libm.a. * config/avr/specs.h: Same. * config/avr/gen-avr-mmcu-specs.c (print_mcu): Don't print specs which don't (directly) depend on the device. Print more help. (*avrlibc_devicelib) [-nodevicelib]: Don't link libdev.a. (*cpp): Don't define __AVR_DEV_LIB_NAME__. * config/avr/driver-avr.c: Remove -nodevicelib from option list in case of an error. (avr_devicespecs_file): Use suffix "%s" instead of absolute path for specs file name. * config/avr/avr-arch.h (avr_mcu_t) [.library_name]: Remove. * config/avr/avr-mcus.def: Adjust initializers and comments. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-arch.h trunk/gcc/config/avr/avr-devices.c trunk/gcc/config/avr/avr-mcus.def trunk/gcc/config/avr/avr.opt trunk/gcc/config/avr/avrlibc.h trunk/gcc/config/avr/driver-avr.c trunk/gcc/config/avr/gen-avr-mmcu-specs.c trunk/gcc/config/avr/specs.h trunk/gcc/doc/invoke.texi
Author: gjl Date: Mon Mar 23 18:19:01 2015 New Revision: 221602 URL: https://gcc.gnu.org/viewcvs?rev=221602&root=gcc&view=rev Log: PR target/65296 * config/avr/driver-avr.c (avr_devicespecs_file): Allow to specify the same -mmcu=MCU more than once. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/driver-avr.c
Author: gjl Date: Thu Apr 9 11:37:11 2015 New Revision: 221947 URL: https://gcc.gnu.org/viewcvs?rev=221947&root=gcc&view=rev Log: PR target/65296 * config/avr/driver-avr.c (avr_devicespecs_file): Don't specify a device specs file if "device-specs%s" didn't resolve to a path. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/driver-avr.c
Author: gjl Date: Fri Apr 17 13:54:16 2015 New Revision: 222179 URL: https://gcc.gnu.org/viewcvs?rev=222179&root=gcc&view=rev Log: PR target/65296 * config/avr/gen-avr-mmcu-specs.c (*avrlibc_startfile): Adjust to new AVR-LibC file layout (bug #44574). (*avrlibc_devicelib): Same. * config/avr/avr-mcus.def: Adjust comments. * config/avr/avr.opt (nodevicelib): Adjust help. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/avr-mcus.def trunk/gcc/config/avr/avr.opt trunk/gcc/config/avr/gen-avr-mmcu-specs.c
Author: gjl Date: Wed Apr 22 16:14:50 2015 New Revision: 222333 URL: https://gcc.gnu.org/viewcvs?rev=222333&root=gcc&view=rev Log: Backport from trunk r222179. 2015-04-17 Sivanupandi Pitchumani <Pitchumani.Sivanupandi@atmel.com> PR target/65296 * config/avr/gen-avr-mmcu-specs.c (*avrlibc_startfile): Adjust to new AVR-LibC file layout (bug #44574). (*avrlibc_devicelib): Same. * config/avr/avr-mcus.def: Adjust comments. * config/avr/avr.opt (nodevicelib): Adjust help. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/avr/avr-mcus.def branches/gcc-5-branch/gcc/config/avr/avr.opt branches/gcc-5-branch/gcc/config/avr/gen-avr-mmcu-specs.c
Fixed in 5.2. Please keep in mind hat this issue is related to https://savannah.nongnu.org/bugs/?44574
Author: gjl Date: Mon Apr 27 11:43:20 2015 New Revision: 222459 URL: https://gcc.gnu.org/viewcvs?rev=222459&root=gcc&view=rev Log: PR target/65296 PR target/65895 * config/avr/gen-avr-mmcu-specs.c (print_mcu): Close file. Add hint how to use own spec file. Modified: trunk/gcc/ChangeLog trunk/gcc/config/avr/gen-avr-mmcu-specs.c
Author: gjl Date: Mon Apr 27 11:49:42 2015 New Revision: 222460 URL: https://gcc.gnu.org/viewcvs?rev=222460&root=gcc&view=rev Log: Backport from 2015-04-27 trunk r222459. PR target/65296 PR target/65895 * config/avr/gen-avr-mmcu-specs.c (print_mcu): Close file. Add hint how to use own spec file. Modified: branches/gcc-5-branch/gcc/ChangeLog branches/gcc-5-branch/gcc/config/avr/gen-avr-mmcu-specs.c