diff --git a/recipes/glib/glib-2.34.0/libtool-bindir.patch b/recipes/glib/glib-2.34.0/libtool-bindir.patch
deleted file mode 100644
index e1620e8..0000000
--- a/recipes/glib/glib-2.34.0/libtool-bindir.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- glib-2.34.0/ltmain.sh~orig	2014-02-01 18:36:10.724676077 +0100
-+++ glib-2.34.0/ltmain.sh	2014-02-01 18:36:18.900675907 +0100
-@@ -5133,7 +5133,7 @@
-     new_inherited_linker_flags=
- 
-     avoid_version=no
--    bindir=
-+    bindir=$sharedlibdir
-     dlfiles=
-     dlprefiles=
-     dlself=no
diff --git a/recipes/glib/glib-2.39.2/clang.patch b/recipes/glib/glib-2.39.2/clang.patch
new file mode 100644
index 0000000..01c9949
--- /dev/null
+++ b/recipes/glib/glib-2.39.2/clang.patch
@@ -0,0 +1,82 @@
+diff -urN a/ChangeLog.pre-2-0 b/ChangeLog.pre-2-0
+--- a/ChangeLog.pre-2-0	2013-11-23 06:21:30.000000000 +0100
++++ b/ChangeLog.pre-2-0	2014-07-30 22:51:34.807544116 +0200
+@@ -963,7 +963,7 @@
+ 
+ 2001-11-06  Tor Lillqvist  <tml@iki.fi>
+ 
+-	* glib/Makefile.am (gspawn_win32_helper_LDFLAGS): Use -mwindows.
++	* glib/Makefile.am (gspawn_win32_helper_LDFLAGS): Use -Wl,-subsystem,windows.
+ 
+ 2001-11-05  Tor Lillqvist  <tml@iki.fi>
+ 
+diff -urN a/ChangeLog.pre-2-10 b/ChangeLog.pre-2-10
+--- a/ChangeLog.pre-2-10	2013-11-23 06:21:30.000000000 +0100
++++ b/ChangeLog.pre-2-10	2014-07-30 22:51:36.915455884 +0200
+@@ -1197,7 +1197,7 @@
+ 	* glib/Makefile.am: Create also a console version of the
+ 	gspawn-win32-helper program, gspawn-win32-helper-console.exe.
+ 	It's otherwise identical to gspawn-win32-helper.exe, except marked
+-	as a console application (linked without the -mwindows option).
++	as a console application (linked without the -Wl,-subsystem,windows option).
+ 	
+ 	* glib/gspawn-win32.c (do_spawn_directly, do_spawn_with_pipes):
+ 	Drop the dont_wait parameter. Its truth value correlated 100% with
+diff -urN a/glib/Makefile.am b/glib/Makefile.am
+--- a/glib/Makefile.am	2013-11-28 04:01:16.000000000 +0100
++++ b/glib/Makefile.am	2014-07-30 22:51:36.223484594 +0200
+@@ -397,12 +397,12 @@
+ if OS_WIN32_X64
+ INSTALL_PROGS += gspawn-win64-helper gspawn-win64-helper-console
+ gspawn_win64_helper_LDADD = libglib-2.0.la
+-gspawn_win64_helper_LDFLAGS = -mwindows
++gspawn_win64_helper_LDFLAGS = -Wl,-subsystem,windows
+ gspawn_win64_helper_console_LDADD = libglib-2.0.la
+ else
+ INSTALL_PROGS += gspawn-win32-helper gspawn-win32-helper-console
+ gspawn_win32_helper_LDADD = libglib-2.0.la
+-gspawn_win32_helper_LDFLAGS = -mwindows
++gspawn_win32_helper_LDFLAGS = -Wl,-subsystem,windows
+ gspawn_win32_helper_console_LDADD = libglib-2.0.la
+ endif
+ endif
+diff -urN a/glib/Makefile.in b/glib/Makefile.in
+--- a/glib/Makefile.in	2013-12-17 06:30:54.000000000 +0100
++++ b/glib/Makefile.in	2014-07-30 22:51:36.399477292 +0200
+@@ -1141,10 +1141,10 @@
+ @ENABLE_SYSTEMTAP_TRUE@tapsetdir = @ABS_TAPSET_DIR@
+ @ENABLE_SYSTEMTAP_TRUE@tapset_DATA = $(tapset_in_files:.stp.in=.stp)
+ @OS_WIN32_TRUE@@OS_WIN32_X64_TRUE@gspawn_win64_helper_LDADD = libglib-2.0.la
+-@OS_WIN32_TRUE@@OS_WIN32_X64_TRUE@gspawn_win64_helper_LDFLAGS = -mwindows
++@OS_WIN32_TRUE@@OS_WIN32_X64_TRUE@gspawn_win64_helper_LDFLAGS = -Wl,-subsystem,windows
+ @OS_WIN32_TRUE@@OS_WIN32_X64_TRUE@gspawn_win64_helper_console_LDADD = libglib-2.0.la
+ @OS_WIN32_TRUE@@OS_WIN32_X64_FALSE@gspawn_win32_helper_LDADD = libglib-2.0.la
+-@OS_WIN32_TRUE@@OS_WIN32_X64_FALSE@gspawn_win32_helper_LDFLAGS = -mwindows
++@OS_WIN32_TRUE@@OS_WIN32_X64_FALSE@gspawn_win32_helper_LDFLAGS = -Wl,-subsystem,windows
+ @OS_WIN32_TRUE@@OS_WIN32_X64_FALSE@gspawn_win32_helper_console_LDADD = libglib-2.0.la
+ @OS_UNIX_TRUE@gtester_SOURCES = gtester.c
+ @OS_UNIX_TRUE@gtester_LDADD = libglib-2.0.la 
+diff -urN a/tests/Makefile.am b/tests/Makefile.am
+--- a/tests/Makefile.am	2013-11-23 15:58:07.000000000 +0100
++++ b/tests/Makefile.am	2014-07-30 22:51:36.995452565 +0200
+@@ -140,7 +140,7 @@
+ 
+ installed_test_extra_programs = spawn-test-win32-gui
+ 
+-spawn_test_win32_gui_LDFLAGS = -mwindows
++spawn_test_win32_gui_LDFLAGS = -Wl,-subsystem,windows
+ 
+ endif
+ 
+diff -urN a/tests/Makefile.in b/tests/Makefile.in
+--- a/tests/Makefile.in	2013-12-17 06:30:55.000000000 +0100
++++ b/tests/Makefile.in	2014-07-30 22:51:37.011451902 +0200
+@@ -1129,7 +1129,7 @@
+ @PLATFORM_WIN32_TRUE@no_undefined = -no-undefined
+ @PLATFORM_WIN32_TRUE@module_test_exp = module-test.exp
+ @PLATFORM_WIN32_TRUE@installed_test_extra_programs = spawn-test-win32-gui
+-@PLATFORM_WIN32_TRUE@spawn_test_win32_gui_LDFLAGS = -mwindows
++@PLATFORM_WIN32_TRUE@spawn_test_win32_gui_LDFLAGS = -Wl,-subsystem,windows
+ all: $(BUILT_SOURCES)
+ 	$(MAKE) $(AM_MAKEFLAGS) all-recursive
+ 
diff --git a/recipes/glib/glib-common.inc b/recipes/glib/glib-common.inc
index 988c68f..ff1fe98 100644
--- a/recipes/glib/glib-common.inc
+++ b/recipes/glib/glib-common.inc
@@ -20,17 +20,17 @@ DEPENDS_NATIVE:native = ""
 
 DEPENDS += "${DEPENDS_LIBDL}"
 DEPENDS_LIBDL = "libdl"
