From: Ladislav Michl <ladis@linux-mips.org>
To: Randolph Chung <tausq@debian.org>
Cc: binutils@sources.redhat.com
Subject: Re: Building for i586-pc-interix3 host
Date: Thu, 13 Apr 2006 19:48:00 -0000 [thread overview]
Message-ID: <20060413080059.GA28697@orphique> (raw)
In-Reply-To: <e1kmst$f00$1@sea.gmane.org>
On Thu, Apr 13, 2006 at 01:17:26PM +0800, Randolph Chung wrote:
> > I just built current CVS on i586-pc-interix3 host for ARM linux target.
> > There are few problems I do not know how to fix correctly.
> > _ALL_SOURCE has to be defined for prototypes of strcasecmp etc,
> > and some gas source files are including <string.h> at first place
> > directly, so defining _ALL_SOURCE in config.h won't help in this case.
> >
> > How should this be fixed? Adding _ALL_SOURCE to config/mh-interix?
> >
> > $ uname -a
> > Interix Nsfordev-XP 3.5 SP-8.0.1969.1 x86 Intel_x86_Family15_Model3_Stepping4
>
> Please take a look at the list archives, I recently had to fix this for
> hpux.
>
> http://sources.redhat.com/ml/gdb-patches/2006-03/msg00295.html
Thanks for info, but this patch fixes only gdb. Does it mean that you
can build gas without problems on hpux? Seems unlikely, I cannot find
_XOPEN_SOURCE_EXTENDED definitions here...
Anyway, to make _ALL_SOURCE definition in config.h work no C file should
include system headers directly (before generated config.h). Following
patch does so. Is it okay?
2006-04-13 Ladislav Michl <ladis@linux-mips.org>
* gas/atof-generic.c: Do not include system headers directly,
let as.h handle it.
* gas/expr.c: Likewise.
* gas/input-file.c: Likewise.
* gas/config/tc-arm.c: Likewise.
* gas/input-file.c: Likewise.
* gas/macro.c: Likewise.
* gas/sb.c: Likewise.
* gas/config/tc-arm.c: Likewise.
* gas/config/tc-i860.c: Likewise.
* gas/config/tc-mcore.c: Likewise.
* gas/config/tc-msp430.c: Likewise.
* gas/config/tc-xtensa.c: Likewise.
Index: gas/atof-generic.c
===================================================================
RCS file: /cvs/src/src/gas/atof-generic.c,v
retrieving revision 1.11
diff -u -r1.11 atof-generic.c
--- gas/atof-generic.c 5 May 2005 09:12:43 -0000 1.11
+++ gas/atof-generic.c 13 Apr 2006 07:37:52 -0000
@@ -19,8 +19,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <string.h>
-
#include "as.h"
#include "safe-ctype.h"
Index: gas/expr.c
===================================================================
RCS file: /cvs/src/src/gas/expr.c,v
retrieving revision 1.65
diff -u -r1.65 expr.c
--- gas/expr.c 4 Apr 2006 08:04:57 -0000 1.65
+++ gas/expr.c 13 Apr 2006 07:37:53 -0000
@@ -25,7 +25,6 @@
(It also gives smaller files to re-compile.)
Here, "operand"s are of expressions, not instructions. */
-#include <string.h>
#define min(a, b) ((a) < (b) ? (a) : (b))
#include "as.h"
Index: gas/input-file.c
===================================================================
RCS file: /cvs/src/src/gas/input-file.c,v
retrieving revision 1.20
diff -u -r1.20 input-file.c
--- gas/input-file.c 11 Aug 2005 01:25:20 -0000 1.20
+++ gas/input-file.c 13 Apr 2006 07:37:53 -0000
@@ -25,9 +25,6 @@
What we lose in "efficiency" we gain in modularity.
Note we don't need to #include the "as.h" file. No common coupling! */
-#include <stdio.h>
-#include <string.h>
-#include <errno.h>
#include "as.h"
#include "input-file.h"
#include "safe-ctype.h"
Index: gas/macro.c
===================================================================
RCS file: /cvs/src/src/gas/macro.c,v
retrieving revision 1.42
diff -u -r1.42 macro.c
--- gas/macro.c 28 Feb 2006 07:57:09 -0000 1.42
+++ gas/macro.c 13 Apr 2006 07:37:53 -0000
@@ -22,38 +22,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-
-#ifndef __GNUC__
-# if HAVE_ALLOCA_H
-# include <alloca.h>
-# else
-# ifdef _AIX
-/* Indented so that pre-ansi C compilers will ignore it, rather than
- choke on it. Some versions of AIX require this to be the first
- thing in the file. */
- #pragma alloca
-# else
-# ifndef alloca /* predefined by HP cc +Olibcalls */
-# if !defined (__STDC__) && !defined (__hpux)
-extern char *alloca ();
-# else
-extern void *alloca ();
-# endif /* __STDC__, __hpux */
-# endif /* alloca */
-# endif /* _AIX */
-# endif /* HAVE_ALLOCA_H */
-#endif /* __GNUC__ */
-
-#include <stdio.h>
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#include <strings.h>
-#endif
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
#include "as.h"
#include "libiberty.h"
#include "safe-ctype.h"
Index: gas/sb.c
===================================================================
RCS file: /cvs/src/src/gas/sb.c,v
retrieving revision 1.12
diff -u -r1.12 sb.c
--- gas/sb.c 18 May 2005 05:40:07 -0000 1.12
+++ gas/sb.c 13 Apr 2006 07:37:53 -0000
@@ -21,19 +21,9 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include "config.h"
-#include <stdio.h>
-#ifdef HAVE_STDLIB_H
-#include <stdlib.h>
-#endif
-#ifdef HAVE_STRING_H
-#include <string.h>
-#else
-#include <strings.h>
-#endif
+#include "as.h"
#include "libiberty.h"
#include "sb.h"
-#include "as.h"
/* These routines are about manipulating strings.
Index: gas/config/tc-arm.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-arm.c,v
retrieving revision 1.256
diff -u -r1.256 tc-arm.c
--- gas/config/tc-arm.c 7 Apr 2006 15:11:19 -0000 1.256
+++ gas/config/tc-arm.c 13 Apr 2006 07:37:56 -0000
@@ -25,7 +25,6 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <string.h>
#define NO_RELOC 0
#include "as.h"
#include "safe-ctype.h"
Index: gas/config/tc-i860.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-i860.c,v
retrieving revision 1.29
diff -u -r1.29 tc-i860.c
--- gas/config/tc-i860.c 7 Jun 2005 17:54:16 -0000 1.29
+++ gas/config/tc-i860.c 13 Apr 2006 07:37:56 -0000
@@ -21,8 +21,6 @@
with GAS; see the file COPYING. If not, write to the Free Software
Foundation, 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, USA. */
-#include <stdio.h>
-#include <string.h>
#include "as.h"
#include "safe-ctype.h"
#include "subsegs.h"
Index: gas/config/tc-mcore.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-mcore.c,v
retrieving revision 1.40
diff -u -r1.40 tc-mcore.c
--- gas/config/tc-mcore.c 11 Aug 2005 01:25:27 -0000 1.40
+++ gas/config/tc-mcore.c 13 Apr 2006 07:37:56 -0000
@@ -19,14 +19,12 @@
Software Foundation, 51 Franklin Street - Fifth Floor, Boston, MA
02110-1301, USA. */
-#include <stdio.h>
#include "as.h"
#include "bfd.h"
#include "subsegs.h"
#define DEFINE_TABLE
#include "../opcodes/mcore-opc.h"
#include "safe-ctype.h"
-#include <string.h>
#ifdef OBJ_ELF
#include "elf/mcore.h"
Index: gas/config/tc-msp430.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-msp430.c,v
retrieving revision 1.22
diff -u -r1.22 tc-msp430.c
--- gas/config/tc-msp430.c 9 Sep 2005 08:46:19 -0000 1.22
+++ gas/config/tc-msp430.c 13 Apr 2006 07:37:56 -0000
@@ -20,9 +20,6 @@
the Free Software Foundation, 51 Franklin Street - Fifth Floor,
Boston, MA 02110-1301, USA. */
-#include <stdio.h>
-#include <string.h>
-#include <stdlib.h>
#include <limits.h>
#define PUSH_1X_WORKAROUND
Index: gas/config/tc-xtensa.c
===================================================================
RCS file: /cvs/src/src/gas/config/tc-xtensa.c,v
retrieving revision 1.62
diff -u -r1.62 tc-xtensa.c
--- gas/config/tc-xtensa.c 10 Apr 2006 19:00:31 -0000 1.62
+++ gas/config/tc-xtensa.c 13 Apr 2006 07:37:58 -0000
@@ -18,7 +18,6 @@
the Free Software Foundation, 51 Franklin Street - Fifth Floor, Boston,
MA 02110-1301, USA. */
-#include <string.h>
#include <limits.h>
#include "as.h"
#include "sb.h"
next prev parent reply other threads:[~2006-04-13 8:00 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-13 5:17 Ladislav Michl
2006-04-13 8:00 ` Randolph Chung
2006-04-13 19:48 ` Ladislav Michl [this message]
2006-06-07 12:57 ` Alan Modra
2006-06-09 3:42 ` Alan Modra
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20060413080059.GA28697@orphique \
--to=ladis@linux-mips.org \
--cc=binutils@sources.redhat.com \
--cc=tausq@debian.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).