* [RFC]first set of 3 patches to build GDB with xlc on AIX 5.3
@ 2005-04-14 1:23 Manoj Iyer
2005-04-14 19:34 ` Daniel Jacobowitz
0 siblings, 1 reply; 2+ messages in thread
From: Manoj Iyer @ 2005-04-14 1:23 UTC (permalink / raw)
To: gdb-patches
Here are 3 patches that I used to (partially) build GDB on AIX 5.3 using
the XLC compiler. Please review and approve for commit. Is there a
maintainer for GDB on AIX? I would love to volunteer as one in the absence
of a full time maintainer for GDB for AIX. Ok, here are is the first set
of patches, I will post a few more tomorrow...
Patch #1
--------
This patch fixes what appears to be a typo in the hearder file, where for
ALPHA unsigned32 and unsigned64 gets multiply defined in sim-types.h. This
is caught by the xlc compiler, and it exits with an error saying that
these vars are already defined.
--- ./old/src/sim/common/sim-types.h 2002-11-22 19:12:05.000000000 -0600
+++ ./new/src/sim/common/sim-types.h 2005-05-31 05:46:01.000000000 -0500
@@ -112,11 +112,11 @@ typedef struct { signed64 a[2]; } signed
typedef signed char signed8;
typedef signed short signed16;
#if defined (__ALPHA__)
-typedef signed int unsigned32;
-typedef signed long unsigned64;
+typedef signed int signed32;
+typedef signed long signed64;
#else
-typedef signed long unsigned32;
-typedef signed long long unsigned64;
+typedef signed long signed32;
+typedef signed long long signed64;
#endif
typedef unsigned char unsigned8;
Patch #2
--------
When compiling/linking tmp-ld-insn, the linker exits with the error
message, cc -g -O -I. -I. -I./../../include -I../../bfd -I./../../bfd
-I../../gdb -I./../../gdb -I./../../gdb/config -o tmp-ld-insn -DMAIN
./ld-insn.c ld-cache.o misc.o lf.o table.o ld-decode.o filter_host.o
filter.o
cc: 1501-228 input file ld-cache.o not found
cc: 1501-228 input file ld-decode.o not found
Rearranging the build order fixes this build break. Here is the patch.
diff -Naurp ./old/src/sim/ppc/Makefile.in new/src/sim/ppc/Makefile.in
--- ./old/src/sim/ppc/Makefile.in 2005-01-03 09:34:19.000000000 -0600
+++ new/src/sim/ppc/Makefile.in 2005-05-31 05:14:10.000000000 -0500
@@ -683,7 +683,7 @@ tmp-dgen: dgen ppc-spr-table $(srcdir)/.
$(SHELL) $(srcdir)/../../move-if-change tmp-spreg.c spreg.c
touch tmp-dgen
-tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-decode tmp-ld-cache tmp-ld-insn tmp-filter
+tmp-igen: igen $(srcdir)/ppc-instructions $(srcdir)/altivec.igen $(srcdir)/e500.igen $(IGEN_OPCODE_RULES) $(srcdir)/../../move-if-change tmp-ld-insn tmp-ld-decode tmp-ld-cache tmp-filter
./igen $(IGEN_FLAGS) \
-o $(srcdir)/$(IGEN_OPCODE_RULES) \
-I $(srcdir) -i $(srcdir)/ppc-instructions \
Patch #3
--------
The psim.c file is missing a header file libiberty.h, this causes the
linker to report an unresolved symbol namely ".alloca".
cc -g -o psim main.o libsim.a ../../bfd/libbfd.a
../../libiberty/libiberty.a
ld: 0711-317 ERROR: Undefined symbol: .alloca
ld: 0711-345 Use the -bloadmap or -bnoquiet option to obtain more
information.
The patch below adds the headerfile to psim.c file.
--- old/src/sim/ppc/psim.c 2003-06-22 11:48:12.000000000 -0500
+++ new/src/sim/ppc/psim.c 2005-05-31 08:31:45.000000000 -0500
@@ -49,6 +49,7 @@
#include "bfd.h"
+#include "libiberty.h"
/* system structure, actual size of processor array determined at
=========== END PATCHES =====================
Please review, ok to commit???
-----
manjo
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
+ Cogito ergo sum +
+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [RFC]first set of 3 patches to build GDB with xlc on AIX 5.3
2005-04-14 1:23 [RFC]first set of 3 patches to build GDB with xlc on AIX 5.3 Manoj Iyer
@ 2005-04-14 19:34 ` Daniel Jacobowitz
0 siblings, 0 replies; 2+ messages in thread
From: Daniel Jacobowitz @ 2005-04-14 19:34 UTC (permalink / raw)
To: Manoj Iyer; +Cc: gdb-patches
On Wed, Apr 13, 2005 at 08:57:55PM -0500, Manoj Iyer wrote:
>
> Here are 3 patches that I used to (partially) build GDB on AIX 5.3 using
> the XLC compiler. Please review and approve for commit. Is there a
> maintainer for GDB on AIX? I would love to volunteer as one in the absence
> of a full time maintainer for GDB for AIX. Ok, here are is the first set
> of patches, I will post a few more tomorrow...
Please, post patches one at a time with changelogs if you want them to
be reviewed. #1 and #3 look plausible. #2 is definitely wrong; there
are missing dependencies somewhere. The order of things in a
dependency line is not significant to make except accidentally.
--
Daniel Jacobowitz
CodeSourcery, LLC
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-04-14 19:34 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-04-14 1:23 [RFC]first set of 3 patches to build GDB with xlc on AIX 5.3 Manoj Iyer
2005-04-14 19:34 ` Daniel Jacobowitz
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox