diff --git a/hardware/emulator/wine/actions.py b/hardware/emulator/wine/actions.py index b249ada8e5..9ed4ab22fc 100644 --- a/hardware/emulator/wine/actions.py +++ b/hardware/emulator/wine/actions.py @@ -24,7 +24,7 @@ def setup(): # More info can be obtained here: http://wiki.winehq.org/Wine64 # shelltools.export("CPPFLAGS", "-D_FORTIFY_SOURCE=2 -D_FORTIFY_SOURCE=0") - shelltools.system("make -C ./wine-staging-%s/patches DESTDIR=$(pwd) install" %get.srcVERSION()) + #shelltools.system("make -C ./wine-staging-%s/patches DESTDIR=$(pwd) install" %get.srcVERSION()) pisitools.flags.add("-fno-omit-frame-pointer") autotools.autoreconf("-vif") options = "--without-capi \ @@ -76,4 +76,3 @@ def install(): shelltools.cd("..") pisitools.dodoc("ANNOUNCE", "AUTHORS", "COPYING.LIB", "LICENSE*", "README", "documentation/README.*") - diff --git a/hardware/emulator/wine/files/gcc_erorr.patch b/hardware/emulator/wine/files/gcc_erorr.patch new file mode 100644 index 0000000000..071d22d747 --- /dev/null +++ b/hardware/emulator/wine/files/gcc_erorr.patch @@ -0,0 +1,57 @@ +diff --git a/tools/winebuild/main.c b/tools/winebuild/main.c +index 16b4165..5c77267 100644 +--- a/tools/winebuild/main.c ++++ b/tools/winebuild/main.c +@@ -48,10 +48,13 @@ int link_ext_symbols = 0; + int force_pointer_size = 0; + int unwind_tables = 0; + ++#undef FORCE_POINTER_SIZE + #ifdef __i386__ + enum target_cpu target_cpu = CPU_x86; ++#define FORCE_POINTER_SIZE + #elif defined(__x86_64__) + enum target_cpu target_cpu = CPU_x86_64; ++#define FORCE_POINTER_SIZE + #elif defined(__powerpc__) + enum target_cpu target_cpu = CPU_POWERPC; + #elif defined(__arm__) +@@ -611,6 +614,10 @@ int main(int argc, char **argv) + signal( SIGTERM, exit_on_signal ); + signal( SIGINT, exit_on_signal ); + ++#ifdef FORCE_POINTER_SIZE ++ force_pointer_size = sizeof(size_t); ++#endif ++ + output_file = stdout; + argv = parse_options( argc, argv, spec ); + +diff --git a/tools/winegcc/winegcc.c b/tools/winegcc/winegcc.c +index 06aa200..c44d2e3 100644 +--- a/tools/winegcc/winegcc.c ++++ b/tools/winegcc/winegcc.c +@@ -213,10 +213,13 @@ struct options + strarray* files; + }; + ++#undef FORCE_POINTER_SIZE + #ifdef __i386__ + static const enum target_cpu build_cpu = CPU_x86; ++#define FORCE_POINTER_SIZE + #elif defined(__x86_64__) + static const enum target_cpu build_cpu = CPU_x86_64; ++#define FORCE_POINTER_SIZE + #elif defined(__powerpc__) + static const enum target_cpu build_cpu = CPU_POWERPC; + #elif defined(__arm__) +@@ -1258,6 +1261,9 @@ int main(int argc, char **argv) + opts.linker_args = strarray_alloc(); + opts.compiler_args = strarray_alloc(); + opts.winebuild_args = strarray_alloc(); ++#ifdef FORCE_POINTER_SIZE ++ opts.force_pointer_size = sizeof(size_t); ++#endif + + /* determine the processor type */ + if (strendswith(argv[0], "winecpp")) opts.processor = proc_cpp; diff --git a/hardware/emulator/wine/files/wine-1.9.3-gcc-5_3_0-disable-force-alignment.patch b/hardware/emulator/wine/files/wine-1.9.3-gcc-5_3_0-disable-force-alignment.patch new file mode 100644 index 0000000000..4337df9cca --- /dev/null +++ b/hardware/emulator/wine/files/wine-1.9.3-gcc-5_3_0-disable-force-alignment.patch @@ -0,0 +1,20 @@ +--- a/include/windef.h 2016-02-09 05:17:54.925574387 +0000 ++++ b/include/windef.h 2016-02-09 12:40:25.231866622 +0000 +@@ -64,7 +64,7 @@ + # error You need to define __stdcall for your compiler + # endif + # elif defined(__x86_64__) && defined (__GNUC__) +-# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) ++# if (__GNUC__ > 5) + # define __stdcall __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) + # else + # define __stdcall __attribute__((ms_abi)) +@@ -82,7 +82,7 @@ + # define __cdecl __attribute__((__cdecl__)) + # endif + # elif defined(__x86_64__) && defined (__GNUC__) +-# if (__GNUC__ > 5) || ((__GNUC__ == 5) && (__GNUC_MINOR__ >= 3)) ++# if (__GNUC__ > 5) + # define __cdecl __attribute__((ms_abi)) __attribute__((__force_align_arg_pointer__)) + # else + # define __cdecl __attribute__((ms_abi)) diff --git a/hardware/emulator/wine/pspec.xml b/hardware/emulator/wine/pspec.xml index 82b7497e36..941061b844 100644 --- a/hardware/emulator/wine/pspec.xml +++ b/hardware/emulator/wine/pspec.xml @@ -14,8 +14,6 @@ WINE Is Not An Emulator, which lets you run Microsoft Windows applications Wine allows running Windows 3.*, Windows 95/98 and Windows NT programs on a i386 (or compatible) machine running X11. It is still alpha level code; don't expect everything to work. https://dl.winehq.org/wine/source/1.9/wine-1.9.13.tar.bz2 - https://github.com/wine-compholio/wine-staging/archive/v1.9.13.tar.gz - lcms2-devel libao-devel @@ -65,6 +63,18 @@ util-linux ncurses-devel + + + + wine-1.9.3-gcc-5_3_0-disable-force-alignment.patch + gcc_erorr.patch + + + + @@ -255,8 +265,8 @@ 2016-07-02 1.9.13 First release - Osman Erkan - osman.erkan@pisilinux.org + Ergün Salman + poyraz76@pisilinux.org