[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-27 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296
Bug 65296 depends on bug 65895, which changed state.

Bug 65895 Summary: Segfault building cross GCC 5.1.0 for Target AVR on Mac OSX 
10.10.3 (using Apple LLVM version 6.1.0 (clang-602.0.49))
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65895

   What|Removed |Added

 Status|UNCONFIRMED |RESOLVED
 Resolution|--- |FIXED


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-27 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #12 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Mon Apr 27 11:43:20 2015
New Revision: 222459

URL: https://gcc.gnu.org/viewcvs?rev=222459root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-27 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #13 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Mon Apr 27 11:49:42 2015
New Revision: 222460

URL: https://gcc.gnu.org/viewcvs?rev=222460root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-23 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

   Keywords||link-failure
 Status|ASSIGNED|RESOLVED
URL||https://savannah.nongnu.org
   ||/bugs/?44574
 Resolution|--- |FIXED

--- Comment #11 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Fixed in 5.2.  Please keep in mind hat this issue is related to
https://savannah.nongnu.org/bugs/?44574


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-22 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #10 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Apr 22 16:14:50 2015
New Revision: 222333

URL: https://gcc.gnu.org/viewcvs?rev=222333root=gccview=rev
Log:
Backport from trunk r222179.
2015-04-17  Sivanupandi Pitchumani pitchumani.sivanupa...@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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-17 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #9 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Fri Apr 17 13:54:16 2015
New Revision: 222179

URL: https://gcc.gnu.org/viewcvs?rev=222179root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-17 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

   Target Milestone|--- |5.2


[Bug target/65296] [avr] fix various issues with specs file generation

2015-04-09 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #8 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Thu Apr  9 11:37:11 2015
New Revision: 221947

URL: https://gcc.gnu.org/viewcvs?rev=221947root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-23 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #7 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Mon Mar 23 18:19:01 2015
New Revision: 221602

URL: https://gcc.gnu.org/viewcvs?rev=221602root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-17 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #6 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Tue Mar 17 10:34:11 2015
New Revision: 221475

URL: https://gcc.gnu.org/viewcvs?rev=221475root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-11 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #4 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Mar 11 18:35:52 2015
New Revision: 221354

URL: https://gcc.gnu.org/viewcvs?rev=221354root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-11 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #5 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Wed Mar 11 18:51:09 2015
New Revision: 221355

URL: https://gcc.gnu.org/viewcvs?rev=221355root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-10 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #3 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Tue Mar 10 09:50:41 2015
New Revision: 221316

URL: https://gcc.gnu.org/viewcvs?rev=221316root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-03 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

Georg-Johann Lay gjl at gcc dot gnu.org changed:

   What|Removed |Added

   Priority|P3  |P4
 Status|UNCONFIRMED |ASSIGNED
   Last reconfirmed||2015-03-03
   Assignee|unassigned at gcc dot gnu.org  |gjl at gcc dot gnu.org
 Ever confirmed|0   |1


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-03 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #1 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Tue Mar  3 11:03:16 2015
New Revision: 221141

URL: https://gcc.gnu.org/viewcvs?rev=221141root=gccview=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


[Bug target/65296] [avr] fix various issues with specs file generation

2015-03-03 Thread gjl at gcc dot gnu.org
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=65296

--- Comment #2 from Georg-Johann Lay gjl at gcc dot gnu.org ---
Author: gjl
Date: Tue Mar  3 11:31:05 2015
New Revision: 221144

URL: https://gcc.gnu.org/viewcvs?rev=221144root=gccview=rev
Log:
PR target/65296
* config.gcc (extra_gcc_objs) [avr-*-rtems*]: Remove.


Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc