diff options
25 files changed, 180 insertions, 1211 deletions
diff --git a/libre/glib2-static/0001-docs-Fix-building-with-meson.patch b/libre/glib2-static/0001-docs-Fix-building-with-meson.patch deleted file mode 100644 index 02f69b700..000000000 --- a/libre/glib2-static/0001-docs-Fix-building-with-meson.patch +++ /dev/null @@ -1,85 +0,0 @@ -From a7cbd565aad04f92cbd9ac36696a9d033ae6bcc0 Mon Sep 17 00:00:00 2001 -From: Armin K <krejzi@email.com> -Date: Fri, 25 Aug 2017 13:36:23 +0200 -Subject: [PATCH] docs: Fix building with meson - -This fixes {gio,gobject}-doc ninja targets as well as -install process when gtk-doc is enabled ---- - docs/reference/gio/meson.build | 15 ++++++++++++++- - docs/reference/gobject/meson.build | 13 ++++++++++++- - 2 files changed, 26 insertions(+), 2 deletions(-) - -diff --git a/docs/reference/gio/meson.build b/docs/reference/gio/meson.build -index 7f0467726..8f8dc7ce5 100644 ---- a/docs/reference/gio/meson.build -+++ b/docs/reference/gio/meson.build -@@ -52,9 +52,12 @@ if get_option('with-docs') != 'no' - 'gnetworkmonitorbase.h', - 'gnetworkmonitornetlink.h', - 'gnetworkmonitornm.h', -+ 'gnetworkmonitorportal.h', - 'gnotificationbackend.h', - 'gnotification-private.h', -+ 'gosxappinfo.h', - 'gpollfilemonitor.h', -+ 'gproxyresolverportal.h', - 'gregistrysettingsbackend.h', - 'gresourcefile.h', - 'gsettingsbackendinternal.h', -@@ -95,12 +98,22 @@ if get_option('with-docs') != 'no' - configuration: version_conf - ) - -+ # Meson uses paths relative to meson.source_root() in dependencies, -+ # which is invalid relative to current_source_dir(), so the compile -+ # process fails to find glib headers -+ top_build_dir = meson.build_root() -+ top_source_dir = meson.source_root() -+ glib_top_build_dir = join_paths(top_build_dir, 'glib') -+ glib_top_source_dir = join_paths(top_source_dir, 'glib') -+ -+ scan_dep = declare_dependency(include_directories : [ top_source_dir, glib_top_build_dir, glib_top_source_dir ]) -+ - gnome.gtkdoc('gio', - main_xml : 'gio-docs.xml', - namespace : 'g', - gobject_typesfile : 'gio.types', - mode : 'none', -- dependencies : [libgio_dep, libgobject_dep, libglib_dep], -+ dependencies : [libgio_dep, libgobject_dep, libglib_dep, scan_dep], - src_dir : 'gio', - scan_args : [ - '--rebuild-types', -diff --git a/docs/reference/gobject/meson.build b/docs/reference/gobject/meson.build -index 1025e174f..9ec1f9123 100644 ---- a/docs/reference/gobject/meson.build -+++ b/docs/reference/gobject/meson.build -@@ -17,12 +17,23 @@ if get_option('with-docs') != 'no' - configuration: version_conf - ) - -+ # Meson uses paths relative to meson.source_root() in dependencies, -+ # which is invalid relative to current_source_dir(), so the compile -+ # process fails to find glib headers -+ doc_source_dir = meson.current_source_dir() -+ top_build_dir = meson.build_root() -+ top_source_dir = meson.source_root() -+ glib_top_build_dir = join_paths(top_build_dir, 'glib') -+ glib_top_source_dir = join_paths(top_source_dir, 'glib') -+ -+ scan_dep = declare_dependency(include_directories : [ doc_source_dir, top_source_dir, glib_top_build_dir, glib_top_source_dir ]) -+ - gnome.gtkdoc('gobject', - main_xml : 'gobject-docs.xml', - namespace : 'g', - gobject_typesfile : join_paths(meson.current_source_dir(), 'gobject.types'), - mode : 'none', -- dependencies : [libgobject_dep, libglib_dep], -+ dependencies : [libgobject_dep, libglib_dep, scan_dep], - src_dir : 'gobject', - scan_args : [ - '--deprecated-guards=G_DISABLE_DEPRECATED', --- -2.14.1 - diff --git a/libre/glib2-static/0001-meson-Build-with-static-linkage.patch b/libre/glib2-static/0001-meson-Build-with-static-linkage.patch deleted file mode 100644 index d7fa59bfa..000000000 --- a/libre/glib2-static/0001-meson-Build-with-static-linkage.patch +++ /dev/null @@ -1,126 +0,0 @@ -From 241041b0b38e5851bb1a166cbd9393bbdd6eea06 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@lukeshu.com> -Date: Sun, 24 Dec 2017 03:42:06 -0500 -Subject: [PATCH] meson: Build with static linkage. - -This switches all libraries from using shared_library() to -static_library(). For some reason, switching them to just library() (which -should obey default_library) doesn't allow -Ddefault_library=static to set -most of them to static. I suspect it's a bug in meson 0.44.0-1. - -This also amends libglib_dep to include the pkg-config's Libs.private. ---- - gio/meson.build | 2 +- - gio/tests/gdbus-object-manager-example/meson.build | 2 +- - gio/tests/modules/meson.build | 4 ++-- - glib/meson.build | 3 ++- - gmodule/meson.build | 2 +- - gobject/meson.build | 2 +- - gthread/meson.build | 2 +- - 7 files changed, 9 insertions(+), 8 deletions(-) - -diff --git a/gio/meson.build b/gio/meson.build -index d7030aa29..b904841b2 100644 ---- a/gio/meson.build -+++ b/gio/meson.build -@@ -711,7 +711,7 @@ else - gio_dtrace_hdr = [] - endif - --libgio = shared_library('gio-2.0', -+libgio = static_library('gio-2.0', - gioenumtypes_h, gioenumtypes_c, gnetworking_h, gio_sources, - gio_dtrace_hdr, gio_dtrace_obj, - version : library_version, -diff --git a/gio/tests/gdbus-object-manager-example/meson.build b/gio/tests/gdbus-object-manager-example/meson.build -index 630357378..b92d6ea9d 100644 ---- a/gio/tests/gdbus-object-manager-example/meson.build -+++ b/gio/tests/gdbus-object-manager-example/meson.build -@@ -14,7 +14,7 @@ gdbus_example_objectmanager_generated = custom_target('gdbus-example-objectmanag - '--generate-docbook', 'gdbus-example-objectmanager-generated', - '@INPUT@']) - --libgdbus_example_objectmanager = shared_library('libgdbus-example-objectmanager', -+libgdbus_example_objectmanager = static_library('libgdbus-example-objectmanager', - gdbus_example_objectmanager_generated, - c_args : ['-DHAVE_CONFIG_H=1'] + gio_c_args, - dependencies : [libglib_dep, libgmodule_dep, libgobject_dep, libgio_dep], -diff --git a/gio/tests/modules/meson.build b/gio/tests/modules/meson.build -index c219015d3..21a43c5ee 100644 ---- a/gio/tests/modules/meson.build -+++ b/gio/tests/modules/meson.build -@@ -1,10 +1,10 @@ --libtestmodulea = shared_library('testmodulea', 'test-module-a.c', -+libtestmodulea = static_library('testmodulea', 'test-module-a.c', - install : false, - dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], - c_args : [ ] - ) - --libtestmoduleb = shared_library('testmoduleb', 'test-module-b.c', -+libtestmoduleb = static_library('testmoduleb', 'test-module-b.c', - install : false, - dependencies : [libglib_dep, libgobject_dep, libgmodule_dep, libgio_dep], - c_args : [ ] -diff --git a/glib/meson.build b/glib/meson.build -index e46d2deb6..371e5bfbf 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -220,7 +220,7 @@ if use_pcre_static_flag - pcre_static_args = ['-DPCRE_STATIC'] - endif - --libglib = shared_library('glib-2.0', -+libglib = static_library('glib-2.0', - glib_dtrace_obj, glib_dtrace_hdr, - sources : [deprecated_sources, glib_sources, thread_src, plat_src], - version : library_version, -@@ -235,6 +235,7 @@ libglib = shared_library('glib-2.0', - ) - - libglib_dep = declare_dependency(link_with : libglib, -+ dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps, - # We sadly need to export configinc here because everyone includes <glib/*.h> - include_directories : [configinc, glibinc]) - -diff --git a/gmodule/meson.build b/gmodule/meson.build -index fd0219d92..841fc1e91 100644 ---- a/gmodule/meson.build -+++ b/gmodule/meson.build -@@ -87,7 +87,7 @@ gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in', - - install_headers(['gmodule.h'], subdir : 'glib-2.0') - --libgmodule = shared_library('gmodule-2.0', -+libgmodule = static_library('gmodule-2.0', - sources : ['gmodule.c'], - version : library_version, - soversion : soversion, -diff --git a/gobject/meson.build b/gobject/meson.build -index 9c722ce30..feac8fa92 100644 ---- a/gobject/meson.build -+++ b/gobject/meson.build -@@ -53,7 +53,7 @@ else - gobject_dtrace_hdr = [] - endif - --libgobject = shared_library('gobject-2.0', -+libgobject = static_library('gobject-2.0', - gobject_dtrace_obj, gobject_dtrace_hdr, - sources : [gobject_c_sources], - version : library_version, -diff --git a/gthread/meson.build b/gthread/meson.build -index 2d5913a91..63e6dd86b 100644 ---- a/gthread/meson.build -+++ b/gthread/meson.build -@@ -1,6 +1,6 @@ - # Just a skeleton lib for backwards compatibility since all the functionaliy - # has been moved into glib now --libgthread = shared_library('gthread-2.0', -+libgthread = static_library('gthread-2.0', - sources : [ 'gthread-impl.c' ], - version : library_version, - soversion : soversion, --- -2.15.1 - diff --git a/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch b/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch deleted file mode 100644 index 10c85a3f4..000000000 --- a/libre/glib2-static/0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch +++ /dev/null @@ -1,50 +0,0 @@ -From b454a60bf154332bd5961880700b7d08aec98995 Mon Sep 17 00:00:00 2001 -Message-Id: <b454a60bf154332bd5961880700b7d08aec98995.1508856243.git.jan.steffens@gmail.com> -From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> -Date: Tue, 24 Oct 2017 16:29:49 +0200 -Subject: [PATCH] meson: Fix GDB scripts install_dir for *nix - -Disable installation on Windows for now as this would use a colon in the -directory name. - -https://bugzilla.gnome.org/show_bug.cgi?id=788772 ---- - glib/meson.build | 5 +++-- - gobject/meson.build | 5 +++-- - 2 files changed, 6 insertions(+), 4 deletions(-) - -diff --git a/glib/meson.build b/glib/meson.build -index 1da0bcd3cc601b9e..33ece2d0221c1850 100644 ---- a/glib/meson.build -+++ b/glib/meson.build -@@ -283,8 +283,9 @@ configure_file( - input: 'libglib-gdb.py.in', - output: 'libglib-2.0.so.@0@-gdb.py'.format(library_version), - configuration: gdb_conf, -- install: true, -- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load' + get_option('libdir')) -+ # FIXME: Figure out how to install this on Windows -+ install: host_system != 'windows', -+ install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir) - ) - - if enable_systemtap -diff --git a/gobject/meson.build b/gobject/meson.build -index 5a8289e6f054818e..0c8c0cb26f053d1c 100644 ---- a/gobject/meson.build -+++ b/gobject/meson.build -@@ -100,8 +100,9 @@ configure_file( - input: 'libgobject-gdb.py.in', - output: 'libgobject-2.0.so.@0@-gdb.py'.format(library_version), - configuration: gdb_conf, -- install: true, -- install_dir: join_paths(get_option('datadir'), 'gdb/auto-load/' + get_option('libdir')) -+ # FIXME: Figure out how to install this on Windows -+ install: host_system != 'windows', -+ install_dir: join_paths(glib_datadir, 'gdb', 'auto-load', './' + glib_libdir) - ) - - if enable_systemtap --- -2.14.2 - diff --git a/libre/glib2-static/0001-meson-Fix-libmount-support.patch b/libre/glib2-static/0001-meson-Fix-libmount-support.patch deleted file mode 100644 index c85f047c0..000000000 --- a/libre/glib2-static/0001-meson-Fix-libmount-support.patch +++ /dev/null @@ -1,41 +0,0 @@ -From c93756c8f066a1e35fa2f46b231771d78e292600 Mon Sep 17 00:00:00 2001 -Message-Id: <c93756c8f066a1e35fa2f46b231771d78e292600.1509419562.git.jan.steffens@gmail.com> -From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> -Date: Tue, 31 Oct 2017 04:11:42 +0100 -Subject: [PATCH] meson: Fix libmount support - -The define was still missing. ---- - config.h.meson | 3 +++ - meson.build | 1 + - 2 files changed, 4 insertions(+) - -diff --git a/config.h.meson b/config.h.meson -index c67e1792f4af1ada..3f310b3c960fcb29 100644 ---- a/config.h.meson -+++ b/config.h.meson -@@ -247,6 +247,9 @@ - /* Define if libelf is available */ - #mesondefine HAVE_LIBELF - -+/* Define if libmount is available */ -+#mesondefine HAVE_LIBMOUNT -+ - /* Define to 1 if you have the <linux/magic.h> header file. */ - #mesondefine HAVE_LINUX_MAGIC_H - -diff --git a/meson.build b/meson.build -index 208c23087627de1e..cd9cbf2ce10595c2 100644 ---- a/meson.build -+++ b/meson.build -@@ -1535,6 +1535,7 @@ if use_system_pcre - endif - if libmount_dep.length() == 1 and libmount_dep[0].found() - glib_conf.set('LIBMOUNT_LIBS', '-lmount') -+ glib_conf.set('HAVE_LIBMOUNT', 1) - endif - glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules') - # FIXME: Missing: --- -2.15.0 - diff --git a/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch b/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch deleted file mode 100644 index d89868acf..000000000 --- a/libre/glib2-static/0001-meson-Fix-permissions-of-installed-scripts.patch +++ /dev/null @@ -1,50 +0,0 @@ -From e36f79439be76f125b67081eb4605b377d738cca Mon Sep 17 00:00:00 2001 -Message-Id: <e36f79439be76f125b67081eb4605b377d738cca.1505389490.git.jan.steffens@gmail.com> -From: "Jan Alexander Steffens (heftig)" <jan.steffens@gmail.com> -Date: Thu, 14 Sep 2017 07:36:37 +0200 -Subject: [PATCH] meson: Fix permissions of installed scripts - -configure_file preserves the attributes, so the templates need to be -executable for the (installed) outputs to be executable. ---- - gio/gdbus-2.0/codegen/gdbus-codegen.in | 0 - gio/gdbus-2.0/codegen/meson.build | 1 - - glib-gettextize.in | 0 - gobject/meson.build | 1 - - 4 files changed, 2 deletions(-) - mode change 100644 => 100755 gio/gdbus-2.0/codegen/gdbus-codegen.in - mode change 100644 => 100755 glib-gettextize.in - -diff --git a/gio/gdbus-2.0/codegen/gdbus-codegen.in b/gio/gdbus-2.0/codegen/gdbus-codegen.in -old mode 100644 -new mode 100755 -diff --git a/gio/gdbus-2.0/codegen/meson.build b/gio/gdbus-2.0/codegen/meson.build -index 0e9ffbdfade70779..93d9106adba17a89 100644 ---- a/gio/gdbus-2.0/codegen/meson.build -+++ b/gio/gdbus-2.0/codegen/meson.build -@@ -13,7 +13,6 @@ gdbus_codegen_conf.set('VERSION', glib_version) - gdbus_codegen_conf.set('PYTHON', python.path()) - - # Install gdbus-codegen executable --# FIXME: Set permissions - gdbus_codegen = configure_file(input : 'gdbus-codegen.in', - output : 'gdbus-codegen', - install : true, -diff --git a/glib-gettextize.in b/glib-gettextize.in -old mode 100644 -new mode 100755 -diff --git a/gobject/meson.build b/gobject/meson.build -index 0d39f2bbc36f816e..01f37a33a623f4b8 100644 ---- a/gobject/meson.build -+++ b/gobject/meson.build -@@ -76,7 +76,6 @@ python_tools_conf.set('VERSION', glib_version) - python_tools_conf.set('PYTHON', python.path()) - - foreach tool: python_tools -- # FIXME: Ensure we set the appropriate permissions - tool_bin = configure_file( - input : tool + '.in', - output : tool, --- -2.14.1 - diff --git a/libre/glib2-static/PKGBUILD b/libre/glib2-static/PKGBUILD index 585082103..4220009f2 100644 --- a/libre/glib2-static/PKGBUILD +++ b/libre/glib2-static/PKGBUILD @@ -2,13 +2,9 @@ # Maintainer: Luke Shumaker <lukeshu@parabola.nu> # Contributor: Márcio Silva <coadde@hyperbola.info> -# glib 2.54 added meson as the preferred build system, and core/glib2 -# switched to that. However, the meson build doesn't support static -# linkage, so we're stuck with the old autotools build system. - pkgname=glib2-static -pkgver=2.54.2 -pkgrel=2.parabola2 +pkgver=2.56.1 +pkgrel=1.static1 pkgdesc="Low level core library" url="https://wiki.gnome.org/Projects/GLib" license=(LGPL2.1) @@ -16,27 +12,17 @@ arch=(x86_64) arch+=(i686 armv7h) depends=(pcre libffi libutil-linux zlib) _depends=(pcre-static libffi-static libutil-linux-static zlib) -makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux meson dbus) +makedepends=(gettext gtk-doc shared-mime-info python libelf git util-linux dbus) makedepends+=("${_depends[@]}") checkdepends=(desktop-file-utils) -optdepends=('python: for gdbus-codegen and gtester-report' +optdepends=('python: gdbus-codegen, glib-genmarshal, glib-mkenums, gtester-report' 'libelf: gresource inspection tool') options=(!emptydirs) -_commit=52b3e434d849e2b0233d6d3d663b5dda82ab263e # tags/2.54.2^0 -source=("git+https://git.gnome.org/browse/glib#commit=$_commit" - 0001-docs-Fix-building-with-meson.patch - 0001-meson-Fix-permissions-of-installed-scripts.patch - 0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch - 0001-meson-Fix-libmount-support.patch - libs.diff +_commit=d0364b443805dcb832c200fcf8bf58a64fdf3e7d # tags/2.56.1^0 +source=("git+https://gitlab.gnome.org/GNOME/glib.git#commit=$_commit" noisy-glib-compile-schemas.diff glib-compile-schemas.hook gio-querymodules.hook) sha256sums=('SKIP' - '8b289f3e1a5a3b29d310d45610468199acfe6f2b38a0d1be38c9224437a0e40c' - '12b1a2f4e304e4c03e48ae9564d73ae38619bbb7711a013138939ff8e5cc2327' - 'f53d5acfda4b7141a4813f1e49610e9176dc5bdf8e867d88290e34d91a40ebcb' - '14c0dcfb4efb690f7cb44673faf31f5eb40ac68c01974eddb53d5aa7ae366629' - '2fb828f51727bd9c8b48cfd9d6833c8b4ff82803331f6e2340b0ec8edfe57c52' '81a4df0b638730cffb7fa263c04841f7ca6b9c9578ee5045db6f30ff0c3fc531' 'e1123a5d85d2445faac33f6dae1085fdd620d83279a4e130a83fe38db52b62b3' '5ba204a2686304b1454d401a39a9d27d09dd25e4529664e3fd565be3d439f8b6') @@ -47,24 +33,8 @@ pkgver() { } prepare() { - mkdir -p build glib2-docs/usr/share cd glib - # https://bugzilla.gnome.org/show_bug.cgi?id=786796 - patch -Np1 -i ../0001-docs-Fix-building-with-meson.patch - - # https://bugzilla.gnome.org/show_bug.cgi?id=787671 - patch -Np1 -i ../0001-meson-Fix-permissions-of-installed-scripts.patch - - # https://bugzilla.gnome.org/show_bug.cgi?id=788772 - patch -Np1 -i ../0001-meson-Fix-GDB-scripts-install_dir-for-nix.patch - - # https://bugzilla.gnome.org/show_bug.cgi?id=789681 - patch -Np1 -i ../0001-meson-Fix-libmount-support.patch - - # https://bugzilla.gnome.org/show_bug.cgi?id=788773 - patch -Np1 -i ../libs.diff - # Suppress noise from glib-compile-schemas.hook patch -Np1 -i ../noisy-glib-compile-schemas.diff @@ -72,19 +42,31 @@ prepare() { } build() { - cd build - ../glib/configure --prefix=/usr --libdir=/usr/lib \ - --sysconfdir=/etc \ - --with-pcre=system \ - --disable-fam \ - --disable-gtk-doc \ - --disable-shared --enable-static \ - $(check_option debug y && echo --enable-debug=yes) + local debug=minimum + check_option debug y && debug=yes + + if [[ $CARCH = i686 ]]; then + # GTimer has trouble with x87 math, force SSE2 (which is implied + # on x86_64). + CFLAGS+=' -msse2 -mfpmath=sse' + fi + + cd glib + ./configure \ + --prefix=/usr \ + --libdir=/usr/lib \ + --sysconfdir=/etc \ + --with-pcre=system \ + --enable-debug=$debug \ + --disable-gtk-doc \ + --disable-fam \ + --enable-static + sed -i -e 's/ -shared / -Wl,-O1,--as-needed\0/g' libtool make } -_check() { - cd build +check() { + cd glib rm -rf "$srcdir/test-home" mkdir "$srcdir/test-home" HOME="$srcdir/test-home" make -j1 check @@ -92,13 +74,14 @@ _check() { package() { pkgdesc+=" (static libraries)" - depends=(glib2) + depends=("glib2=$pkgver") optdepends=() options=(staticlibs) - cd build + cd glib make DESTDIR="$pkgdir" install + rm -v -- "$pkgdir"/usr/lib/lib*.so* rm -vr -- \ "$pkgdir"/usr/bin/ \ "$pkgdir"/usr/include/ \ @@ -113,6 +96,8 @@ package_glib2-docs() { optdepends=() license+=(custom) - mv glib2-docs/* "$pkgdir" + mkdir -p "$pkgdir/usr/share" + mv gtk-doc "$pkgdir/usr/share" + install -Dt "$pkgdir/usr/share/licenses/glib2-docs" -m644 glib/docs/reference/COPYING } diff --git a/libre/glib2-static/libs.diff b/libre/glib2-static/libs.diff deleted file mode 100644 index eef85b814..000000000 --- a/libre/glib2-static/libs.diff +++ /dev/null @@ -1,110 +0,0 @@ -diff --git i/gio/meson.build w/gio/meson.build -index 4a10d49d7eb3229c..77537a77a26dcb5b 100644 ---- i/gio/meson.build -+++ w/gio/meson.build -@@ -741,7 +741,7 @@ libgio = shared_library('gio-2.0', - libgobject_dep, libgmodule_dep] + platform_deps + network_libs, - c_args : gio_c_args, - # intl.lib is not compatible with SAFESEH -- link_args : noseh_link_args, -+ link_args : noseh_link_args + library_link_args, - ) - - libgio_dep = declare_dependency(link_with : libgio, -diff --git i/glib/meson.build w/glib/meson.build -index f12a8b45bbbfec8f..2a505b3dd79ef163 100644 ---- i/glib/meson.build -+++ w/glib/meson.build -@@ -227,7 +227,7 @@ libglib = shared_library('glib-2.0', - soversion : soversion, - install : true, - # intl.lib is not compatible with SAFESEH -- link_args : noseh_link_args, -+ link_args : noseh_link_args + library_link_args, - include_directories : configinc, - link_with : [charset_lib, gnulib_lib], - dependencies : [pcre, thread_dep, libintl, librt] + libiconv + platform_deps, -diff --git i/gmodule/meson.build w/gmodule/meson.build -index 191bca2446f9977e..fd0219d9225f2f3f 100644 ---- i/gmodule/meson.build -+++ w/gmodule/meson.build -@@ -37,7 +37,7 @@ elif cc.has_function('NSLinkModule') - elif cc.links(dlopen_dlsym_test_code, args : '-ldl', name : 'dlopen() and dlsym() in libdl') - g_module_impl = 'G_MODULE_IMPL_DL' - libdl_dep = cc.find_library('dl') -- g_module_lib_args = '-ldl' -+ g_module_lib_args = ['-ldl'] - endif - - # additional checks for G_MODULE_IMPL_DL -@@ -72,25 +72,29 @@ if g_module_impl == '' - message('WARNING: No suitable GModule implementation found!') - endif - -+# For pc files -+glib_conf.set('G_MODULE_SUPPORTED', g_module_impl == '0' ? 'false' : 'true') -+glib_conf.set('G_MODULE_LIBS', ' '.join(g_module_lib_args)) -+ - gmoduleconf_conf.set('G_MODULE_IMPL', g_module_impl) --gmoduleconf_conf.set('G_MODULE_SUPPORTED', g_module_impl != '0') - gmoduleconf_conf.set('G_MODULE_HAVE_DLERROR', g_module_have_dlerror) - gmoduleconf_conf.set('G_MODULE_NEED_USCORE', g_module_need_uscore) - gmoduleconf_conf.set('G_MODULE_BROKEN_RTLD_GLOBAL', g_module_broken_rtld_global) - - gmoduleconf_h = configure_file(input : 'gmoduleconf.h.in', - output : 'gmoduleconf.h', - configuration : gmoduleconf_conf) - - install_headers(['gmodule.h'], subdir : 'glib-2.0') - - libgmodule = shared_library('gmodule-2.0', - sources : ['gmodule.c'], - version : library_version, - soversion : soversion, - install : true, - include_directories : [configinc, gmoduleinc], - dependencies : [libdl_dep, libglib_dep], -+ link_args : library_link_args, - c_args : ['-DG_LOG_DOMAIN="GModule"', '-DG_DISABLE_DEPRECATED'] + glib_hidden_visibility_args) - - libgmodule_dep = declare_dependency(link_with : libgmodule, -diff --git i/gobject/meson.build w/gobject/meson.build -index 65ffef0697b3bad4..32f6f91db12f29b6 100644 ---- i/gobject/meson.build -+++ w/gobject/meson.build -@@ -61,6 +61,7 @@ libgobject = shared_library('gobject-2.0', - install : true, - include_directories : [configinc], - dependencies : [libintl, libffi_dep, libglib_dep], -+ link_args : library_link_args, - c_args : ['-DG_LOG_DOMAIN="GLib-GObject"', '-DGOBJECT_COMPILATION'] + glib_hidden_visibility_args) - - libgobject_dep = declare_dependency(link_with : libgobject, -diff --git i/gthread/meson.build w/gthread/meson.build -index 8ccac3369894bda4..2d5913a91525460f 100644 ---- i/gthread/meson.build -+++ w/gthread/meson.build -@@ -6,4 +6,5 @@ libgthread = shared_library('gthread-2.0', - soversion : soversion, - install : true, - dependencies : [libglib_dep], -+ link_args : library_link_args, - c_args : ['-DG_LOG_DOMAIN="GThread"' ] + glib_hidden_visibility_args) -diff --git i/meson.build w/meson.build -index 208c23087627de1e..dd860592b26c9973 100644 ---- i/meson.build -+++ w/meson.build -@@ -1541,6 +1541,13 @@ glib_conf.set('GIO_MODULE_DIR', '${libdir}/gio/modules') - # @G_MODULE_LIBS@ @SELINUX_LIBS@ @COCOA_LIBS@ @CARBON_LIBS@ @G_LIBS_EXTRA@ - # @PCRE_REQUIRES@ @GLIB_EXTRA_CFLAGS@ @G_THREAD_CFLAGS@ - -+# HACK -+glib_conf.set('G_THREAD_LIBS', '-pthread') -+glib_conf.set('G_THREAD_CFLAGS', '-pthread') -+glib_conf.set('G_MODULE_LDFLAGS', '-Wl,--export-dynamic') -+glib_conf.set('PCRE_REQUIRES', 'libpcre') -+library_link_args = [ '-Wl,-z,nodelete' ] -+ - # Tracing: dtrace - want_dtrace = get_option('enable-dtrace') - enable_dtrace = false diff --git a/libre/libffi-static/PKGBUILD b/libre/libffi-static/PKGBUILD index 14b5f5f6f..81a4d6811 100644 --- a/libre/libffi-static/PKGBUILD +++ b/libre/libffi-static/PKGBUILD @@ -6,7 +6,7 @@ _pkgname=libffi pkgname=libffi-static pkgver=3.2.1 -pkgrel=2.parabola1 +pkgrel=2.static2 pkgdesc='Portable foreign function interface library' pkgdesc+=' (static libraries)' arch=('x86_64') diff --git a/libre/libutil-linux-static/0001-fstrim-cleanup-uncludes.patch b/libre/libutil-linux-static/0001-fstrim-cleanup-uncludes.patch new file mode 100644 index 000000000..74078555f --- /dev/null +++ b/libre/libutil-linux-static/0001-fstrim-cleanup-uncludes.patch @@ -0,0 +1,41 @@ +From 43abda66869e749044c6c4fd1d106d7df9484aca Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 22 Mar 2018 13:17:10 +0100 +Subject: fstrim: cleanup includes + +* HAVE_SYS_FS_H is incorrect (should be HAVE_LINUX_FS_H) + +* linux/fs.h cannot be included together with sys/mount.h as the both + files define MS_* constants. The libmount.h includes sys/mount.h now. + +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + sys-utils/fstrim.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c +index ca8cf256d..53ac594c0 100644 +--- a/sys-utils/fstrim.c ++++ b/sys-utils/fstrim.c +@@ -36,10 +36,6 @@ + #include <sys/ioctl.h> + #include <sys/stat.h> + +-#ifdef HAVE_SYS_FS_H +-# include <linux/fs.h> +-#endif +- + #include "nls.h" + #include "strutils.h" + #include "c.h" +@@ -49,6 +45,10 @@ + + #include <libmount.h> + ++ ++/* We cannot include linux/fs.h due to MS_* constants collision with ++ * sys/mount.h (and libmount.h) ++ */ + #ifndef FITRIM + struct fstrim_range { + uint64_t start; diff --git a/libre/libutil-linux-static/0002-libmount_include_sys_mount_h_only_if_necessary.patch b/libre/libutil-linux-static/0002-libmount_include_sys_mount_h_only_if_necessary.patch new file mode 100644 index 000000000..0c478f622 --- /dev/null +++ b/libre/libutil-linux-static/0002-libmount_include_sys_mount_h_only_if_necessary.patch @@ -0,0 +1,54 @@ +From 061d1a51097c3c025ff46173f10aa135f9a610d4 Mon Sep 17 00:00:00 2001 +From: Karel Zak <kzak@redhat.com> +Date: Thu, 22 Mar 2018 14:05:17 +0100 +Subject: libmount: include sys/mount.h only if necessary + +Addresses: https://github.com/systemd/systemd/issues/8507 +Signed-off-by: Karel Zak <kzak@redhat.com> +--- + libmount/src/libmount.h.in | 9 ++++++++- + sys-utils/fstrim.c | 4 +--- + 2 files changed, 9 insertions(+), 4 deletions(-) + +diff --git a/libmount/src/libmount.h.in b/libmount/src/libmount.h.in +index 8f323fcbf..11fd759fa 100644 +--- a/libmount/src/libmount.h.in ++++ b/libmount/src/libmount.h.in +@@ -28,7 +28,14 @@ extern "C" { + #include <stdio.h> + #include <mntent.h> + #include <sys/types.h> +-#include <sys/mount.h> ++ ++/* Make sure libc MS_* definitions are used by default. Note that MS_* flags ++ * may be already defined by linux/fs.h or another file -- in this case we ++ * don't want to include sys/mount.h at all to avoid collisions. ++ */ ++#ifndef MS_RDONLY ++# include <sys/mount.h> ++#endif + + #define LIBMOUNT_VERSION "@LIBMOUNT_VERSION@" + #define LIBMOUNT_MAJOR_VERSION @LIBMOUNT_MAJOR_VERSION@ +diff --git a/sys-utils/fstrim.c b/sys-utils/fstrim.c +index 53ac594c0..ce52063e1 100644 +--- a/sys-utils/fstrim.c ++++ b/sys-utils/fstrim.c +@@ -35,6 +35,7 @@ + + #include <sys/ioctl.h> + #include <sys/stat.h> ++#include <linux/fs.h> + + #include "nls.h" + #include "strutils.h" +@@ -46,9 +47,6 @@ + #include <libmount.h> + + +-/* We cannot include linux/fs.h due to MS_* constants collision with +- * sys/mount.h (and libmount.h) +- */ + #ifndef FITRIM + struct fstrim_range { + uint64_t start; diff --git a/libre/libutil-linux-static/PKGBUILD b/libre/libutil-linux-static/PKGBUILD index 1bf45f4fa..3f7d62e60 100644 --- a/libre/libutil-linux-static/PKGBUILD +++ b/libre/libutil-linux-static/PKGBUILD @@ -5,9 +5,9 @@ _pkgbase=util-linux pkgname=libutil-linux-static -_pkgmajor=2.31 -pkgver=${_pkgmajor}.1 -pkgrel=2.parabola1 +_pkgmajor=2.32 +pkgver=${_pkgmajor} +pkgrel=3.static1 pkgdesc="Miscellaneous system utilities for Linux" url="https://www.kernel.org/pub/linux/utils/util-linux/" arch=('i686' 'x86_64' 'armv7h') @@ -16,13 +16,17 @@ license=('GPL2') options=('strip' 'debug') validpgpkeys=('B0C64D14301CC6EFAEDF60E4E4B71D5EEC39C284') # Karel Zak source=("https://www.kernel.org/pub/linux/utils/util-linux/v$_pkgmajor/$_pkgbase-$pkgver.tar."{xz,sign} + '0001-fstrim-cleanup-uncludes.patch' + '0002-libmount_include_sys_mount_h_only_if_necessary.patch' pam-{login,common,su} 'util-linux.sysusers' '60-rfkill.rules' 'rfkill-unblock_.service' 'rfkill-block_.service') -sha256sums=('1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11' - 'SKIP' +sha256sums=('6c7397abc764e32e8159c2e96042874a190303e77adceb4ac5bd502a272a4734' + 'SKIP' + 'b1c0db069f60c086351f7a6fb7ff1add1c41e9ed7c1b65bd67e6604943fc4c75' + 'c65d8354fc2773035be8ac071541f4709763366d22a8a8f1bc2cb3401dcfdf69' '993a3096c2b113e6800f2abbd5d4233ebf1a97eef423990d3187d665d3490b92' 'fc6807842f92e9d3f792d6b64a0d5aad87995a279153ab228b1b2a64d9f32f20' '51eac9c2a2f51ad3982bba35de9aac5510f1eeff432d2d63c6362e45d620afc0' @@ -31,13 +35,20 @@ sha256sums=('1a51b16fa9cd51d26ef9ab52d2f1de12403b810fc8252bf7d478df91b3cddf11' '8ccec10a22523f6b9d55e0d6cbf91905a39881446710aa083e935e8073323376' 'a22e0a037e702170c7d88460cc9c9c2ab1d3e5c54a6985cd4a164ea7beff1b36') +prepare() { + cd "$_pkgbase-$pkgver" + + patch -Np1 -i ../0001-fstrim-cleanup-uncludes.patch + patch -Np1 -i ../0002-libmount_include_sys_mount_h_only_if_necessary.patch +} + build() { cd "$_pkgbase-$pkgver" ./configure --prefix=/usr \ --libdir=/usr/lib \ --bindir=/usr/bin \ - --localstatedir=/run \ + --localstatedir=/var \ --enable-fs-paths-extra=/usr/bin \ --enable-raw \ --enable-vipw \ diff --git a/libre/pcre-static/PKGBUILD b/libre/pcre-static/PKGBUILD index 34ca10f9a..736426c17 100644 --- a/libre/pcre-static/PKGBUILD +++ b/libre/pcre-static/PKGBUILD @@ -7,8 +7,8 @@ _pkgname=pcre pkgname=pcre-static -pkgver=8.41 -pkgrel=1.parabola1 +pkgver=8.42 +pkgrel=1.static1 pkgdesc='A library that implements Perl 5-style regular expressions' pkgdesc+=' (static libraries)' arch=('x86_64') @@ -19,7 +19,7 @@ depends=("$_pkgname=$pkgver") options=('staticlibs') validpgpkeys=('45F68D54BBE23FB3039B46E59766E084FB0F43D8') # Philip Hazel source=("https://ftp.pcre.org/pub/pcre/$_pkgname-$pkgver.tar.bz2"{,.sig}) -md5sums=('c160d22723b1670447341b08c58981c1' +md5sums=('085b6aa253e0f91cae70b3cdbe8c1ac2' 'SKIP') prepare() { diff --git a/libre/pixman-static/PKGBUILD b/libre/pixman-static/PKGBUILD index 3a9fa8268..ea4b091cd 100644 --- a/libre/pixman-static/PKGBUILD +++ b/libre/pixman-static/PKGBUILD @@ -7,7 +7,7 @@ _pkgname=pixman pkgname=pixman-static pkgver=0.34.0 -pkgrel=1.parabola1 +pkgrel=1.static2 pkgdesc="The pixel-manipulation library for X and cairo" pkgdes+=" (static libraries)" arch=(x86_64) diff --git a/libre/qemu-user-static/0001-linux-user-Use-if-to-only-call-validate_guest_space-.patch b/libre/qemu-user-static/0001-linux-user-Use-if-to-only-call-validate_guest_space-.patch deleted file mode 100644 index bbc3840fe..000000000 --- a/libre/qemu-user-static/0001-linux-user-Use-if-to-only-call-validate_guest_space-.patch +++ /dev/null @@ -1,81 +0,0 @@ -From 0c5afb7a15b6bb0e3fe276e377ad3702427e85d1 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 03:33:21 -0500 -Subject: [PATCH 01/10] linux-user: Use #if to only call validate_guest_space - for 32-bit ARM target - -Instead of defining a bogus validate_guest_space that always returns 1 on -targets other than 32-bit ARM, use #if blocks to only call it on 32-bit ARM -targets. This makes the "normal" flow control clearer. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 21 +++++++++------------ - 1 file changed, 9 insertions(+), 12 deletions(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 20f3d8c2c3..cac991159c 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -354,7 +354,6 @@ enum { - - /* The commpage only exists for 32 bit kernels */ - --#define TARGET_HAS_VALIDATE_GUEST_SPACE - /* Return 1 if the proposed guest space is suitable for the guest. - * Return 0 if the proposed guest space isn't suitable, but another - * address space should be tried. -@@ -1823,15 +1822,6 @@ static abi_ulong create_elf_tables(abi_ulong p, int argc, int envc, - return sp; - } - --#ifndef TARGET_HAS_VALIDATE_GUEST_SPACE --/* If the guest doesn't have a validation function just agree */ --static int validate_guest_space(unsigned long guest_base, -- unsigned long guest_size) --{ -- return 1; --} --#endif -- - unsigned long init_guest_space(unsigned long host_start, - unsigned long host_size, - unsigned long guest_start, -@@ -1845,11 +1835,12 @@ unsigned long init_guest_space(unsigned long host_start, - /* If just a starting address is given, then just verify that - * address. */ - if (host_start && !host_size) { -+#if defined(TARGET_ARM) && !defined(TARGET_AARCH64) - if (validate_guest_space(host_start, host_size) == 1) { -- return host_start; -- } else { - return (unsigned long)-1; - } -+#endif -+ return host_start; - } - - /* Setup the initial flags and start address. */ -@@ -1888,6 +1879,8 @@ unsigned long init_guest_space(unsigned long host_start, - - /* Check to see if the address is valid. */ - if (!host_start || real_start == current_start) { -+#if defined(TARGET_ARM) && !defined(TARGET_AARCH64) -+ /* On 32-bit ARM, we need to also be able to map the commpage. */ - int valid = validate_guest_space(real_start - guest_start, - real_size); - if (valid == 1) { -@@ -1896,6 +1889,10 @@ unsigned long init_guest_space(unsigned long host_start, - return (unsigned long)-1; - } - /* valid == 0, so try again. */ -+#else -+ /* On other architectures, whatever we have here is fine. */ -+ break; -+#endif - } - - /* That address didn't work. Unmap and try a different one. --- -2.15.1 - diff --git a/libre/qemu-user-static/0002-linux-user-Rename-validate_guest_space-init_guest_co.patch b/libre/qemu-user-static/0002-linux-user-Rename-validate_guest_space-init_guest_co.patch deleted file mode 100644 index 06e508219..000000000 --- a/libre/qemu-user-static/0002-linux-user-Rename-validate_guest_space-init_guest_co.patch +++ /dev/null @@ -1,54 +0,0 @@ -From b5b929b0423e5db333c9d5dfc104bb3598ff4182 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Thu, 28 Dec 2017 08:03:26 -0500 -Subject: [PATCH 02/10] linux-user: Rename validate_guest_space => - init_guest_commpage - -init_guest_commpage is a much more honest description of what the function -does. validate_guest_space not only suggests that the function has no -side-effects, but also introduces confusion as to why it is only needed on -32-bit ARM targets. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index cac991159c..453394239c 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -362,8 +362,8 @@ enum { - * The guest code may leave a page mapped and populate it if the - * address is suitable. - */ --static int validate_guest_space(unsigned long guest_base, -- unsigned long guest_size) -+static int init_guest_commpage(unsigned long guest_base, -+ unsigned long guest_size) - { - unsigned long real_start, test_page_addr; - -@@ -1836,7 +1836,7 @@ unsigned long init_guest_space(unsigned long host_start, - * address. */ - if (host_start && !host_size) { - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) -- if (validate_guest_space(host_start, host_size) == 1) { -+ if (init_guest_commpage(host_start, host_size) != 1) { - return (unsigned long)-1; - } - #endif -@@ -1881,8 +1881,8 @@ unsigned long init_guest_space(unsigned long host_start, - if (!host_start || real_start == current_start) { - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) - /* On 32-bit ARM, we need to also be able to map the commpage. */ -- int valid = validate_guest_space(real_start - guest_start, -- real_size); -+ int valid = init_guest_commpage(real_start - guest_start, -+ real_size); - if (valid == 1) { - break; - } else if (valid == -1) { --- -2.15.1 - diff --git a/libre/qemu-user-static/0003-linux-user-init_guest_space-Clean-up-if-we-can-t-ini.patch b/libre/qemu-user-static/0003-linux-user-init_guest_space-Clean-up-if-we-can-t-ini.patch deleted file mode 100644 index ea9eff138..000000000 --- a/libre/qemu-user-static/0003-linux-user-init_guest_space-Clean-up-if-we-can-t-ini.patch +++ /dev/null @@ -1,29 +0,0 @@ -From c03d2cc51c5fa496f894b641c035b12e49fd637b Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 14:40:39 -0500 -Subject: [PATCH 03/10] linux-user: init_guest_space: Clean up if we can't - initialize the commpage - -We'll just exit with an error anyway, so it doesn't really matter, but it -is cleaned up in all of the other places were we error out. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 1 + - 1 file changed, 1 insertion(+) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 453394239c..1a6b660b25 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1886,6 +1886,7 @@ unsigned long init_guest_space(unsigned long host_start, - if (valid == 1) { - break; - } else if (valid == -1) { -+ munmap((void *)real_start, host_size); - return (unsigned long)-1; - } - /* valid == 0, so try again. */ --- -2.15.1 - diff --git a/libre/qemu-user-static/0004-linux-user-init_guest_space-Correctly-handle-guest_s.patch b/libre/qemu-user-static/0004-linux-user-init_guest_space-Correctly-handle-guest_s.patch deleted file mode 100644 index 7f9cfc7a8..000000000 --- a/libre/qemu-user-static/0004-linux-user-init_guest_space-Correctly-handle-guest_s.patch +++ /dev/null @@ -1,47 +0,0 @@ -From bc26025ccc64a2a63fc58776c93e2e4392445abe Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 19:44:00 -0500 -Subject: [PATCH 04/10] linux-user: init_guest_space: Correctly handle - guest_start in commpage initialization - -init_guest_commpage needs to check if the mapped space, which ends at -real_start+real_size overlaps with where it needs to put the commpage, -which is (assuming sane qemu_host_page_size) guest_base + 0xffff000, where -guest_base is real_start - guest_start. - - [guest_base][ 0xffff0000 ][commpage] - [guest_base][guest_start][real_size] [commpage] - [ real_start ][real_size] [commpage] - ^ - fail if this gap < 0 - -Since init_guest_commpage wants to do everything relative to guest_base -(rather than real_start), it obviously needs to be comparing 0xffff0000 -against guest_start+real_size, not just real_size. - -This bug has been present since 806d102141b99d4f1e55a97d68b7ea8c8ba3129f in -2012, but guest_start is usually 0, and prior to v2.11 real_size was -usually much smaller than 0xffff0000, so it was uncommon for it to have -made a difference. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 2 +- - 1 file changed, 1 insertion(+), 1 deletion(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 1a6b660b25..f41cecc3cb 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1882,7 +1882,7 @@ unsigned long init_guest_space(unsigned long host_start, - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) - /* On 32-bit ARM, we need to also be able to map the commpage. */ - int valid = init_guest_commpage(real_start - guest_start, -- real_size); -+ real_size + guest_start); - if (valid == 1) { - break; - } else if (valid == -1) { --- -2.15.1 - diff --git a/libre/qemu-user-static/0005-linux-user-init_guest_space-Clarify-page-alignment-l.patch b/libre/qemu-user-static/0005-linux-user-init_guest_space-Clarify-page-alignment-l.patch deleted file mode 100644 index 1570774ee..000000000 --- a/libre/qemu-user-static/0005-linux-user-init_guest_space-Clarify-page-alignment-l.patch +++ /dev/null @@ -1,120 +0,0 @@ -From b2432d1b415143a55083782712f11241f194c0ba Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 20:05:52 -0500 -Subject: [PATCH 05/10] linux-user: init_guest_space: Clarify page alignment - logic - -There are 3 parts to this change: - - Add a comment showing the relative sizes and positions of the blocks of - memory - - introduce and use new aligned_{start,size} instead of adjusting - real_{start_size} - - When we clean up (on failure), munmap(real_start, real_size) instead of - munmap(aligned_start, aligned_size). It *shouldn't* make any - difference, but I will admit that this does mean we are making the - syscall with different values, so this isn't quite a no-op patch. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 43 +++++++++++++++++++++++++++++++++---------- - 1 file changed, 33 insertions(+), 10 deletions(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index f41cecc3cb..22f2632dfa 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1827,7 +1827,7 @@ unsigned long init_guest_space(unsigned long host_start, - unsigned long guest_start, - bool fixed) - { -- unsigned long current_start, real_start; -+ unsigned long current_start, aligned_start; - int flags; - - assert(host_start || host_size); -@@ -1853,7 +1853,8 @@ unsigned long init_guest_space(unsigned long host_start, - /* Otherwise, a non-zero size region of memory needs to be mapped - * and validated. */ - while (1) { -- unsigned long real_size = host_size; -+ unsigned long real_start, real_size, aligned_size; -+ aligned_size = real_size = host_size; - - /* Do not use mmap_find_vma here because that is limited to the - * guest address space. We are going to make the -@@ -1867,26 +1868,48 @@ unsigned long init_guest_space(unsigned long host_start, - - /* Ensure the address is properly aligned. */ - if (real_start & ~qemu_host_page_mask) { -+ /* Ideally, we adjust like -+ * -+ * pages: [ ][ ][ ][ ][ ] -+ * old: [ real ] -+ * [ aligned ] -+ * new: [ real ] -+ * [ aligned ] -+ * -+ * But if there is something else mapped right after it, -+ * then obviously it won't have room to grow, and the -+ * kernel will put the new larger real someplace else with -+ * unknown alignment (if we made it to here, then -+ * fixed=false). Which is why we grow real by a full page -+ * size, instead of by part of one; so that even if we get -+ * moved, we can still guarantee alignment. But this does -+ * mean that there is a padding of < 1 page both before -+ * and after the aligned range; the "after" could could -+ * cause problems for ARM emulation where it could butt in -+ * to where we need to put the commpage. -+ */ - munmap((void *)real_start, host_size); -- real_size = host_size + qemu_host_page_size; -+ real_size = aligned_size + qemu_host_page_size; - real_start = (unsigned long) - mmap((void *)real_start, real_size, PROT_NONE, flags, -1, 0); - if (real_start == (unsigned long)-1) { - return (unsigned long)-1; - } -- real_start = HOST_PAGE_ALIGN(real_start); -+ aligned_start = HOST_PAGE_ALIGN(real_start); -+ } else { -+ aligned_start = real_start; - } - - /* Check to see if the address is valid. */ -- if (!host_start || real_start == current_start) { -+ if (!host_start || aligned_start == current_start) { - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) - /* On 32-bit ARM, we need to also be able to map the commpage. */ -- int valid = init_guest_commpage(real_start - guest_start, -- real_size + guest_start); -+ int valid = init_guest_commpage(aligned_start - guest_start, -+ aligned_size + guest_start); - if (valid == 1) { - break; - } else if (valid == -1) { -- munmap((void *)real_start, host_size); -+ munmap((void *)real_start, real_size); - return (unsigned long)-1; - } - /* valid == 0, so try again. */ -@@ -1905,7 +1928,7 @@ unsigned long init_guest_space(unsigned long host_start, - * address space randomization put a shared library somewhere - * inconvenient. - */ -- munmap((void *)real_start, host_size); -+ munmap((void *)real_start, real_size); - current_start += qemu_host_page_size; - if (host_start == current_start) { - /* Theoretically possible if host doesn't have any suitably -@@ -1917,7 +1940,7 @@ unsigned long init_guest_space(unsigned long host_start, - - qemu_log_mask(CPU_LOG_PAGE, "Reserved 0x%lx bytes of guest address space\n", host_size); - -- return real_start; -+ return aligned_start; - } - - static void probe_guest_base(const char *image_name, --- -2.15.1 - diff --git a/libre/qemu-user-static/0006-linux-user-init_guest_commpage-Add-a-comment-about-s.patch b/libre/qemu-user-static/0006-linux-user-init_guest_commpage-Add-a-comment-about-s.patch deleted file mode 100644 index 4436b7817..000000000 --- a/libre/qemu-user-static/0006-linux-user-init_guest_commpage-Add-a-comment-about-s.patch +++ /dev/null @@ -1,30 +0,0 @@ -From ca873a81cc020df0ee0ec072a60678bb83dce9e2 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 21:05:29 -0500 -Subject: [PATCH 06/10] linux-user: init_guest_commpage: Add a comment about - size check - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 5 +++++ - 1 file changed, 5 insertions(+) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 22f2632dfa..b560f5d6fe 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -374,6 +374,11 @@ static int init_guest_commpage(unsigned long guest_base, - - /* If the commpage lies within the already allocated guest space, - * then there is no way we can allocate it. -+ * -+ * You may be thinking that that this check is redundant because -+ * we already validated the guest size against MAX_RESERVED_VA; -+ * but if qemu_host_page_mask is unusually large, then -+ * test_page_addr may be lower. - */ - if (test_page_addr >= guest_base - && test_page_addr < (guest_base + guest_size)) { --- -2.15.1 - diff --git a/libre/qemu-user-static/0007-linux-user-init_guest_space-Clean-up-control-flow-a-.patch b/libre/qemu-user-static/0007-linux-user-init_guest_space-Clean-up-control-flow-a-.patch deleted file mode 100644 index 59be04cf9..000000000 --- a/libre/qemu-user-static/0007-linux-user-init_guest_space-Clean-up-control-flow-a-.patch +++ /dev/null @@ -1,94 +0,0 @@ -From dbbba45fa37da85ac213fbbe1f7eab3e1de74b41 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Wed, 27 Dec 2017 21:17:52 -0500 -Subject: [PATCH 07/10] linux-user: init_guest_space: Clean up control flow a - bit - -Instead of doing - - if (check1) { - if (check2) { - success; - } - } - - retry; - -Do a clearer - - if (!check1) { - goto try_again; - } - - if (!check2) { - goto try_again; - } - - success; - - try_again: - retry; - -Besides being clearer, this makes it easier to insert more checks that -need to trigger a retry on check failure, or rearrange them, or anything -like that. - -Because some indentation is changing, "ignore space change" may be useful -for viewing this patch. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 34 +++++++++++++++++++--------------- - 1 file changed, 19 insertions(+), 15 deletions(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index b560f5d6fe..5c0ad65611 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1906,24 +1906,28 @@ unsigned long init_guest_space(unsigned long host_start, - } - - /* Check to see if the address is valid. */ -- if (!host_start || aligned_start == current_start) { -+ if (host_start && aligned_start != current_start) { -+ goto try_again; -+ } -+ - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) -- /* On 32-bit ARM, we need to also be able to map the commpage. */ -- int valid = init_guest_commpage(aligned_start - guest_start, -- aligned_size + guest_start); -- if (valid == 1) { -- break; -- } else if (valid == -1) { -- munmap((void *)real_start, real_size); -- return (unsigned long)-1; -- } -- /* valid == 0, so try again. */ --#else -- /* On other architectures, whatever we have here is fine. */ -- break; --#endif -+ /* On 32-bit ARM, we need to also be able to map the commpage. */ -+ int valid = init_guest_commpage(aligned_start - guest_start, -+ aligned_size + guest_start); -+ if (valid == -1) { -+ munmap((void *)real_start, real_size); -+ return (unsigned long)-1; -+ } else if (valid == -1) { -+ goto try_again; - } -+#endif -+ -+ /* If nothing has said `return -1` or `goto try_again` yet, -+ * then the address we have is good. -+ */ -+ break; - -+ try_again: - /* That address didn't work. Unmap and try a different one. - * The address the host picked because is typically right at - * the top of the host address space and leaves the guest with --- -2.15.1 - diff --git a/libre/qemu-user-static/0008-linux-user-init_guest_space-Don-t-try-to-align-if-we.patch b/libre/qemu-user-static/0008-linux-user-init_guest_space-Don-t-try-to-align-if-we.patch deleted file mode 100644 index 9f434e116..000000000 --- a/libre/qemu-user-static/0008-linux-user-init_guest_space-Don-t-try-to-align-if-we.patch +++ /dev/null @@ -1,50 +0,0 @@ -From 8f38106de8d023be8b3b28955df3615637c65dd9 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Thu, 28 Dec 2017 06:42:12 -0500 -Subject: [PATCH 08/10] linux-user: init_guest_space: Don't try to align if - we'll reject it - -If the ensure-alignment code gets triggered, then the -"if (host_start && real_start != current_start)" check will always trigger, -so save 2 syscalls and put that check first. - -Note that we can't just switch to using MAP_FIXED for that check, because -then we couldn't differentiate between a failure because "there isn't -enough space" and "there isn't enough space *here*". - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 10 +++++----- - 1 file changed, 5 insertions(+), 5 deletions(-) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 5c0ad65611..1b7583d659 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1871,6 +1871,11 @@ unsigned long init_guest_space(unsigned long host_start, - return (unsigned long)-1; - } - -+ /* Check to see if the address is valid. */ -+ if (host_start && real_start != current_start) { -+ goto try_again; -+ } -+ - /* Ensure the address is properly aligned. */ - if (real_start & ~qemu_host_page_mask) { - /* Ideally, we adjust like -@@ -1905,11 +1910,6 @@ unsigned long init_guest_space(unsigned long host_start, - aligned_start = real_start; - } - -- /* Check to see if the address is valid. */ -- if (host_start && aligned_start != current_start) { -- goto try_again; -- } -- - #if defined(TARGET_ARM) && !defined(TARGET_AARCH64) - /* On 32-bit ARM, we need to also be able to map the commpage. */ - int valid = init_guest_commpage(aligned_start - guest_start, --- -2.15.1 - diff --git a/libre/qemu-user-static/0009-linux-user-init_guest_space-Add-a-comment-about-sear.patch b/libre/qemu-user-static/0009-linux-user-init_guest_space-Add-a-comment-about-sear.patch deleted file mode 100644 index e91fdefd8..000000000 --- a/libre/qemu-user-static/0009-linux-user-init_guest_space-Add-a-comment-about-sear.patch +++ /dev/null @@ -1,29 +0,0 @@ -From 81033c66738a2e3b713c414e8e07e6ef8e59d8d7 Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Thu, 28 Dec 2017 07:22:29 -0500 -Subject: [PATCH 09/10] linux-user: init_guest_space: Add a comment about - search strategy - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 4 ++++ - 1 file changed, 4 insertions(+) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 1b7583d659..7736ea2c3a 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1936,6 +1936,10 @@ unsigned long init_guest_space(unsigned long host_start, - * happen often. Probably means we got unlucky and host - * address space randomization put a shared library somewhere - * inconvenient. -+ * -+ * This is probably a good strategy if host_start, but is -+ * probably a bad strategy if not, which means we got here -+ * because of trouble with ARM commpage setup. - */ - munmap((void *)real_start, real_size); - current_start += qemu_host_page_size; --- -2.15.1 - diff --git a/libre/qemu-user-static/0010-linux-user-init_guest_space-Try-to-make-ARM-space-co.patch b/libre/qemu-user-static/0010-linux-user-init_guest_space-Try-to-make-ARM-space-co.patch deleted file mode 100644 index 587293564..000000000 --- a/libre/qemu-user-static/0010-linux-user-init_guest_space-Try-to-make-ARM-space-co.patch +++ /dev/null @@ -1,99 +0,0 @@ -From f8ccd5e7353937e0a48ccd8bfbc07202dc85afac Mon Sep 17 00:00:00 2001 -From: Luke Shumaker <lukeshu@parabola.nu> -Date: Thu, 28 Dec 2017 07:27:20 -0500 -Cc: paul@codesourcery.com -Subject: [PATCH 10/10] linux-user: init_guest_space: Try to make ARM - space+commpage continuous - -At a fixed distance after the usable memory that init_guest_space maps, for -32-bit ARM targets we also need to map a commpage. The normal -init_guest_space logic doesn't keep this in mind when searching for an -address range. - -If !host_start, then try to find a big continuous segment where we can put -both the usable memory and the commpage; we then munmap that segment and -set current_start to that address; and let the normal code mmap the usable -memory and the commpage separately. That is: if we don't have hint of -where to start looking for memory, come up with one that is better than -NULL. Depending on host_size and guest_start, there may or may not be a -gap between the usable memory and the commpage, so this is slightly more -restrictive than it needs to be; but it's only a hint, so that's OK. - -We only do that for !host start, because if host_start, then either: - - we got an address passed in with -B, in which case we don't want to - interfere with what the user said; - - or host_start is based off of the ELF image's loaddr. The check "if - (host_start && real_start != current_start)" suggests that we really - want lowest available address that is >= loaddr. I don't know why that - is, but I'm trusting that Paul Brook knew what he was doing when he - wrote the original version of that check in - c581deda322080e8beb88b2e468d4af54454e4b3 way back in 2010. - -Signed-off-by: Luke Shumaker <lukeshu@parabola.nu> ---- - linux-user/elfload.c | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 49 insertions(+) - -diff --git a/linux-user/elfload.c b/linux-user/elfload.c -index 7736ea2c3a..cd3a7d877d 100644 ---- a/linux-user/elfload.c -+++ b/linux-user/elfload.c -@@ -1857,6 +1857,55 @@ unsigned long init_guest_space(unsigned long host_start, - - /* Otherwise, a non-zero size region of memory needs to be mapped - * and validated. */ -+ -+#if defined(TARGET_ARM) && !defined(TARGET_AARCH64) -+ /* On 32-bit ARM, we need to map not just the usable memory, but -+ * also the commpage. Try to find a suitable place by allocating -+ * a big chunk for all of it. If host_start, then the naive -+ * strategy probably does good enough. -+ */ -+ if (!host_start) { -+ unsigned long guest_full_size, host_full_size, real_start; -+ -+ guest_full_size = -+ (0xffff0f00 & qemu_host_page_mask) + qemu_host_page_size; -+ host_full_size = guest_full_size - guest_start; -+ real_start = (unsigned long) -+ mmap(NULL, host_full_size, PROT_NONE, flags, -1, 0); -+ if (real_start == (unsigned long)-1) { -+ if (host_size < host_full_size - qemu_host_page_size) { -+ /* We failed to map a continous segment, but we're -+ * allowed to have a gap between the usable memory and -+ * the commpage where other things can be mapped. -+ * This sparseness gives us more flexibility to find -+ * an address range. -+ */ -+ goto naive; -+ } -+ return (unsigned long)-1; -+ } -+ munmap((void *)real_start, host_full_size); -+ if (real_start & ~qemu_host_page_mask) { -+ /* The same thing again, but with an extra qemu_host_page_size -+ * so that we can shift around alignment. -+ */ -+ unsigned long real_size = host_full_size + qemu_host_page_size; -+ real_start = (unsigned long) -+ mmap(NULL, real_size, PROT_NONE, flags, -1, 0); -+ if (real_start == (unsigned long)-1) { -+ if (host_size < host_full_size - qemu_host_page_size) { -+ goto naive; -+ } -+ return (unsigned long)-1; -+ } -+ munmap((void *)real_start, real_size); -+ real_start = HOST_PAGE_ALIGN(real_start); -+ } -+ current_start = real_start; -+ } -+ naive: -+#endif -+ - while (1) { - unsigned long real_start, real_size, aligned_size; - aligned_size = real_size = host_size; --- -2.15.1 - diff --git a/libre/qemu-user-static/PKGBUILD b/libre/qemu-user-static/PKGBUILD index a3030470b..5080f5f7b 100644 --- a/libre/qemu-user-static/PKGBUILD +++ b/libre/qemu-user-static/PKGBUILD @@ -3,41 +3,34 @@ # Maintainer: Luke Shumaker <lukeshu@parabola.nu> # Contributor: Márcio Silva <coadde@hyperbola.info> +# "Do I need to rebuild?" : A flowchart +# +# ,--> pixman-static ------------------------------------, +# | 0.34.0-1.static2 | +# qemu-user-static --+------------------------+----> pcre-static -----------+--> glibc +# 2.12.0-1.static1 | | 8.42-1.static1 | 2.27-3 +# `--> glib2-static -------+----> libffi-static ---------+ +# 2.56.1-1.static1 | 3.2.1-2.static2 | +# +----> libutil-linux-static --+ +# | 2.32-3.static1 | +# `----> zlib ------------------' +# 1:1.2.11-2 + _pkgbase=qemu pkgname=(qemu-user-static qemu-user-static-binfmt) pkgdesc="A generic and open source machine emulator and virtualizer" -pkgver=2.11.0 -pkgrel=3.parabola1 +pkgver=2.12.0 +pkgrel=1.static1 arch=(x86_64) arch+=(i686 armv7h) license=(GPL2 LGPL2.1) url="http://wiki.qemu.org/" makedepends=(pixman-static glib2-static pcre-static python2) -source=("$url/download/${_pkgbase}-${pkgver}.tar.bz2"{,.sig} - 0001-linux-user-Use-if-to-only-call-validate_guest_space-.patch - 0002-linux-user-Rename-validate_guest_space-init_guest_co.patch - 0003-linux-user-init_guest_space-Clean-up-if-we-can-t-ini.patch - 0004-linux-user-init_guest_space-Correctly-handle-guest_s.patch - 0005-linux-user-init_guest_space-Clarify-page-alignment-l.patch - 0006-linux-user-init_guest_commpage-Add-a-comment-about-s.patch - 0007-linux-user-init_guest_space-Clean-up-control-flow-a-.patch - 0008-linux-user-init_guest_space-Don-t-try-to-align-if-we.patch - 0009-linux-user-init_guest_space-Add-a-comment-about-sear.patch - 0010-linux-user-init_guest_space-Try-to-make-ARM-space-co.patch +source=(https://download.qemu.org/qemu-$pkgver.tar.xz{,.sig} allow_elf64.patch) -sha256sums=('c4f034c7665a84a1c3be72c8da37f3c31ec063475699df062ab646d8b2e17fcb' +sha256sums=('e69301f361ff65bf5dabd8a19196aeaa5613c1b5ae1678f0823bdf50e7d5c6fc' 'SKIP' - '9953a8debd9456adb4f5968817fa89da4d4542e44980a5533ccf86371d819845' - 'a977e9295daa14a9c73258cf16399eb5af66382217f8a4e69951ec044131a7ce' - 'dba2cfeb24841d45936091319957ee6f65e481da3c761791d410d3b8e6799998' - '75b3bda6752c4bf17488489f898767b6772b10ecc5d1f0a5bc1bd831e99a31e3' - '731895a8ed6f6d322bb60764b01cf09e0ea762d7d53fc01e91c2d2aecfdc8844' - '69b37040f52ef86b86c7c2952eb3f85f3c67d7adf289c43fdac8c71827c6e5b9' - '76f88850b0f52450eecb80029ffe16db6f418cec3b58231aca354cc20bbfb16a' - '76944d84990cc76e47c381849c683a346c5234bcebbe4c24334d0fd8368482db' - '7845867348fd380def28c7fe023e54cee8ff88cd6754aae3ab3472149cfbde51' - '1953e7cac58c23526d007d8559410e0042d4a7c1b8cbd5f4c0543f7f876436dd' - '13a6d9e678bdc9e1f051006cfd0555f5a80582368f54c8a1bb5a78ece3832ac4') + '59751f1ed26ea61b2a37ebee4be6979e584a450b611282138a0893aa9173e2e4') validpgpkeys=('CEACC9E15534EBABB82D3FA03353C9CEF108B584') case $CARCH in @@ -52,13 +45,6 @@ prepare() { cd ${_pkgbase}-${pkgver} sed -i 's/vte-2\.90/vte-2.91/g' configure - # https://bugs.launchpad.net/qemu/+bug/1740219 - # https://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg05237.html - local patchfile - for patchfile in ../????-linux-user-*.patch; do - patch -p1 < "$patchfile" - done - patch -p1 < ../allow_elf64.patch } @@ -124,7 +110,7 @@ package_qemu-user-static() { replaces=(qemu-static) conflicts=(qemu-static) - _package static + make -C build-static DESTDIR="$pkgdir" install "${@:2}" rm -vr -- \ "$pkgdir"/usr/lib/ \ @@ -136,15 +122,6 @@ package_qemu-user-static() { done } -_package() { - options=(!strip) - - make -C build-$1 DESTDIR="$pkgdir" install "${@:2}" - - cd "$pkgdir"/usr/bin - tidy_strip -} - package_qemu-user-static-binfmt() { pkgdesc="binfmt registration for QEMU user-mode emulation" depends=("qemu-user-static=$pkgver") @@ -157,11 +134,9 @@ package_qemu-user-static-binfmt() { install -d "$pkgdir"/usr/lib/binfmt.d - < scripts/qemu-binfmt-conf.sh \ - sed -e 's/^CHECK=.*/CHECK=qemu_check_systemd/' \ - -e 's/^BINFMT_SET=.*/BINFMT_SET=qemu_generate_systemd/' \ - | sh /dev/stdin \ + ./scripts/qemu-binfmt-conf.sh \ --qemu-path /usr/bin \ + --systemd ALL \ --exportdir "$pkgdir"/usr/lib/binfmt.d \ --credential yes diff --git a/libre/qemu-user-static/allow_elf64.patch b/libre/qemu-user-static/allow_elf64.patch index 07f27a038..0c5f6917c 100644 --- a/libre/qemu-user-static/allow_elf64.patch +++ b/libre/qemu-user-static/allow_elf64.patch @@ -1,24 +1,22 @@ -commit 3c72765ec760a51f0e879dc792be82c93141e318 +commit cb61bc8a42da1a971079767e63df4503b6ab2efb Author: Anatol Pomozov <anatol.pomozov@gmail.com> -Date: Tue Jun 6 20:07:03 2017 -0700 +Date: Mon Jan 29 10:08:53 2018 -0800 - Remove restriction that prevents bootimg elf64 images + multiboot: Make elf64 loading functionality compatible with GRUB - It is possible to create a 64 bit elf image that has valid multiboot header. - qemu should be able to boot such images. - - Signed-off-by: Anatol Pomozov <anatol.pomozov@gmail.com> + GRUB is a reference multiboot implementation and supports loading elf64 + binaries. Make QEMU to work similar was as GRUB. diff --git a/hw/i386/multiboot.c b/hw/i386/multiboot.c -index 663f35a658..cf1b4f5fb3 100644 +index 5bc0a2cddb..0907e42a39 100644 --- a/hw/i386/multiboot.c +++ b/hw/i386/multiboot.c -@@ -192,11 +192,6 @@ int load_multiboot(FWCfgState *fw_cfg, +@@ -193,11 +193,6 @@ int load_multiboot(FWCfgState *fw_cfg, int kernel_size; fclose(f); - if (((struct elf64_hdr*)header)->e_machine == EM_X86_64) { -- fprintf(stderr, "Cannot load x86-64 image, give a 32bit one.\n"); +- error_report("Cannot load x86-64 image, give a 32bit one."); - exit(1); - } - |