public inbox for gcc-bugs@sourceware.org
help / color / mirror / Atom feed
* [Bug target/17582] New: Problem cross gcc with errno. Invalid reference.
@ 2004-09-21 12:44 sergey_s_m at mail dot ru
2004-09-21 12:50 ` [Bug target/17582] " schwab at suse dot de
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: sergey_s_m at mail dot ru @ 2004-09-21 12:44 UTC (permalink / raw)
To: gcc-bugs
I've tested next example for gcc-3.3.1 and for two cross compilers: mips_fp_be-
gcc and arm_v4t_le-gcc 3.3.1 as well.
(main.c)
------------------------------------------------------------------
extern int errno;
main()
{
printf("errno=%d\n",errno);
}
1. For native compiler the result was:
In function 'main':
: undefined reference to 'errno'
collect2: ld returned 1 exit status
2. For cross compilers the result was a.out file without any mistakes.
So I think there is a bug into cross compilers. Does anybody know how to fix
it?
PS: I've compiled like: gcc main.c; or mips_fp_be-gcc main.c; or arm_v4t_le-
gcc main.c
--
Summary: Problem cross gcc with errno. Invalid reference.
Product: gcc
Version: 3.3.1
Status: UNCONFIRMED
Severity: normal
Priority: P2
Component: target
AssignedTo: unassigned at gcc dot gnu dot org
ReportedBy: sergey_s_m at mail dot ru
CC: gcc-bugs at gcc dot gnu dot org
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17582
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/17582] Problem cross gcc with errno. Invalid reference.
2004-09-21 12:44 [Bug target/17582] New: Problem cross gcc with errno. Invalid reference sergey_s_m at mail dot ru
@ 2004-09-21 12:50 ` schwab at suse dot de
2004-09-21 13:10 ` sergey_s_m at mail dot ru
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: schwab at suse dot de @ 2004-09-21 12:50 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From schwab at suse dot de 2004-09-21 12:50 -------
First, this is not a gcc bug, second, use #include <errno.h>.
--
What |Removed |Added
----------------------------------------------------------------------------
Status|UNCONFIRMED |RESOLVED
Resolution| |INVALID
Summary|Problem cross gcc with |Problem cross gcc with
|errno. Invalid reference. |errno. Invalid reference.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17582
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/17582] Problem cross gcc with errno. Invalid reference.
2004-09-21 12:44 [Bug target/17582] New: Problem cross gcc with errno. Invalid reference sergey_s_m at mail dot ru
2004-09-21 12:50 ` [Bug target/17582] " schwab at suse dot de
@ 2004-09-21 13:10 ` sergey_s_m at mail dot ru
2004-09-21 13:15 ` pinskia at gcc dot gnu dot org
2004-09-21 13:53 ` sergey_s_m at mail dot ru
3 siblings, 0 replies; 5+ messages in thread
From: sergey_s_m at mail dot ru @ 2004-09-21 13:10 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sergey_s_m at mail dot ru 2004-09-21 13:10 -------
I know, that I should use #include<errno.h>
Do you think it's ld problem?
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17582
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/17582] Problem cross gcc with errno. Invalid reference.
2004-09-21 12:44 [Bug target/17582] New: Problem cross gcc with errno. Invalid reference sergey_s_m at mail dot ru
2004-09-21 12:50 ` [Bug target/17582] " schwab at suse dot de
2004-09-21 13:10 ` sergey_s_m at mail dot ru
@ 2004-09-21 13:15 ` pinskia at gcc dot gnu dot org
2004-09-21 13:53 ` sergey_s_m at mail dot ru
3 siblings, 0 replies; 5+ messages in thread
From: pinskia at gcc dot gnu dot org @ 2004-09-21 13:15 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From pinskia at gcc dot gnu dot org 2004-09-21 13:15 -------
No it is neither a GCC bug or libc bug, the C standard says that errno can be defined as a macro and
you have include errno.h to get it.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17582
^ permalink raw reply [flat|nested] 5+ messages in thread
* [Bug target/17582] Problem cross gcc with errno. Invalid reference.
2004-09-21 12:44 [Bug target/17582] New: Problem cross gcc with errno. Invalid reference sergey_s_m at mail dot ru
` (2 preceding siblings ...)
2004-09-21 13:15 ` pinskia at gcc dot gnu dot org
@ 2004-09-21 13:53 ` sergey_s_m at mail dot ru
3 siblings, 0 replies; 5+ messages in thread
From: sergey_s_m at mail dot ru @ 2004-09-21 13:53 UTC (permalink / raw)
To: gcc-bugs
------- Additional Comments From sergey_s_m at mail dot ru 2004-09-21 13:53 -------
So in gcc compilers I should #include<errno.h> for compile to executable file.
But if I do not include errno.h I thought that I cannot get executable file
but for cross compilers it's not right, I don't know why. I would like to know
what is in cross compilers that allowed me get executable file without errno.h
including. Why it don't alert me that variable errno is unrefered? I'll be
thankful if anybody can help me.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=17582
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2004-09-21 13:53 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-09-21 12:44 [Bug target/17582] New: Problem cross gcc with errno. Invalid reference sergey_s_m at mail dot ru
2004-09-21 12:50 ` [Bug target/17582] " schwab at suse dot de
2004-09-21 13:10 ` sergey_s_m at mail dot ru
2004-09-21 13:15 ` pinskia at gcc dot gnu dot org
2004-09-21 13:53 ` sergey_s_m at mail dot ru
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).