This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/46426] New: [avr] avr/libgcc.S in SVN r166596 fails to compile


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

           Summary: [avr] avr/libgcc.S in SVN r166596 fails to compile
           Product: gcc
           Version: 4.6.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: target
        AssignedTo: unassigned@gcc.gnu.org
        ReportedBy: j@uriah.heep.sax.de


Created attachment 22372
  --> http://gcc.gnu.org/bugzilla/attachment.cgi?id=22372
Suggested patch

Trying to compile trunk/r166596 for the AVR target results in:

/junk/gcc/trunk/build-avr/./gcc/xgcc -B/junk/gcc/trunk/build-avr/./gcc/
-B/junk/test/avr/bin/ -B/junk/test/avr/lib/ -isystem /junk/test/avr/include
-isystem /junk/test/avr/sys-include    -g -O2 -mmcu=avr25 -O2  -g -O2 -DIN_GCC
-DCROSS_DIRECTORY_STRUCTURE  -W -Wall -Wwrite-strings -Wcast-qual
-Wstrict-prototypes -Wmissing-prototypes -Wold-style-definition  -isystem
./include  -DDF=SF -Dinhibit_libc -mcall-prologues -Os -g  -DIN_LIBGCC2
-D__GCC_FLOAT_NOT_NEEDED -fno-stack-protector -Dinhibit_libc  -I. -I.
-I../../.././gcc -I../../../../libgcc -I../../../../libgcc/.
-I../../../../libgcc/../gcc -I../../../../libgcc/../include  -DHAVE_CC_TLS
-DUSE_EMUTLS -o _exit.o -MT _exit.o -MD -MP -MF _exit.dep -DL_exit
-xassembler-with-cpp \
          -c ../../../../libgcc/../gcc/config/avr/libgcc.S
../../../../libgcc/../gcc/config/avr/libgcc.S: Assembler messages:
../../../../libgcc/../gcc/config/avr/libgcc.S:655: Error: operation combines
symbols in different segments
gmake[4]: *** [_exit.o] Error 1
gmake[4]: Leaving directory `/junk/gcc/trunk/build-avr/avr/avr25/libgcc'
gmake[3]: *** [multi-do] Error 1
gmake[3]: Leaving directory `/junk/gcc/trunk/build-avr/avr/libgcc'
gmake[2]: *** [all-multi] Error 2
gmake[2]: Leaving directory `/junk/gcc/trunk/build-avr/avr/libgcc'
gmake[1]: *** [all-target-libgcc] Error 2
gmake[1]: Leaving directory `/junk/gcc/trunk/build-avr'
gmake: *** [all] Error 2

The preprocessed source for this is:

# 642 "../../../../libgcc/../gcc/config/avr/libgcc.S"
 .section .fini9,"ax",@progbits
 .global _exit
 .func _exit
_exit:
 .weak exit
exit:


 .section .fini0,"ax",@progbits
 cli
__stop_program:
 rjmp __stop_program
 .endfunc

It complains about ".endfunc".  My guess is another .func/.endfunc is
needed between _exit and __stop_program.

Applying the following patch seems to fix this issue:

Index: gcc/config/avr/libgcc.S
===================================================================
--- gcc/config/avr/libgcc.S    (revision 166596)
+++ gcc/config/avr/libgcc.S    (working copy)
@@ -646,9 +646,11 @@
     .weak    exit
 exit:

+    .endfunc
     /* Code from .fini8 ... .fini1 sections inserted by ld script.  */

     .section .fini0,"ax",@progbits
+    .func    __stop_program
     cli
 __stop_program:
     rjmp    __stop_program


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]