Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package orc for openSUSE:Factory checked in 
at 2021-01-19 16:00:33
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/orc (Old)
 and      /work/SRC/openSUSE:Factory/.orc.new.28504 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "orc"

Tue Jan 19 16:00:33 2021 rev:42 rq:863760 version:0.4.32

Changes:
--------
--- /work/SRC/openSUSE:Factory/orc/orc.changes  2020-01-10 18:41:40.091519769 
+0100
+++ /work/SRC/openSUSE:Factory/.orc.new.28504/orc.changes       2021-01-19 
16:00:41.547243754 +0100
@@ -1,0 +2,8 @@
+Sat Jan 16 15:27:40 UTC 2021 - Dirk M??ller <dmuel...@suse.com>
+
+- Update to version 0.4.32:
+  + Add support for JIT code generation in Universal Windows
+    Platform apps.
+  + Minor Meson build system fixes and improvements.
+
+-------------------------------------------------------------------

Old:
----
  orc-0.4.31.tar.xz

New:
----
  orc-0.4.32.tar.xz

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ orc.spec ++++++
--- /var/tmp/diff_new_pack.KitBlz/_old  2021-01-19 16:00:42.351244970 +0100
+++ /var/tmp/diff_new_pack.KitBlz/_new  2021-01-19 16:00:42.351244970 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package orc
 #
-# Copyright (c) 2020 SUSE LLC
+# Copyright (c) 2021 SUSE LLC
 # Copyright (c) 2010 Dominique Leuenberger, Amsterdam, Netherlands.
 #
 # All modifications and additions to the file contributed by third parties
@@ -18,18 +18,17 @@
 
 
 Name:           orc
-Version:        0.4.31
+Version:        0.4.32
 Release:        0
 Summary:        The Oil Runtime Compiler
 License:        BSD-3-Clause
 Group:          Productivity/Multimedia/Other
 URL:            https://gitlab.freedesktop.org/gstreamer/orc
-
 Source:         
https://gstreamer.freedesktop.org/src/orc/%{name}-%{version}.tar.xz
 Source99:       baselibs.conf
-
 BuildRequires:  gtk-doc >= 1.12
 BuildRequires:  meson >= 0.47.0
+BuildRequires:  pkgconfig
 BuildRequires:  pkgconfig(glib-2.0)
 Provides:       %{name}-devel = %{version}
 

++++++ orc-0.4.31.tar.xz -> orc-0.4.32.tar.xz ++++++
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/RELEASE new/orc-0.4.32/RELEASE
--- old/orc-0.4.31/RELEASE      2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/RELEASE      2020-09-11 19:18:44.158056500 +0200
@@ -1,3 +1,11 @@
+0.4.32
+======
+
+  - Add support for JIT code generation in Universal Windows Platform apps
+    (Nirbheek Chauhan, Seungha Yang)
+  - Minor Meson build system fixes and improvements
+    (Jan Alexander Steffens, Tim-Philipp M??ller)
+
 0.4.31
 ======
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/doc/meson.build 
new/orc-0.4.32/doc/meson.build
--- old/orc-0.4.31/doc/meson.build      2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/doc/meson.build      2020-09-11 19:18:44.158056500 +0200
@@ -29,6 +29,6 @@
 # FIXME: there should be a way to specify the gtk-doc requirement
 # html_args : '--path=' + meson.current_build_dir() + ':' + 
meson.current_source_dir(),
 gnome.gtkdoc('orc',
-  src_dir : join_paths(meson.current_source_dir(), '..', 'orc'),
+  src_dir : meson.current_source_dir() / '..' / 'orc',
   main_sgml : 'orc-docs.sgml',
   install : true)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/examples/example2.c 
new/orc-0.4.32/examples/example2.c
--- old/orc-0.4.31/examples/example2.c  2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/examples/example2.c  2020-09-11 19:18:44.162056400 +0200
@@ -21,7 +21,7 @@
   }
 
   /* Call a function that uses Orc */
