* Re: Errors building insight top-of-tree.
2014-02-11 10:12 Errors building insight top-of-tree David Fernandez
@ 2014-02-11 13:58 ` David Fernandez
0 siblings, 0 replies; 2+ messages in thread
From: David Fernandez @ 2014-02-11 13:58 UTC (permalink / raw)
To: insight
I've did a quick fix myself like this:
$ cvs diff -Rpu 2>&1 | grep -vEe '^cvs diff'
Index: gdb/doublest.c
===================================================================
RCS file: /cvs/src/src/gdb/doublest.c,v
retrieving revision 1.55
diff -p -u -r1.55 doublest.c
--- gdb/doublest.c 20 Aug 2013 06:42:19 -0000 1.55
+++ gdb/doublest.c 11 Feb 2014 13:53:10 -0000
@@ -342,7 +342,7 @@ put_field (unsigned char *data, enum flo
restrictions. */
static void
-convert_doublest_to_floatformat (CONST struct floatformat *fmt,
+convert_doublest_to_floatformat (const struct floatformat *fmt,
const DOUBLEST *from, void *to)
{
DOUBLEST dfrom;
Index: sim/common/callback.c
===================================================================
RCS file: /cvs/src/src/sim/common/callback.c,v
retrieving revision 1.34
diff -p -u -r1.34 callback.c
--- sim/common/callback.c 1 Jan 2013 06:41:33 -0000 1.34
+++ sim/common/callback.c 11 Feb 2014 13:53:12 -0000
@@ -20,6 +20,12 @@
/* This file provides a standard way for targets to talk to the host OS
level. */
+#ifdef NO_PROTOTYPES
+#define PARAMS(paramlist) ()
+#else
+#define PARAMS(paramlist) paramlist
+#endif
+
#ifdef HAVE_CONFIG_H
#include "cconfig.h"
#endif
Index: sim/common/run.c
===================================================================
RCS file: /cvs/src/src/sim/common/run.c,v
retrieving revision 1.26
diff -p -u -r1.26 run.c
--- sim/common/run.c 1 Jan 2013 06:41:33 -0000 1.26
+++ sim/common/run.c 11 Feb 2014 13:53:12 -0000
@@ -17,6 +17,12 @@ along with this program. If not, see <h
/* Steve Chamberlain sac@cygnus.com,
and others at Cygnus. */
+#ifdef NO_PROTOTYPES
+#define PARAMS(paramlist) ()
+#else
+#define PARAMS(paramlist) paramlist
+#endif
+
#ifdef HAVE_CONFIG_H
#include "cconfig.h"
#include "tconfig.h"
Index: sim/common/sim-load.c
===================================================================
RCS file: /cvs/src/src/sim/common/sim-load.c,v
retrieving revision 1.19
diff -p -u -r1.19 sim-load.c
--- sim/common/sim-load.c 1 Jan 2013 06:41:33 -0000 1.19
+++ sim/common/sim-load.c 11 Feb 2014 13:53:12 -0000
@@ -18,6 +18,12 @@ along with this program. If not, see <h
as it is used by simulators that don't use it [though that doesn't mean
to suggest that they shouldn't :-)]. */
+#ifdef NO_PROTOTYPES
+#define PARAMS(paramlist) ()
+#else
+#define PARAMS(paramlist) paramlist
+#endif
+
#ifdef HAVE_CONFIG_H
#include "cconfig.h"
#endif
@@ -169,11 +175,11 @@ sim_load_file (sd, myname, callback, pro
}
static void
-xprintf VPARAMS ((host_callback *callback, const char *fmt, ...))
+xprintf PARAMS ((host_callback *callback, const char *fmt, ...))
{
va_list ap;
- VA_START (ap, fmt);
+ va_start (ap, fmt);
(*callback->vprintf_filtered) (callback, fmt, ap);
@@ -181,11 +187,11 @@ xprintf VPARAMS ((host_callback *callbac
}
static void
-eprintf VPARAMS ((host_callback *callback, const char *fmt, ...))
+eprintf PARAMS ((host_callback *callback, const char *fmt, ...))
{
va_list ap;
- VA_START (ap, fmt);
+ va_start (ap, fmt);
(*callback->evprintf_filtered) (callback, fmt, ap);
Index: sim/common/sim-utils.h
===================================================================
RCS file: /cvs/src/src/sim/common/sim-utils.h,v
retrieving revision 1.12
diff -p -u -r1.12 sim-utils.h
--- sim/common/sim-utils.h 1 Jan 2013 06:41:33 -0000 1.12
+++ sim/common/sim-utils.h 11 Feb 2014 13:53:12 -0000
@@ -20,6 +20,12 @@ along with this program. If not, see <h
#ifndef SIM_UTILS_H
#define SIM_UTILS_H
+#ifdef NO_PROTOTYPES
+#define PARAMS(paramlist) ()
+#else
+#define PARAMS(paramlist) paramlist
+#endif
+
/* Memory management with an allocator that clears memory before use. */
void *zalloc (unsigned long size);
Not saying that this is the right way to fix it, but will give you guys
an starting point to do it right.
The 6.8 branch in cvs and the release tarball in the ftp seem to be also
broken with problems in texi files... I'll post another message with that.
Regards
David
On 11/02/14 10:12, David Fernandez wrote:
> Hi there,
>
> I've picked top-of-tree and tried to build it for avr target in
> Fedora20. I've got this:
>
> gcc -DHAVE_CONFIG_H -DPROFILE=-DWITH_PROFILE=-1 -DDEFAULT_INLINE=0 -I.
> -I/home/df/src/insight-trunk/src/sim/avr -I../common
> -I/home/df/src/insight-trunk/src/sim/avr/../common -I../../include
> -I/home/df/src/insight-trunk/src/sim/avr/../../include -I../../bfd
> -I/home/df/src/insight-trunk/src/sim/avr/../../bfd -I../../opcodes
> -I/home/df/src/insight-trunk/src/sim/avr/../../opcodes -g -O2 -c -o
> callback.o -MT callback.o -MMD -MP -MF .deps/callback.Tpo
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:65:20:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> void sim_cb_printf PARAMS ((host_callback *, const char *, ...));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:66:21:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> void sim_cb_eprintf PARAMS ((host_callback *, const char *, ...));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:72:19:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> extern int system PARAMS ((const char *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:74:20:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_init PARAMS ((host_callback *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:75:24:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_shutdown PARAMS ((host_callback *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:76:22:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_unlink PARAMS ((host_callback *, const char *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:77:21:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static long os_time PARAMS ((host_callback *, long *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:78:22:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_system PARAMS ((host_callback *, const char *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:79:22:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_rename PARAMS ((host_callback *, const char *, const
> char *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:80:28:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_write_stdout PARAMS ((host_callback *, const char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:81:29:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static void os_flush_stdout PARAMS ((host_callback *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:82:28:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_write_stderr PARAMS ((host_callback *, const char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:83:29:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static void os_flush_stderr PARAMS ((host_callback *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:84:21:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_write PARAMS ((host_callback *, int, const char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:85:26:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_read_stdin PARAMS ((host_callback *, char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:86:20:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_read PARAMS ((host_callback *, int, char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:87:20:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_open PARAMS ((host_callback *, const char *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:88:21:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_lseek PARAMS ((host_callback *, int, long, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:89:22:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_isatty PARAMS ((host_callback *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:90:25:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_get_errno PARAMS ((host_callback *));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:91:21:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int os_close PARAMS ((host_callback *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:92:33:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static void os_vprintf_filtered PARAMS ((host_callback *, const char
> *, va_list));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:93:34:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static void os_evprintf_filtered PARAMS ((host_callback *, const char
> *, va_list));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:94:22:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static void os_error PARAMS ((host_callback *, const char *, ...))
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:99:18:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int fdmap PARAMS ((host_callback *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:100:18:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int fdbad PARAMS ((host_callback *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:101:17:
> error: expected ‘= ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘PARAMS’
> static int wrap PARAMS ((host_callback *, int));
> ^
> /home/df/src/insight-trunk/src/sim/avr/../common/callback.c:833:3:
> warning: initialization makes ‘__attribute__((noreturn))’ qualified
> function pointer from unqualified [enabled by default]
> os_error,
> ^
> make[3]: *** [callback.o] Error 1
> make[3]: Leaving directory `/home/df/build/insight/avr/sim/avr'
> make[2]: *** [all] Error 1
> make[2]: Leaving directory `/home/df/build/insight/avr/sim'
> make[1]: *** [all-sim] Error 2
> make[1]: Leaving directory `/home/df/build/insight/avr'
> make: *** [all] Error 2
> make: Leaving directory `/home/df/build/insight/avr'
>
> Is this expected for the top-of-tree?
>
> Otherwise, may be you could suggest a quick fix for that PARAMS that
> seems undefined.
>
> Regards
> David
>
> PS.
> $ gcc -v
> Using built-in specs.
> COLLECT_GCC=c
> COLLECT_LTO_WRAPPER=sr/libexec/gcc/x86_64-redhat-linux/4.8.2/lto-wrapper
> Target: x86_64-redhat-linux
> Configured with: ../configure --prefix=sr --mandir=/usr/share/man
> --infodir=sr/share/info
> --with-bugurl=tp://bugzilla.redhat.com/bugzilla --enable-bootstrap
> --enable-shared --enable-threads=six --enable-checking=release
> --with-system-zlib --enable-__cxa_atexit
> --disable-libunwind-exceptions --enable-gnu-unique-object
> --enable-linker-build-id --with-linker-hash-style=u
> --enable-languages=c++,objc,obj-c++,java,fortran,ada,go,lto
> --enable-plugin --enable-initfini-array --enable-java-awt=k
> --disable-dssi --with-java-home=sr/lib/jvm/java-1.5.0-gcj-1.5.0.0/jre
> --enable-libgcj-multifile --enable-java-maintainer-mode
> --with-ecj-jar=sr/share/java/eclipse-ecj.jar
> --disable-libjava-multilib
> --with-isl=uilddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/isl-install
> --with-cloog=uilddir/build/BUILD/gcc-4.8.2-20131212/obj-x86_64-redhat-linux/cloog-install
> --with-tune=neric --with-arch_32=i686 --build=x86_64-redhat-linux
> Thread model: posix
> gcc version 4.8.2 20131212 (Red Hat 4.8.2-7) (GCC)
>
> $ avr-gcc -v
> Using built-in specs.
> COLLECT_GCC=r-gcc
> COLLECT_LTO_WRAPPER=ome/df/local/libexec/gcc/avr/4.8.2/lto-wrapper
> Target: avr
> Configured with: /home/df/src/gcc-4.8.2/configure
> --prefix=ome/df/local --target=avr --enable-languages=c,c++
> --with-gnu-as --with-gnu-ld
> --with-gxx-include-dir=ome/df/local/avr/include --with-dwarf2
> --disable-libssp -v
> Thread model: single
> gcc version 4.8.2 (GCC)
>
> $ uname -a
> Linux df-desktop.uk.level5networks.com 3.12.10-300.fc20.x86_64 #1 SMP
> Thu Feb 6 22:11:48 UTC 2014 x86_64 x86_64 x86_64 GNU/Linux
>
>
^ permalink raw reply [flat|nested] 2+ messages in thread