Package: nqp
Version: 2012.10-1
Severity: important
Tags: patch sid
User: [email protected]
Usertags: powerpcspe
Hi,
nqp currently FTBFS on powerpc and powerpcspe[1] like this:
[...]
gcc -g -O2 -fstack-protector --param=ssp-buffer-size=4 -Wformat
-Werror=format-security -D_FORTIFY_SOURCE=2 -DHASATTRIBUTE_CONST
-DHASATTRIBUTE_DEPRECATED -DHASATTRIBUTE_MALLOC -DHASATTRIBUTE_NONNULL
-DHASATTRIBUTE_NORETURN -DHASATTRIBUTE_PURE -DHASATTRIBUTE_UNUSED
-DHASATTRIBUTE_WARN_UNUSED_RESULT -DHASATTRIBUTE_HOT -DHASATTRIBUTE_COLD
-DHAS_GETTEXT -fPIC -g -falign-functions=16 -funit-at-a-time
-fexcess-precision=standard -W -Wall -Waggregate-return -Wcast-align
-Wcast-qual -Wchar-subscripts -Wcomment -Wdisabled-optimization -Wdiv-by-zero
-Wenum-compare -Wendif-labels -Wextra -Wformat -Wformat-extra-args
-Wformat-nonliteral -Wformat-security -Wformat-y2k -Wimplicit -Wimport
-Winit-self -Winline -Winvalid-pch -Wjump-misses-init -Wlogical-op
-Werror=missing-braces -Wmissing-declarations -Wmissing-field-initializers
-Wno-missing-format-attribute -Wmissing-include-dirs -Wmultichar -Wpacked
-Wparentheses -Wpointer-arith -Wpointer-sign -Wreturn-type -Wsequence-point -W
sign-comp
are -Wstrict-aliasing -Wstrict-aliasing=2 -Wswitch -Wswitch-default
-Wtrigraphs -Werror=undef -Wno-unused -Wunknown-pragmas -Wvariadic-macros
-Wwrite-strings -Wc++-compat -Werror=declaration-after-statement
-Werror=implicit-function-declaration -Wmissing-prototypes
-Werror=nested-externs -Werror=old-style-definition -Werror=strict-prototypes
-fvisibility=hidden -Wno-strict-prototypes -O3 -O3 -D_FORTIFY_SOURCE=2
-I../dyncall -c dyncall_thunk.c -o dyncall_thunk.o
In file included from dyncall_thunk.c:35:0:
dyncall_thunk_ppc32.c:28:16: warning: no previous prototype for 'hi16'
[-Wmissing-prototypes]
dyncall_thunk_ppc32.c: In function 'hi16':
dyncall_thunk_ppc32.c:28:16: error: old-style function definition
[-Werror=old-style-definition]
dyncall_thunk_ppc32.c:28:16: warning: type of 'x' defaults to 'int'
[-Wmissing-parameter-type]
dyncall_thunk_ppc32.c: At top level:
dyncall_thunk_ppc32.c:29:16: warning: no previous prototype for 'lo16'
[-Wmissing-prototypes]
dyncall_thunk_ppc32.c: In function 'lo16':
dyncall_thunk_ppc32.c:29:16: error: old-style function definition
[-Werror=old-style-definition]
dyncall_thunk_ppc32.c:29:16: warning: type of 'x' defaults to 'int'
[-Wmissing-parameter-type]
cc1: some warnings being treated as errors
make[4]: *** [dyncall_thunk.o] Error 1
[...]
Attaching a patch that fixes this.
Thanks,
Roland
[1] http://wiki.debian.org/PowerPCSPEPort
-- System Information:
Debian Release: wheezy/sid
APT prefers unstable
APT policy: (500, 'unstable')
Architecture: i386 (i686)
Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=en_US.utf8, LC_CTYPE=en_US.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash
Index: nqp-2012.10/3rdparty/dyncall/dyncallback/dyncall_thunk_ppc32.c
===================================================================
--- nqp-2012.10.orig/3rdparty/dyncall/dyncallback/dyncall_thunk_ppc32.c 2012-10-19 05:11:01.000000000 +0200
+++ nqp-2012.10/3rdparty/dyncall/dyncallback/dyncall_thunk_ppc32.c 2012-11-21 11:27:46.057803152 +0100
@@ -25,8 +25,8 @@
#include "dyncall_thunk.h"
-unsigned short hi16(x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); }
-unsigned short lo16(x) { return ( (unsigned short) ((unsigned int)x) ); }
+unsigned short hi16(unsigned int x) { return ( (unsigned short) (((unsigned int)x)>>16UL) ); }
+unsigned short lo16(unsigned int x) { return ( (unsigned short) ((unsigned int)x) ); }
void dcbInitThunk(DCThunk* p, void (*entry)())
{
Index: nqp-2012.10/3rdparty/dyncall/dyncallback/dyncall_callback_ppc32.c
===================================================================
--- nqp-2012.10.orig/3rdparty/dyncall/dyncallback/dyncall_callback_ppc32.c 2012-11-21 15:47:14.453671170 +0100
+++ nqp-2012.10/3rdparty/dyncall/dyncallback/dyncall_callback_ppc32.c 2012-11-21 15:52:39.597751972 +0100
@@ -25,6 +25,7 @@
#include "dyncall_callback.h"
#include "dyncall_callback_ppc32.h"
+#include "dyncall_alloc_wx.h"
void dcbInitCallback(DCCallback* pcb, const char* signature, DCCallbackHandler* handler, void* userdata)
{