[Bug target/42457] [4.5 Regression] AVR fails to build with other than C family languages

2009-12-24 Thread hutchinsonandy at gcc dot gnu dot org


--- Comment #6 from hutchinsonandy at gcc dot gnu dot org  2009-12-24 20:33 
---
Fixed 4.5


-- 

hutchinsonandy at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|NEW |RESOLVED
 Resolution||FIXED


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457



[Bug target/42457] [4.5 Regression] AVR fails to build with other than C family languages

2009-12-24 Thread hutchinsonandy at gcc dot gnu dot org


--- Comment #5 from hutchinsonandy at gcc dot gnu dot org  2009-12-24 20:32 
---
Subject: Bug 42457

Author: hutchinsonandy
Date: Thu Dec 24 20:32:38 2009
New Revision: 155460

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=155460
Log:
2009-12-24  Andy Hutchinson  

PR target/42457
* config/avr/avr.c (avr_extra_arch_macro): Remove static.
(avr_cpu_cpp_builtins): Remove.
* config/avr/avr.h (avr_extra_arch_macro): Add prototype.
* config/avr/avr-c.c: New File.
(avr_cpu_cpp_builtins) : Add.
* config/avr/t-avr: Add make information for avr-c.
* config.gcc (avr-*-*): Include avr-c.o as c and cpp object. 

Added:
trunk/gcc/config/avr/avr-c.c
Modified:
trunk/gcc/ChangeLog
trunk/gcc/config.gcc
trunk/gcc/config/avr/avr.c
trunk/gcc/config/avr/avr.h
trunk/gcc/config/avr/t-avr


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457



[Bug target/42457] [4.5 Regression] AVR fails to build with other than C family languages

2009-12-22 Thread hutchinsonandy at gcc dot gnu dot org


--- Comment #4 from hutchinsonandy at gcc dot gnu dot org  2009-12-22 21:20 
---
Testsuite fails all lto/whopr tests:

Example:


Executing on host: /media/verbatim/gcchead/obj-dir/gcc/xgcc
-B/media/verbatim/gcchead/obj-dir/gcc/
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
 -w  -O2 -flto  -fno-builtin-abs -DSTACK_SIZE=2048 -DNO_TRAMPOLINES 
-DSIGNAL_SUPPRESS -mmcu=atmega128 
/home/andy/winavrfiles/avrtest/dejagnuboards/exit.c -Wl,-u,vfprintf
-lprintf_flt -Wl,-Tbss=0x802000,--defsym=__heap_end=0x80  -lm   -o
/media/verbatim/gcchead/obj-dir/gcc/testsuite/gcc/abs-1.x6(timeout = 300)
spawn /media/verbatim/gcchead/obj-dir/gcc/xgcc
-B/media/verbatim/gcchead/obj-dir/gcc/
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1.c
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/abs-1-lib.c
/media/verbatim/gcchead/trunk/gcc/testsuite/gcc.c-torture/execute/builtins/lib/main.c
-w -O2 -flto -fno-builtin-abs -DSTACK_SIZE=2048 -DNO_TRAMPOLINES
-DSIGNAL_SUPPRESS -mmcu=atmega128
/home/andy/winavrfiles/avrtest/dejagnuboards/exit.c -Wl,-u,vfprintf
-lprintf_flt -Wl,-Tbss=0x802000,--defsym=__heap_end=0x80 -lm -o
/media/verbatim/gcchead/obj-dir/gcc/testsuite/gcc/abs-1.x6
/home/andy/local/avr/lib/gcc/avr/4.5.0/../../../../avr/bin/ld: -f may not be
used without -shared
compiler exited with status 1
output is:
/home/andy/local/avr/lib/gcc/avr/4.5.0/../../../../avr/bin/ld: -f may not be
used without -shared

FAIL: gcc.c-torture/execute/builtins/abs-1.c compilation,  -O2 -flto 


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457



[Bug target/42457] [4.5 Regression] AVR fails to build with other than C family languages

2009-12-22 Thread hutchinsonandy at gcc dot gnu dot org


--- Comment #3 from hutchinsonandy at gcc dot gnu dot org  2009-12-22 21:18 
---
Created an attachment (id=19375)
 --> (http://gcc.gnu.org/bugzilla/attachment.cgi?id=19375&action=view)
PATCH to add avr-c.c

Here is patch that I believe moves out the C related stuff to avr-c.

builtin_define_std and cpp_define are undeclared - since they have no
prototypes - which is pretty ugly.

Compiler now builds without disabling LTO - BUT I now have LTO/WHPR problems
with LD that is possibly a different bug.

I would like opinion on this before concluding the problem is fixed or indeed
solution is getting closer.


-- 


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457



[Bug target/42457] [4.5 Regression] AVR fails to build with other than C family languages

2009-12-21 Thread pinskia at gcc dot gnu dot org


--- Comment #2 from pinskia at gcc dot gnu dot org  2009-12-22 03:29 ---
A way to fix this is to have avr-c.c like most other targets have.  And declare
avr_cpu_cpp_builtins in there.  Note this change broke other languages besides
C/C++/Objective-C/Objective-C++ so this is a regression as at one point Ada was
building.


-- 

pinskia at gcc dot gnu dot org changed:

   What|Removed |Added

 Status|UNCONFIRMED |NEW
 Ever Confirmed|0   |1
   GCC host triplet|i686-pc-linux-gnu   |
 GCC target triplet|avr-unknown-none|avr-*-*
   Keywords||build
   Last reconfirmed|-00-00 00:00:00 |2009-12-22 03:29:41
   date||
Summary|AVR fails to build unless   |[4.5 Regression] AVR fails
   |LTO is disabled |to build with other than C
   ||family languages
   Target Milestone|--- |4.5.0
Version|lto |4.5.0


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=42457