public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family
@ 2011-12-04 15:08 gjl at gcc dot gnu.org
  2011-12-04 15:14 ` [Bug target/51409] " gjl at gcc dot gnu.org
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-04 15:08 UTC (permalink / raw)
  To: gcc-bugs

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

             Bug #: 51409
           Summary: [avr] Build fails if configured for other languages
                    than from c-family
    Classification: Unclassified
           Product: gcc
           Version: 4.7.0
            Status: UNCONFIRMED
          Keywords: build
          Severity: blocker
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: gjl@gcc.gnu.org
                CC: eric.weddington@atmel.com
            Target: avr


There is no generic function to get the name of an address space.

As avr.c needs the name for diagnostics, it uses c_addr_space_name which is
only available if C frontend is linked and thus building the compiler for any
language not in c-family will abort with a linker complaint for missing
c_addr_space_name.

Fix is to use C-only languages, e.g. configure with --disable-lto or apply the
patch below.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/51409] [avr] Build fails if configured for other languages than from c-family
  2011-12-04 15:08 [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family gjl at gcc dot gnu.org
@ 2011-12-04 15:14 ` gjl at gcc dot gnu.org
  2011-12-04 15:17 ` gjl at gcc dot gnu.org
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-04 15:14 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #1 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-12-04 15:14:39 UTC ---
Created attachment 25986
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=25986
addrspace-name.diff

Patch against trunk r181773 as posted for review here:

http://gcc.gnu.org/ml/gcc-patches/2011-11/msg02574.html


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/51409] [avr] Build fails if configured for other languages than from c-family
  2011-12-04 15:08 [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family gjl at gcc dot gnu.org
  2011-12-04 15:14 ` [Bug target/51409] " gjl at gcc dot gnu.org
@ 2011-12-04 15:17 ` gjl at gcc dot gnu.org
  2011-12-06 14:39 ` gjl at gcc dot gnu.org
  2011-12-06 14:45 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-04 15:17 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Priority|P3                          |P2
             Status|UNCONFIRMED                 |NEW
           Keywords|                            |patch
   Last reconfirmed|                            |2011-12-04
                 CC|                            |wiml at hhhh dot org
     Ever Confirmed|0                           |1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/51409] [avr] Build fails if configured for other languages than from c-family
  2011-12-04 15:08 [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family gjl at gcc dot gnu.org
  2011-12-04 15:14 ` [Bug target/51409] " gjl at gcc dot gnu.org
  2011-12-04 15:17 ` gjl at gcc dot gnu.org
@ 2011-12-06 14:39 ` gjl at gcc dot gnu.org
  2011-12-06 14:45 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-06 14:39 UTC (permalink / raw)
  To: gcc-bugs

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

--- Comment #2 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-12-06 14:39:30 UTC ---
Author: gjl
Date: Tue Dec  6 14:39:25 2011
New Revision: 182051

URL: http://gcc.gnu.org/viewcvs?root=gcc&view=rev&rev=182051
Log:
    PR target/51409
    PR target/49868
    * config/avr/avr.h (ADDR_SPACE_PGM, ADDR_SPACE_PGM1,
    ADDR_SPACE_PGM2, ADDR_SPACE_PGM3, ADDR_SPACE_PGM4,
    ADDR_SPACE_PGM5, ADDR_SPACE_PGMX): Write as enum.
    (avr_addrspace_t): New typedef.
    (avr_addrspace): New declaration.
    * config/avr/avr-c.c (avr_toupper): New static function.
    (avr_register_target_pragmas, avr_cpu_cpp_builtins): Use
    avr_addrspace to get address space information.
    * config/avr/avr.c (avr_addrspace): New variable.
    (avr_out_lpm, avr_pgm_check_var_decl, avr_insert_attributes,
    avr_asm_named_section, avr_section_type_flags,
    avr_asm_select_section, avr_addr_space_address_mode, 
    avr_addr_space_convert, avr_emit_movmemhi): Use it.
    (avr_addr_space_pointer_mode): Forward to avr_addr_space_address_mode.
    (avr_pgm_segment): Remove.


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


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [Bug target/51409] [avr] Build fails if configured for other languages than from c-family
  2011-12-04 15:08 [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family gjl at gcc dot gnu.org
                   ` (2 preceding siblings ...)
  2011-12-06 14:39 ` gjl at gcc dot gnu.org
@ 2011-12-06 14:45 ` gjl at gcc dot gnu.org
  3 siblings, 0 replies; 5+ messages in thread
From: gjl at gcc dot gnu.org @ 2011-12-06 14:45 UTC (permalink / raw)
  To: gcc-bugs

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

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

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
         Resolution|                            |FIXED
   Target Milestone|---                         |4.7.0

--- Comment #3 from Georg-Johann Lay <gjl at gcc dot gnu.org> 2011-12-06 14:42:31 UTC ---
Works again.


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2011-12-06 14:45 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-04 15:08 [Bug target/51409] New: [avr] Build fails if configured for other languages than from c-family gjl at gcc dot gnu.org
2011-12-04 15:14 ` [Bug target/51409] " gjl at gcc dot gnu.org
2011-12-04 15:17 ` gjl at gcc dot gnu.org
2011-12-06 14:39 ` gjl at gcc dot gnu.org
2011-12-06 14:45 ` gjl at gcc dot gnu.org

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).