This is the mail archive of the cgen@sources.redhat.com mailing list for the CGEN 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]

Re: Troubles building cris target


> From: Jim Blandy <jimb@redhat.com>
> Date: 15 Mar 2005 16:48:01 -0500

> When I try to build the GDB/sim sources from sources.redhat.com CVS on
> an AMD64 Fedora Core 2 system, the build dies trying to link the
> sim/cris/run executable with the errors below.

JFTR, I built sim successfully on i686-pc-linux-gnu (FC2) with
CVS as of "Tue Mar 15 15:09:24 UTC 2005".

> This looks simple to fix, but I haven't followed it through.

CGEN bugs are simple?  Let's talk.

> gcc -DHAVE_CONFIG_H   -DWITH_DEFAULT_MODEL='"crisv32"'  -DPROFILE=1 -DWITH_PROFILE=-1   -DWITH_ALIGNMENT=NONSTRICT_ALIGNMENT   -DWITH_ENVIRONMENT=ALL_ENVIRONMENT   -DWITH_HOST_BYTE_ORDER=LITTLE_ENDIAN     -DWITH_SCACHE=16384          -I. -I/home/jimb/gdb/src/sim/cris -I../common -I/home/jimb/gdb/src/sim/cris/../common -I../../include -I/home/jimb/gdb/src/sim/cris/../../include -I../../bfd -I/home/jimb/gdb/src/sim/cris/../../bfd -I../../opcodes -I/home/jimb/gdb/src/sim/cris/../../opcodes -I../../intl -I/home/jimb/gdb/src/sim/cris/../../intl -g3 -o run \
>   nrun.o libsim.a ../../bfd/libbfd.a ../../opcodes/libopcodes.a  ../../libiberty/libiberty.a -lnsl  
> libsim.a(mloopv10f.o)(.text+0x3c2b): In function `crisv10f_engine_run_full':
> /home/jimb/gdb/src/sim/cris/semcrisv10f-switch.c:1285: undefined reference to `ADDCSI'
> libsim.a(mloopv10f.o)(.text+0x3ff2):/home/jimb/gdb/src/sim/cris/semcrisv10f-switch.c:1348: undefined reference to `SUBCSI'

Can you please test this patch?

2005-03-16  Hans-Peter Nilsson  <hp@axis.com>

	* cris/sim-main.h: Don't include cgen-ops.h.  Define ANDIF specifically.

--- sim-main.h	Fri Jan 28 05:29:00 2005
+++ /tmp/sim-main.h	Wed Mar 16 00:00:56 2005
@@ -57,8 +57,11 @@ do { \
 #include "cgen-sim.h"
 #include "cris-sim.h"
 
-/* For occurrences of ANDIF in decodev32.c.  */
-#include "cgen-ops.h"
+/* For occurrences of ANDIF in decodev32.c.  We can't '#include
+   "cgen-ops.h"' here, as that'll break the outlining of operators in
+   sim/common/cgen-utils.c.  FIXME: CGEN bug; there should be no ANDIF:s
+   in decodev32.c.  */
+#define ANDIF(x, y) ((x) && (y))
 
 struct cris_sim_mmapped_page {
   USI addr;

brgds, H-P


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