-DEPENDS_LIBDL:HOST_OS_mingw32 = ""
+DEPENDS_LIBDL:HOST_LIBC_mingw = ""
 DEPENDS_LIBDL:native = ""
 
 DEPENDS += "${DEPENDS_LIBRESOLV}"
 DEPENDS_LIBRESOLV = "libresolv"
-DEPENDS_LIBRESOLV:HOST_OS_mingw32 = ""
+DEPENDS_LIBRESOLV:HOST_LIBC_mingw = ""
 DEPENDS_LIBRESOLV:native = ""
 
 DEPENDS += "${DEPENDS_LIBINTL}"
 DEPENDS_LIBINTL = ""
-DEPENDS_LIBINTL:HOST_OS_mingw32 = "libintl"
+DEPENDS_LIBINTL:HOST_LIBC_mingw = "libintl"
 DEPENDS_LIBINTL:HOST_KERNEL_darwin = "libintl"
 
 require conf/fetch/gnome.conf
@@ -46,6 +46,8 @@ EXTRA_OECONF = "--disable-debug \
 	--disable-modular-tests \
 "
 
+CFLAGS += "-Wno-error=format-nonliteral"
+
 EXTRA_OEMAKE += "'CFLAGS=${CFLAGS}'"
 
 do_install[postfuncs] += "do_install_unmangle"
