public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug c/18549] New: -save-temps option ends with corrupt object file
@ 2004-11-18 18:59 pschober at gmx dot ch
2004-11-18 19:02 ` [Bug driver/18549] " pinskia at gcc dot gnu dot org
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: pschober at gmx dot ch @ 2004-11-18 18:59 UTC (permalink / raw)
To: gcc-bugs
if gcc is called with the -save-temps option the resulting object file is corrupt.
a call to the linker results in the following error message :
c:\programme\winavr\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\lib\avr5\crtm16.o(.init9+0x0):undefined
reference to 'main'
without using the -save-temps option this error message doesn't appear.
if the file foo.s exists, the error doesn't appear as well (regardless of the
contents of foo.s);foo.s remains unchanged in this case
used calls :
avr-gcc -c -mmcu=atmega16 -save-temps foo.c
avr-gcc -mmcu=atmega16 -o foo.elf foo.o
this problem occurs on different versions (3.3.1, 3.4.1 tested) and on different
OS' (Windows 2000, Windows XP tested)
foo.c (works with other files as well) :
#include <avr/io.h>
int main(void)
{
while (1);
}
--
Summary: -save-temps option ends with corrupt object file
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: c
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: pschober at gmx dot ch
CC: gcc-bugs at gcc dot gnu dot org
GCC target triplet: avr
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
@ 2004-11-18 19:02 ` pinskia at gcc dot gnu dot org
2004-11-22 23:41 ` ericw at evcohs dot com
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-11-18 19:02 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
Component|c |driver
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
2004-11-18 19:02 ` [Bug driver/18549] " pinskia at gcc dot gnu dot org
@ 2004-11-22 23:41 ` ericw at evcohs dot com
2004-11-25 1:46 ` h dot rind at mondial dot co dot at
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: ericw at evcohs dot com @ 2004-11-22 23:41 UTC (permalink / raw)
To: gcc-bugs
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |ericw at evcohs dot com
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
2004-11-18 19:02 ` [Bug driver/18549] " pinskia at gcc dot gnu dot org
2004-11-22 23:41 ` ericw at evcohs dot com
@ 2004-11-25 1:46 ` h dot rind at mondial dot co dot at
2004-12-06 5:04 ` pinskia at gcc dot gnu dot org
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: h dot rind at mondial dot co dot at @ 2004-11-25 1:46 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From h dot rind at mondial dot co dot at 2004-11-25 01:46 -------
the following might be a similar problem:
if h8300-hms-gcc 3.3.1 is called with the -save-temps option on h8300-hms it
produces
a wrong output architecture.
a call to the linker results in the following error message:
h8300-hms-ld: skipping incompatible main.o when searching for main.o
h8300-hms-ld: cannot find main.o
used call:
h8300-hms-gcc -mh -c -Wall -W -Wcast-qual -Wwrite-strings -Wno-unused -save-
temps main.cpp
i figured out that gcc creates h8300-architecture instead of h8300h, which is
why
the linker fails. this can be checked with "h8300-hms-objdump.exe -f main.o".
omitting -save-temps resolves the problem.
OS: Win2000 (tested, behaviour can be reproduced)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (2 preceding siblings ...)
2004-11-25 1:46 ` h dot rind at mondial dot co dot at
@ 2004-12-06 5:04 ` pinskia at gcc dot gnu dot org
2004-12-06 20:01 ` pschober at gmx dot ch
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-06 5:04 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-06 05:04 -------
Can you add -v and see what happens to be the difference between with and without -save-temps?
--
What |Removed |Added
----------------------------------------------------------------------------
CC| |pinskia at gcc dot gnu dot
| |org
Status|UNCONFIRMED |WAITING
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (3 preceding siblings ...)
2004-12-06 5:04 ` pinskia at gcc dot gnu dot org
@ 2004-12-06 20:01 ` pschober at gmx dot ch
2004-12-06 21:28 ` pinskia at gcc dot gnu dot org
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pschober at gmx dot ch @ 2004-12-06 20:01 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pschober at gmx dot ch 2004-12-06 20:00 -------
Output with -v option :
Reading specs from C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\specs
Configured with: ../configure --prefix=/e/avrdev/install --target=avr
--enable-languages=c,c++ --disable-nls --enable-win32-registry=WinAVR
Thread model: single
gcc version 3.3.1
C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\cc1.exe -E -quiet -v -iprefix
C:\Programme\WinAVR\bin/../lib/gcc-lib/avr\3.3.1\ -D__GNUC__=3
-D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=1 foo.c -mmcu=atmega16 foo.i
ignoring nonexistent directory "C:/Programme/WinAVR/avr/sys-include"
ignoring nonexistent directory "/e/avrdev/install/include"
ignoring nonexistant directory "/e/avrdev/install/lib/gcc-lib/acr/3.3.1/include"
ignoring nonexistant directory "/e/avrdev/install/avr/sys-include"
ignoring nonexistant directory "/e/avrdev/install/avr/include"
#include "..." search starts here:
#include <...> search starts here:
C:/Programme/WinAVR/lib/gcc-lib/avr/3.3.1/include
C:/Programme/WinAVR/avr/include
End of search list.
C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\cc1.exe -fpreprocessed foo.i
-quiet -dumpbase foo.c -mmcu=atmega16 -auxbase foo -version -o foo.s
GNU C version 3.3.1 (avr)
compiled by GNU C version 3.2 (mingw special 20020817-1).
GGC heuristics: --param ggc-min-expand=99 --param ggc-min-heapsize=131011
C:\Programme\WinAVR\bin\..\lib\gcc-lib\avr\3.3.1\..\..\..\..\avr\bin\as.exe
--traditional-format -mmcu=atmega16 -o foo.o C:\DOKUME~1\PS\LOKALE~1\Temp/ccSqaaaa.s
The only difference is the last line (C:\DOKUME~1\PS\LOKALE~1\Temp/ccSqaaaa.s)
It changes randomly , e.g. :
C:\DOKUME~1\PS\LOKALE~1\Temp/ccaAaaaa.s
C:\DOKUME~1\PS\LOKALE~1\Temp/ccmCaaaa.s
.
.
.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (4 preceding siblings ...)
2004-12-06 20:01 ` pschober at gmx dot ch
@ 2004-12-06 21:28 ` pinskia at gcc dot gnu dot org
2004-12-06 21:36 ` dannysmith at users dot sourceforge dot net
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-06 21:28 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-06 21:28 -------
What I was trying to ask for was the output of:
avr-gcc -c -mmcu=atmega16 -save-temps foo.c -v
avr-gcc -c -mmcu=atmega16 foo.c -v
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (5 preceding siblings ...)
2004-12-06 21:28 ` pinskia at gcc dot gnu dot org
@ 2004-12-06 21:36 ` dannysmith at users dot sourceforge dot net
2004-12-06 21:38 ` pinskia at gcc dot gnu dot org
2004-12-06 21:45 ` ericw at evcohs dot com
8 siblings, 0 replies; 10+ messages in thread
From: dannysmith at users dot sourceforge dot net @ 2004-12-06 21:36 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From dannysmith at users dot sourceforge dot net 2004-12-06 21:36 -------
It looks like you are mingw host.
If so, could you try trunk. This looks like dup of
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5620
Danny
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (6 preceding siblings ...)
2004-12-06 21:36 ` dannysmith at users dot sourceforge dot net
@ 2004-12-06 21:38 ` pinskia at gcc dot gnu dot org
2004-12-06 21:45 ` ericw at evcohs dot com
8 siblings, 0 replies; 10+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-12-06 21:38 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-12-06 21:37 -------
*** This bug has been marked as a duplicate of 5620 ***
--
What |Removed |Added
----------------------------------------------------------------------------
Status|WAITING |RESOLVED
Resolution| |DUPLICATE
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
* [Bug driver/18549] -save-temps option ends with corrupt object file
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
` (7 preceding siblings ...)
2004-12-06 21:38 ` pinskia at gcc dot gnu dot org
@ 2004-12-06 21:45 ` ericw at evcohs dot com
8 siblings, 0 replies; 10+ messages in thread
From: ericw at evcohs dot com @ 2004-12-06 21:45 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From ericw at evcohs dot com 2004-12-06 21:45 -------
Subject: Re: -save-temps option ends with corrupt object
file
dannysmith at users dot sourceforge dot net wrote:
>------- Additional Comments From dannysmith at users dot sourceforge dot net 2004-12-06 21:36 -------
>It looks like you are mingw host.
>If so, could you try trunk. This looks like dup of
>http://gcc.gnu.org/bugzilla/show_bug.cgi?id=5620
>
>Danny
>
>
>
This is correct. The avr toolset included in WinAVR is built as a MinGW
host.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=18549
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2004-12-06 21:45 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-11-18 18:59 [Bug c/18549] New: -save-temps option ends with corrupt object file pschober at gmx dot ch
2004-11-18 19:02 ` [Bug driver/18549] " pinskia at gcc dot gnu dot org
2004-11-22 23:41 ` ericw at evcohs dot com
2004-11-25 1:46 ` h dot rind at mondial dot co dot at
2004-12-06 5:04 ` pinskia at gcc dot gnu dot org
2004-12-06 20:01 ` pschober at gmx dot ch
2004-12-06 21:28 ` pinskia at gcc dot gnu dot org
2004-12-06 21:36 ` dannysmith at users dot sourceforge dot net
2004-12-06 21:38 ` pinskia at gcc dot gnu dot org
2004-12-06 21:45 ` ericw at evcohs dot com
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).