From: Rico Tzschichholz Date: Mon, 10 Oct 2016 08:05:04 +0000 (+0200) Subject: Ignore --thread commandline option and drop all gthread-2.0 references X-Git-Tag: 0.35.1~98 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=99aeafe607b29dcdc35b405641c4124595b4c7e6;p=thirdparty%2Fvala.git Ignore --thread commandline option and drop all gthread-2.0 references With vala 0.32 there was no further support for glib < 2.32. --- diff --git a/codegen/valaccodecompiler.vala b/codegen/valaccodecompiler.vala index 1ad3f0803..52161b422 100644 --- a/codegen/valaccodecompiler.vala +++ b/codegen/valaccodecompiler.vala @@ -61,9 +61,6 @@ public class Vala.CCodeCompiler { } use_pkgconfig = true; pc += " gobject-2.0"; - if (context.thread) { - pc += " gthread-2.0"; - } foreach (string pkg in context.get_packages ()) { if (package_exists (pkg, pkg_config_command)) { use_pkgconfig = true; diff --git a/codegen/valaccodemethodmodule.vala b/codegen/valaccodemethodmodule.vala index d147eb18b..aa2ab5c8c 100644 --- a/codegen/valaccodemethodmodule.vala +++ b/codegen/valaccodemethodmodule.vala @@ -836,16 +836,6 @@ public abstract class Vala.CCodeMethodModule : CCodeStructModule { ccode.add_expression (mem_profiler_init_call); } - if (context.thread) { - var thread_init_call = new CCodeFunctionCall (new CCodeIdentifier ("g_thread_init")); - thread_init_call.line = cmain.line; - thread_init_call.add_argument (new CCodeConstant ("NULL")); - - var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,32,0)"); - ccode.add_statement (cond); - cond.append (new CCodeExpressionStatement (thread_init_call)); - } - var cond = new CCodeIfSection ("!GLIB_CHECK_VERSION (2,35,0)"); ccode.add_statement (cond); cond.append (new CCodeExpressionStatement (new CCodeFunctionCall (new CCodeIdentifier ("g_type_init")))); diff --git a/compiler/valacompiler.vala b/compiler/valacompiler.vala index ccf5b76f3..38564fc93 100644 --- a/compiler/valacompiler.vala +++ b/compiler/valacompiler.vala @@ -124,7 +124,7 @@ class Vala.Compiler { { "compile", 'c', 0, OptionArg.NONE, ref compile_only, "Compile but do not link", null }, { "output", 'o', 0, OptionArg.FILENAME, ref output, "Place output in file FILE", "FILE" }, { "debug", 'g', 0, OptionArg.NONE, ref debug, "Produce debug information", null }, - { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support", null }, + { "thread", 0, 0, OptionArg.NONE, ref thread, "Enable multithreading support (DEPRECATED AND IGNORED)", null }, { "enable-mem-profiler", 0, 0, OptionArg.NONE, ref mem_profiler, "Enable GLib memory profiler", null }, { "define", 'D', 0, OptionArg.STRING_ARRAY, ref defines, "Define SYMBOL", "SYMBOL..." }, { "main", 0, 0, OptionArg.STRING, ref entry_point, "Use SYMBOL as entry point", "SYMBOL..." }, @@ -242,7 +242,6 @@ class Vala.Compiler { context.gir_directories = gir_directories; context.metadata_directories = metadata_directories; context.debug = debug; - context.thread = thread; context.mem_profiler = mem_profiler; context.save_temps = save_temps; if (ccode_only && save_temps) { diff --git a/configure.ac b/configure.ac index 744a26f50..f12d4efbc 100644 --- a/configure.ac +++ b/configure.ac @@ -81,11 +81,6 @@ PKG_CHECK_MODULES(GMODULE, gmodule-2.0 >= $GLIB_REQUIRED) AC_SUBST(GMODULE_CFLAGS) AC_SUBST(GMODULE_LIBS) -PKG_CHECK_MODULES(GTHREAD, gthread-2.0 >= $GLIB_REQUIRED) - -AC_SUBST(GTHREAD_CFLAGS) -AC_SUBST(GTHREAD_LIBS) - AC_PATH_PROG([XSLTPROC], [xsltproc], :) AM_CONDITIONAL(HAVE_XSLTPROC, test "$XSLTPROC" != :) diff --git a/contrib/parvala/parvala b/contrib/parvala/parvala index db53b8f59..bdea5c1e9 100755 --- a/contrib/parvala/parvala +++ b/contrib/parvala/parvala @@ -20,7 +20,6 @@ while test -n "$*"; do --directory=*) VALAFLAGS="${VALAFLAGS} $1";; --basedir=*) VALAFLAGS="${VALAFLAGS} $1";; --enable-checking) VALAFLAGS="${VALAFLAGS} $1";; - --thread) VALAFLAGS="${VALAFLAGS} $1";; --pkg=*) VALAFLAGS="${VALAFLAGS} $1";; --vapidir=*) VALAFLAGS="${VALAFLAGS} $1";; -X) shift; VALAFLAGS="${VALAFLAGS} -X $1";; diff --git a/doc/valac.1 b/doc/valac.1 index 2d3f70b23..d92368abe 100644 --- a/doc/valac.1 +++ b/doc/valac.1 @@ -88,7 +88,7 @@ Place output in file \fIFILE\fR Produce debug information .TP .B \--thread -Enable multithreading support +Enable multithreading support (DEPRECATED AND IGNORED) .TP .B \--enable-mem-profiler Enable GLib memory profiler diff --git a/gobject-introspection/Makefile.am b/gobject-introspection/Makefile.am index 9b30e1f27..78d733e4f 100644 --- a/gobject-introspection/Makefile.am +++ b/gobject-introspection/Makefile.am @@ -44,7 +44,6 @@ gen_introspect_SOURCES = \ gen_introspect_LDADD = \ $(GLIB_LIBS) \ $(GMODULE_LIBS) \ - $(GTHREAD_LIBS) \ libgidl.la \ $(NULL) diff --git a/gobject-introspection/scanner.c b/gobject-introspection/scanner.c index 40e4efec5..34728c115 100644 --- a/gobject-introspection/scanner.c +++ b/gobject-introspection/scanner.c @@ -1783,11 +1783,6 @@ main (int argc, char **argv) g_type_init (); - /* initialize threading as this may be required by libraries that we'll use - * libsoup-2.2 is an example of that. - */ - g_thread_init (NULL); - if (include_idls) { for (i = 0; i < g_strv_length (include_idls); i++) diff --git a/vala/valacodecontext.vala b/vala/valacodecontext.vala index ddb9fdfb1..0407561bc 100644 --- a/vala/valacodecontext.vala +++ b/vala/valacodecontext.vala @@ -138,11 +138,6 @@ public class Vala.CodeContext { */ public int optlevel { get; set; } - /** - * Enable multithreading support. - */ - public bool thread { get; set; } - /** * Enable memory profiler. */