diff --git a/recipes/glib/glib-initial_2.39.2.oe b/recipes/glib/glib-initial_2.39.2.oe
index bbfcf94..cc8b5f7 100644
--- a/recipes/glib/glib-initial_2.39.2.oe
+++ b/recipes/glib/glib-initial_2.39.2.oe
@@ -6,6 +6,8 @@ require ${PN}.inc
 SRC_URI += "file://glibconfig-sysdefs.h"
 SRC_URI += "file://60_wait-longer-for-threads-to-die.patch"
 SRC_URI += "file://0005-glib-mkenums-interpreter.patch.patch"
+#SRC_URI += "file://fix_pkg_config.patch"
+#SRC_URI += "file://clang.patch"
 
 do_patch[postfuncs] += "do_patch_extra_files"
 do_patch_extra_files() {
diff --git a/recipes/glib/glib.inc b/recipes/glib/glib.inc
index c1223aa..3d920b8 100644
--- a/recipes/glib/glib.inc
+++ b/recipes/glib/glib.inc
@@ -3,15 +3,11 @@ require glib-common.inc
 
 RECIPE_TYPES = "machine sdk"
 
-inherit autotools pkgconfig
+inherit autotools-autoreconf pkgconfig
 
 SRC_URI += "file://config.site"
 SRC_HOST_SITEFILES = "${SRCDIR}/config.site"
 
-EXTRA_OECONF += "${EXTRA_OECONF_STATIC}"
-EXTRA_OECONF_STATIC = "--enable-static"
-EXTRA_OECONF_STATIC:HOST_LIBC_mingw = ""
-
 RECIPE_FLAGS += "ipv6"
 EXTRA_OECONF += "${EXTRA_OECONF_IPV6}"
 EXTRA_OECONF_IPV6 = "--disable-ipv6"
@@ -26,6 +22,7 @@ RECIPE_FLAGS += "glib_iconv"
 EXTRA_OECONF += "${EXTRA_OECONF_ICONV}"
 EXTRA_OECONF_ICONV = "--with-libiconv=no"
 EXTRA_OECONF_ICONV:USE_glib_iconv = "--with-libiconv=gnu"
+EXTRA_OECONF_ICONV:TARGET_KERNEL_darwin = "--with-libiconv=gnu"
 DEPENDS += "${DEPENDS_ICONV}"
 DEPENDS_ICONV:USE_glib_iconv = "libiconv"
 
@@ -34,12 +31,12 @@ DEFAULT_USE_glib_threads = "1"
 EXTRA_OECONF += "${EXTRA_OECONF_THREADS}"
 EXTRA_OECONF_THREADS = "--disable-threads"
 EXTRA_OECONF_THREADS_TYPE = "posix"
-EXTRA_OECONF_THREADS_TYPE:HOST_OS_mingw32 = "win32"
+EXTRA_OECONF_THREADS_TYPE:HOST_LIBC_mingw = "win32"
 EXTRA_OECONF_THREADS:USE_glib_threads = "--with-threads=${EXTRA_OECONF_THREADS_TYPE}"
 
 DEPENDS += "${DEPENDS_THREADS}"
 DEPENDS_THREADS_TYPE = "libpthread"
-DEPENDS_THREADS_TYPE:HOST_OS_mingw32 = ""
+DEPENDS_THREADS_TYPE:HOST_LIBC_mingw = ""
 DEPENDS_THREADS:USE_glib_threads = "${DEPENDS_THREADS_TYPE}"
 
 RECIPE_FLAGS += "glib_fam"
diff --git a/recipes/glib/glib_2.39.2.oe b/recipes/glib/glib_2.39.2.oe
index e61f266..43aacde 100644
--- a/recipes/glib/glib_2.39.2.oe
+++ b/recipes/glib/glib_2.39.2.oe
@@ -6,6 +6,7 @@ require ${PN}.inc
 SRC_URI += "file://glibconfig-sysdefs.h"
 SRC_URI += "file://60_wait-longer-for-threads-to-die.patch"
 SRC_URI += "file://0005-glib-mkenums-interpreter.patch.patch"
+SRC_URI += "file://clang.patch"
 
 do_patch[postfuncs] += "do_patch_extra_files"
 do_patch_extra_files() {