-  audio_add_mono_to_stereo_scaled_s16 (c, a, b, volume*4096, N);
+  audio_add_mono_to_stereo_scaled_s16 (c, a, b, (int) (volume*4096), N);
 
   /* Print the results */
   for(i=0;i<N;i++){
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/meson.build new/orc-0.4.32/meson.build
--- old/orc-0.4.31/meson.build  2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/meson.build  2020-09-11 19:18:44.162056400 +0200
@@ -1,5 +1,5 @@
-project ('orc', 'c', version : '0.4.31',
-                     meson_version : '>= 0.47.0',
+project ('orc', 'c', version : '0.4.32',
+                     meson_version : '>= 0.49.0',
                      default_options : ['buildtype=debugoptimized',
                                         'warning_level=1',
                                         'c_std=gnu99'] )
@@ -22,7 +22,8 @@
 cc = meson.get_compiler('c')
 
 cdata = configuration_data()      # config.h
-pc_conf = configuration_data()    # orc.pc
+
+pkg = import('pkgconfig')
 
 # -Bsymbolic-functions
 if meson.version().version_compare('>= 0.46.0')
@@ -44,11 +45,13 @@
 cdata.set('ORC_API_EXPORT', export_define)
 
 all_backends = ['sse', 'mmx', 'altivec', 'neon', 'mips', 'c64x'] # 'arm'
+enabled_backends = []
 
 backend = get_option('orc-backend')
 foreach b : all_backends
   if backend == 'all' or backend == b
     cdata.set('ENABLE_BACKEND_' + b.to_upper(), 1)
+    enabled_backends += [b]
   endif
 endforeach
 
@@ -67,18 +70,16 @@
   warning(cpu_family + ' isn\'t a supported cpu family for optimization')
 endif
 
+threads = dependency('threads')
+
 libm = cc.find_library('m', required : false)
 
 librt = []
-pc_conf.set('LIBRT', '')
 if cc.has_function('clock_gettime')
   cdata.set('HAVE_CLOCK_GETTIME', true)
 else
   # On glibc older than 2.17, clock_gettime is provided by time.h and -lrt
   librt = cc.find_library('rt', required : false)
-  if librt.found() and cc.has_function('clock_gettime', dependencies : librt)
-    pc_conf.set('LIBRT', '-lrt')
-  endif
 endif
 
 liblog = []
@@ -92,18 +93,19 @@
   cdata.set('HAVE_CODEMEM_VIRTUALALLOC', true)
   cdata.set('HAVE_OS_WIN32', true)
   cdata.set('HAVE_THREAD_WIN32', true)
-  pc_conf.set('EXEEXT', '.exe')
-  pc_conf.set('PTHREAD_LIBS', '')
+
+  code = '''
+  #include <windows.h>
+  #if !(WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_APP) && 
!WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP))
+  #error "Not building for UWP"
+  #endif'''
+  if cc.compiles(code, name : 'building for UWP')
+    cdata.set('ORC_WINAPI_ONLY_APP', true)
+  endif
 else
   # If it is not windows, we just assume it is a unix of sorts for now.
   cdata.set('HAVE_CODEMEM_MMAP', true)
   cdata.set('HAVE_THREAD_PTHREAD', true)
-  pc_conf.set('EXEEXT', '')
-  if host_os == 'android'
-    pc_conf.set('PTHREAD_LIBS', '')
-  else
-    pc_conf.set('PTHREAD_LIBS', '-lpthread')
-  endif
 endif
 
 monotonic_test = '''
@@ -130,6 +132,7 @@
 
 subdir('orc')
 
+opt_benchmarks = get_option('benchmarks')
 opt_examples = get_option('examples')
 opt_orctest = get_option('orc-test')
 opt_tests = get_option('tests')
@@ -148,6 +151,7 @@
   subdir('tools')
 else
   orcc = disabler() # for testsuite/orcc/
+  tools_variables = []
 endif
 
 if not opt_examples.disabled()
@@ -158,32 +162,60 @@
   subdir('testsuite')
 endif
 
+have_docs = false
 if build_machine.system() == 'windows'
   message('Disabling gtk-doc while building on Windows')
+  gtk_doc_disabled_reason = 'disabled on windows'
 else
   if find_program('gtkdoc-scan', required : get_option('gtk_doc')).found()
     subdir('doc')
+    have_docs = true
+    gtk_doc_disabled_reason = ''
+  elif get_option('gtk_doc').disabled()
+    message('Not building documentation (disabled)')
+    gtk_doc_disabled_reason = 'disabled'
   else
     message('Not building documentation as gtk-doc was not found')
+    gtk_doc_disabled_reason = 'gtk-doc not found'
   endif
 endif
 
-# FIXME: use pkg-config module
-pc_conf.set('prefix', get_option('prefix'))
-pc_conf.set('exec_prefix', get_option('prefix'))
-pc_conf.set('libdir', join_paths(get_option('prefix'), get_option('libdir')))
-pc_conf.set('includedir', join_paths(get_option('prefix'), 'include'))
-pc_conf.set('VERSION', meson.project_version())
-pc_conf.set('ORC_MAJORMINOR', orc_api)
-pc_conf.set('LIBM', libm.found() ? '-lm' : '')
-
-pkgconfigdir = join_paths (get_option('libdir'), 'pkgconfig')
-configure_file(input : 'orc.pc.in',
-  output : 'orc-' + orc_api + '.pc',
-  configuration : pc_conf,
-  install_dir : pkgconfigdir)
+pkg.generate (orc_lib,
+  subdirs : 'orc-' + orc_api,
+  description : 'Library of Optimized Inner Loops Runtime Compiler',
+  variables : tools_variables,
+  libraries_private : orc_dependencies)
 
 # Install m4 macro that other projects use
 install_data('orc.m4', install_dir : 'share/aclocal')
 
 configure_file(output : 'config.h', configuration : cdata)
+
+# summary
+if meson.version().version_compare('>= 0.53')
+  summary({
+    'SSE': 'sse' in enabled_backends,
+    'MMX': 'mmx' in enabled_backends,
+    'NEON': 'neon' in enabled_backends,
+    'MIPS': 'mips' in enabled_backends,
+    'c64x': 'c64x' in enabled_backends,
+    'Altivec': 'altivec' in enabled_backends,
+    }, section: 'Backends', bool_yn: true)
+
+  # meson 0.53 will print two lines for two args (and warn about list_sep 
kwarg)
+  # meson 0.54 will print one line if list_sep is specified
+  if not have_docs
+    doc_summary = [have_docs, gtk_doc_disabled_reason]
+  else
+    doc_summary = have_docs
+  endif
+
+  summary({
+    'Tools': not opt_tools.disabled(),
+    'Tests': not opt_tests.disabled(),
+    'Examples': not opt_examples.disabled(),
+    'Benchmarks': not opt_benchmarks.disabled(),
+    'Documentation': doc_summary,
+    'Orc-test library': not opt_orctest.disabled(),
+    }, section: 'Build options', bool_yn: true, list_sep: '  ')
+endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/meson.build 
new/orc-0.4.32/orc/meson.build
--- old/orc-0.4.31/orc/meson.build      2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/meson.build      2020-09-11 19:18:44.166056400 +0200
@@ -99,7 +99,7 @@
 
 orc_c_args = ['-DORC_ENABLE_UNSTABLE_API', '-D_GNU_SOURCE']
 
-orc_dependencies = [libm, librt, liblog]
+orc_dependencies = [libm, librt, liblog, threads]
 
 orc_lib = library ('orc-' + orc_api,
   orc_sources,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orc.c new/orc-0.4.32/orc/orc.c
--- old/orc-0.4.31/orc/orc.c    2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/orc.c    2020-09-11 19:18:44.166056400 +0200
@@ -5,6 +5,11 @@
 #include <string.h>
 #include <stdlib.h>
 
+#ifdef _WIN32
+#include <windows.h>
+#include <processenv.h>
+#endif
+
 #include <orc/orcprogram.h>
 #include <orc/orcdebug.h>
 #include <orc/orconce.h>
@@ -83,3 +88,40 @@
 {
   return (const char *) VERSION;
 }
+
+/* getenv() is deprecated on Windows and always returns NULL on UWP */
+#ifdef _WIN32
+char*
+_orc_getenv (const char *key)
+{
+  int len;
+  char check[1], *value;
+
+  /* Get the len */
+  len = GetEnvironmentVariableA (key, check, 1);
+  if (len == 0)
+    /* env var is not set or is "" (empty string) */
+    return NULL;
+
+  /* max size of len is 32767, cannot overflow */
+  value = malloc (sizeof (value) * len);
+
+  if (GetEnvironmentVariableA (key, value, len) != (len - 1)) {
+    free (value);
+    return NULL;
+  }
+
+  return value;
+}
+#else
+char*
+_orc_getenv (const char *key)
+{
+  char *value = getenv (key);
+
+  if (value)
+    value = strdup (value);
+
+  return value;
+}
+#endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orccodemem.c 
new/orc-0.4.32/orc/orccodemem.c
--- old/orc-0.4.31/orc/orccodemem.c     2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/orccodemem.c     2020-09-11 19:18:44.170056300 +0200
@@ -11,11 +11,18 @@
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <fcntl.h>
+
 #ifdef HAVE_CODEMEM_MMAP
 #include <sys/mman.h>
 #endif
+
 #ifdef HAVE_CODEMEM_VIRTUALALLOC
 #include <windows.h>
+  #ifdef ORC_WINAPI_ONLY_APP
+    #define _virtualalloc VirtualAllocFromApp
+  #else
+    #define _virtualalloc VirtualAlloc
+  #endif
 #endif
 
 #include <orc/orcinternal.h>
@@ -25,6 +32,9 @@
 
 #define SIZE 65536
 
+/* See _orc_compiler_init() */
+extern int _orc_codemem_alignment;
+
 typedef struct _OrcCodeRegion OrcCodeRegion;
 
 struct _OrcCodeRegion {
@@ -156,7 +166,8 @@
 {
   OrcCodeRegion *region;
   OrcCodeChunk *chunk;
-  int aligned_size = (size + 15) & (~15);
+  int aligned_size =
+      (size + _orc_codemem_alignment) & (~_orc_codemem_alignment);
 
   chunk = orc_code_region_get_free_chunk (aligned_size);
   region = chunk->region;
@@ -287,7 +298,7 @@
         "/tmp", FALSE)) return;
 
   if (orc_code_region_allocate_codemem_anon_map (region)) return;
-  
+
   ORC_ERROR("Failed to create write and exec mmap regions.  This "
       "is probably because SELinux execmem check is enabled (good) "
       "and $TMPDIR and $HOME are mounted noexec (bad).");
@@ -299,7 +310,10 @@
 void
 orc_code_region_allocate_codemem (OrcCodeRegion *region)
 {
-  region->write_ptr = VirtualAlloc(NULL, SIZE, MEM_COMMIT, 
PAGE_EXECUTE_READWRITE);
+  /* On UWP, we can't allocate memory as executable from the start. We can only
+   * set that later after compiling and copying the code over. This is a good
+   * idea in general to avoid security issues, so we do it on win32 too. */
+  region->write_ptr = _virtualalloc (NULL, SIZE, MEM_COMMIT, PAGE_READWRITE);
   region->exec_ptr = region->write_ptr;
   region->size = SIZE;
 }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orccompiler.c 
new/orc-0.4.32/orc/orccompiler.c
--- old/orc-0.4.31/orc/orccompiler.c    2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/orccompiler.c    2020-09-11 19:18:44.170056300 +0200
@@ -6,6 +6,15 @@
 #include <stdlib.h>
 #include <stdarg.h>
 
+#if defined(HAVE_CODEMEM_VIRTUALALLOC)
+#include <windows.h>
+  #ifdef ORC_WINAPI_ONLY_APP
+    #define _virtualprotect VirtualProtectFromApp
+  #else
+    #define _virtualprotect VirtualProtect
+  #endif
+#endif
+
 #include <orc/orcprogram.h>
 #include <orc/orcdebug.h>
 #include <orc/orcinternal.h>
@@ -48,20 +57,71 @@
 int _orc_compiler_flag_debug;
 int _orc_compiler_flag_randomize;
 
+/* For Windows */
+int _orc_codemem_alignment;
+
 void
 _orc_compiler_init (void)
 {
-  const char *envvar;
+  char *envvar;
+#ifdef HAVE_CODEMEM_VIRTUALALLOC
+  size_t page_size;
+  SYSTEM_INFO info;
+#endif
 
-  envvar = getenv ("ORC_CODE");
+  envvar = _orc_getenv ("ORC_CODE");
   if (envvar != NULL) {
     _orc_compiler_flag_list = strsplit (envvar, ',');
+    free (envvar);
   }
 
   _orc_compiler_flag_backup = orc_compiler_flag_check ("backup");
   _orc_compiler_flag_emulate = orc_compiler_flag_check ("emulate");
   _orc_compiler_flag_debug = orc_compiler_flag_check ("debug");
   _orc_compiler_flag_randomize = orc_compiler_flag_check ("randomize");
+
+  /* 16 bytes alignment by default */
+  _orc_codemem_alignment = 15;
+
+#ifdef HAVE_CODEMEM_VIRTUALALLOC
+  GetNativeSystemInfo(&info);
+  page_size = info.dwPageSize;
+
+  /* Protection attribute change via VirtualProtect will be applied per
+   * page memory unit. So we should split code memory with page aligned range.
+   * Otherwise the protection attribute of previously generated executable code
+   * memory can be affected by later generated one.
+   */
+  _orc_codemem_alignment = info.dwPageSize - 1;
+#endif
+
+#ifdef ORC_WINAPI_ONLY_APP
+  if (!_orc_compiler_flag_backup && !_orc_compiler_flag_emulate) {
+    int can_jit = FALSE;
+
+    /* If backup code is not enabled and emulation is not enabled, that means
+     * we will do JIT compilation and call orc_code_region_allocate_codemem().
+     * When targeting Windows Store apps, the codeGeneration capability must
+     * be enabled in the app manifest, or passing PAGE_EXECUTE to
+     * VirtualProtectFromApp will return NULL. In this case, we must force
+     * backup C code, and if that's not available, we must emulate. */
+    void *mem = VirtualAllocFromApp (NULL, page_size, MEM_COMMIT,
+        PAGE_READWRITE);
+    if (mem) {
+      int old_protect;
+      if (VirtualProtectFromApp (mem, page_size, PAGE_EXECUTE, &old_protect) > 
0)
+        can_jit = TRUE;
+      VirtualFree (mem, 0, MEM_RELEASE);
+    }
+
+    if (!can_jit) {
+      ORC_WARNING ("Unable to allocate executable pages: using backup code or "
+        "emulation: codeGeneration capability isn't set in the app manifest?");
+      _orc_compiler_flag_backup = TRUE;
+      _orc_compiler_flag_emulate = TRUE;
+    }
+  }
+#endif
 }
 
 int
@@ -174,6 +234,34 @@
   return orc_program_compile_full (program, target, flags);
 }
 
+#if defined(HAVE_CODEMEM_VIRTUALALLOC)
+static orc_bool
+_set_virtual_protect (void * mem, size_t size, int code_protect)
+{
+  char *msg;
+  DWORD old_protect;
+
+  /* No code, so we 'succeed' */
+  if (size == 0)
+    return TRUE;
+
+  if (!mem)
+    return FALSE;
+
+  if (_virtualprotect (mem, size, code_protect, &old_protect) > 0)
+    return TRUE;
+
+  FormatMessageA (FORMAT_MESSAGE_ALLOCATE_BUFFER
+      | FORMAT_MESSAGE_IGNORE_INSERTS | FORMAT_MESSAGE_FROM_SYSTEM, NULL,
+      GetLastError (), 0, (LPTSTR) &msg, 0, NULL);
+  ORC_ERROR ("Couldn't set memory protect on %p from %x to %x: %s", mem,
+      old_protect, code_protect, msg);
+  LocalFree (msg);
+
+  return FALSE;
+}
+#endif
+
 /**
  * orc_program_compile_full:
  * @program: the OrcProgram to compile
@@ -359,6 +447,11 @@
   program->orccode->code_size = compiler->codeptr - compiler->code;
   orc_code_allocate_codemem (program->orccode, program->orccode->code_size);
 
+#if defined(HAVE_CODEMEM_VIRTUALALLOC)
+  /* Ensure that code region is writable before memcpy */
+  _set_virtual_protect (program->orccode->code, program->orccode->code_size,
+      PAGE_READWRITE);
+#endif
   memcpy (program->orccode->code, compiler->code, program->orccode->code_size);
 
 #ifdef VALGRIND_DISCARD_TRANSLATIONS
@@ -370,6 +463,13 @@
     compiler->target->flush_cache (program->orccode);
   }
 
+#if defined(HAVE_CODEMEM_VIRTUALALLOC)
+  /* Code region is now ready for execution */
+ if (!_set_virtual_protect (program->orccode->exec, 
program->orccode->code_size,
+       PAGE_EXECUTE))
+   /* Can't set code as executable, force emulation */
+   program->orccode->exec = (void *)orc_executor_emulate;
+#endif
   program->code_exec = program->orccode->exec;
 
   program->asm_code = compiler->asm_code;
@@ -637,7 +737,7 @@
         var = compiler->vars + insn.dest_args[i];
         if (var->vartype == ORC_VAR_TYPE_DEST) {
           OrcInstruction *cinsn;
-          
+
           cinsn = compiler->insns + compiler->n_insns;
           compiler->n_insns++;
 
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orcdebug.c 
new/orc-0.4.32/orc/orcdebug.c
--- old/orc-0.4.31/orc/orcdebug.c       2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/orcdebug.c       2020-09-11 19:18:44.174056300 +0200
@@ -29,6 +29,7 @@
 #include "config.h"
 #endif
 #include <orc/orcdebug.h>
+#include <orc/orcinternal.h>
 
 #include <stdio.h>
 #include <string.h>
@@ -55,9 +56,9 @@
 void
 _orc_debug_init(void)
 {
-  const char *envvar;
+  char *envvar;
 
-  envvar = getenv ("ORC_DEBUG");
+  envvar = _orc_getenv ("ORC_DEBUG");
   if (envvar != NULL) {
     char *end = NULL;
     int level;
@@ -65,6 +66,7 @@
     if (end > envvar) {
       _orc_debug_level = level;
     }
+    free (envvar);
   }
 
   ORC_INFO ("orc-" VERSION " debug init");
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orcemulateopcodes.c 
new/orc-0.4.32/orc/orcemulateopcodes.c
--- old/orc-0.4.31/orc/orcemulateopcodes.c      2019-11-02 10:24:52.000000000 
+0100
+++ new/orc-0.4.32/orc/orcemulateopcodes.c      2020-09-11 19:18:44.178056500 
+0200
@@ -4896,7 +4896,7 @@
     /* 0: loadl */
     var32 = ptr4[i];
     /* 1: convlf */
-    var33.f = var32.i;
+    var33.f = (float) var32.i;
     /* 2: storel */
     ptr0[i] = var33;
   }
@@ -5279,7 +5279,7 @@
     /* 1: convdl */
     {
        int tmp;
-       tmp = var32.f;
+       tmp = (int) var32.f;
        if (tmp == 0x80000000 && !(var32.i & ORC_UINT64_C(0x8000000000000000))) 
tmp = 0x7fffffff;
        var33.i = tmp;
     }
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc/orcinternal.h 
new/orc-0.4.32/orc/orcinternal.h
--- old/orc-0.4.31/orc/orcinternal.h    2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc/orcinternal.h    2020-09-11 19:18:44.182056400 +0200
@@ -36,6 +36,8 @@
 
 void orc_compiler_emit_invariants (OrcCompiler *compiler);
 int orc_program_has_float (OrcCompiler *compiler);
+
+char* _orc_getenv (const char *var);
 #endif
 
 ORC_END_DECLS
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc-test/meson.build 
new/orc-0.4.32/orc-test/meson.build
--- old/orc-0.4.31/orc-test/meson.build 2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc-test/meson.build 2020-09-11 19:18:44.166056400 +0200
@@ -27,7 +27,6 @@
 endif
 
 # pkg-config file
-pkg = import('pkgconfig')
 pkg.generate(orc_test_lib,
   name: 'orc-test',
   filebase: 'orc-test-' + orc_api,
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc-test.pc.in 
new/orc-0.4.32/orc-test.pc.in
--- old/orc-0.4.31/orc-test.pc.in       2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc-test.pc.in       1970-01-01 01:00:00.000000000 +0100
@@ -1,12 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/orc-@ORC_MAJORMINOR@
-
-Name: orc-test-@ORC_MAJORMINOR@
-Description: Test Library of Optimized Inner Loops Runtime Compiler
-Version: @VERSION@
-Requires: orc-@ORC_MAJORMINOR@
-Libs: -L${libdir} -lorc-test-@ORC_MAJORMINOR@
-Libs.private: @LIBM@ @LIBRT@ @PTHREAD_LIBS@
-Cflags: -I${includedir}
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/orc.pc.in new/orc-0.4.32/orc.pc.in
--- old/orc-0.4.31/orc.pc.in    2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/orc.pc.in    1970-01-01 01:00:00.000000000 +0100
@@ -1,16 +0,0 @@
-prefix=@prefix@
-exec_prefix=@exec_prefix@
-libdir=@libdir@
-includedir=@includedir@/orc-@ORC_MAJORMINOR@
-toolsdir=${exec_prefix}/bin
-
-
-Name: orc-@ORC_MAJORMINOR@
-Description: Library of Optimized Inner Loops Runtime Compiler
-Version: @VERSION@
-Libs: -L${libdir} -lorc-@ORC_MAJORMINOR@
-Libs.private: @LIBM@ @LIBRT@ @PTHREAD_LIBS@
-Cflags: -I${includedir}
-
-orcc=${toolsdir}/orcc@EXEEXT@
-
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/testsuite/benchmorc/meson.build 
new/orc-0.4.32/testsuite/benchmorc/meson.build
--- old/orc-0.4.31/testsuite/benchmorc/meson.build      2019-11-02 
10:24:52.000000000 +0100
+++ new/orc-0.4.32/testsuite/benchmorc/meson.build      2020-09-11 
19:18:44.206056400 +0200
@@ -1,6 +1,8 @@
-bench10_orc_path = meson.current_source_dir() + '/bench10.orc'
+bench10_orc_path = meson.current_source_dir() / 'bench10.orc'
 
-executable ('benchmorc', 'benchmorc.c',
+exe = executable ('benchmorc', 'benchmorc.c',
             c_args : ['-DORC_TEST_FILENAME="' + bench10_orc_path + '"'],
             dependencies: [libm, orc_dep, orc_test_dep],
             install: false)
+
+benchmark('bench10', exe)
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/testsuite/memcpy_speed.c 
new/orc-0.4.32/testsuite/memcpy_speed.c
--- old/orc-0.4.31/testsuite/memcpy_speed.c     2019-11-02 10:24:52.000000000 
+0100
+++ new/orc-0.4.32/testsuite/memcpy_speed.c     2020-09-11 19:18:44.214056300 
+0200
@@ -95,16 +95,16 @@
 #endif
   orc_get_data_cache_sizes (&level1, &level2, &level3);
   if (level3 > 0) {
-    max = (log(level3)/M_LN2 - 6.0) * 10 + 20;
+    max = (int) ((log(level3)/M_LN2 - 6.0) * 10 + 20);
   } else if (level2 > 0) {
-    max = (log(level2)/M_LN2 - 6.0) * 10 + 20;
+    max = (int) ((log(level2)/M_LN2 - 6.0) * 10 + 20);
   } else {
     max = 140;
   }
 
   for(i=0;i<max;i+=2){
     double x = i*0.1 + 6.0;
-    int size = pow(2.0, x);
+    int size = (int) pow(2.0, x);
 
     if (size > MAX_SIZE_TO_CHECK) {
       printf ("Stopping test, exceeding maximum size to check (%d, could do 
above %d)\n",
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/testsuite/meson.build 
new/orc-0.4.32/testsuite/meson.build
--- old/orc-0.4.31/testsuite/meson.build        2019-11-02 10:24:52.000000000 
+0100
+++ new/orc-0.4.32/testsuite/meson.build        2020-09-11 19:18:44.214056300 
+0200
@@ -41,6 +41,7 @@
 
 subdir('orcc')
 
-if not get_option('benchmarks').disabled()
+opt_benchmarks = get_option('benchmarks')
+if not opt_benchmarks.disabled()
   subdir('benchmorc')
 endif
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/tools/meson.build 
new/orc-0.4.32/tools/meson.build
--- old/orc-0.4.31/tools/meson.build    2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/tools/meson.build    2020-09-11 19:18:44.222056400 +0200
@@ -10,3 +10,14 @@
 orc_bugreport = executable ('orc-bugreport', 'orc-bugreport.c',
                             install: true,
                             dependencies : [orc_dep, orc_test_dep])
+
+if host_os == 'windows'
+  orcc_filename = 'orcc.exe'
+else
+  orcc_filename = 'orcc'
+endif
+
+tools_variables = [
+  'toolsdir=' + ('${prefix}' / get_option('bindir')),
+  'orcc=' + ('${toolsdir}' / orcc_filename),
+]
diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' 
'--exclude=.svnignore' old/orc-0.4.31/tools/orcc.c new/orc-0.4.32/tools/orcc.c
--- old/orc-0.4.31/tools/orcc.c 2019-11-02 10:24:52.000000000 +0100
+++ new/orc-0.4.32/tools/orcc.c 2020-09-11 19:18:44.222056400 +0200
@@ -22,7 +22,6 @@
 void output_code_execute (OrcProgram *p, FILE *output, int is_inline);
 void output_program_generation (OrcProgram *p, FILE *output, int is_inline);
 void output_init_function (FILE *output);
-static char * get_barrier (const char *s);
 static const char * my_basename (const char *s);
 
 int verbose = 0;
@@ -319,11 +318,7 @@
       fprintf(output, "\n");
     }
   } else if (mode == MODE_HEADER) {
-    char *barrier = get_barrier (output_file);
-
-    fprintf(output, "#ifndef _%s_\n", barrier);
-    fprintf(output, "#define _%s_\n", barrier);
-    free (barrier);
+    fprintf(output, "#pragma once\n");
     fprintf(output, "\n");
     if (include_file) {
       fprintf(output, "#include <%s>\n", include_file);
@@ -357,8 +352,6 @@
     fprintf(output, "}\n");
     fprintf(output, "#endif\n");
     fprintf(output, "\n");
-    fprintf(output, "#endif\n");
-    fprintf(output, "\n");
   } else if (mode == MODE_TEST) {
     fprintf(output, "#include <stdio.h>\n");
     fprintf(output, "#include <string.h>\n");
@@ -450,28 +443,6 @@
   return 0;
 }
 
-
-static char *
-get_barrier (const char *s)
-{
-  char *barrier;
-  int n;
-  int i;
-
-  n = strlen(s);
-  barrier = malloc (n + 1);
-  for(i=0;i<n;i++) {
-    if (isalnum (s[i])) {
-      barrier[i] = toupper(s[i]);
-    } else {
-      barrier[i] = '_';
-    }
-  }
-  barrier[n] = 0;
-
-  return barrier;
-}
-
 static char *
 read_file (const char *filename)
 {

Reply via email to