configs/meson: disable hexagon idef-parser for emscripten builds
PATCH 1/1 configs/meson: disable hexagon idef-parser for emscripten builds
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets PKG_CONFIG_LIBDIR to emscripten's sysroot which prevents native pkg-config from finding system-installed packages. Disable idef-parser by default for emscripten since the wasm target does not need it.
--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)
configs/meson/emscripten.txt +3 -0
@@ -6,3 +6,6 @@ objc_args = ['-pthread'] # configuration so explicitly add the flag here. c_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] cpp_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] + +[project options] +hexagon_idef_parser = false
Signature · 1 line
2.34.1
Quoted 16 lines · Brian Cain
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets
PKG_CONFIG_LIBDIRto emscripten's sysroot which prevents native pkg-config from finding system-installed packages. Disable idef-parser by default for emscripten since the wasm target does not need it.Signed-off-by Brian Cain <[email protected]>--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)configs/meson/emscripten.txt +0
-0
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 11
Quoted 6 lines
configs/meson/emscripten.txt +3
-0@@ -6,3 +6,6 @@ objc_args = ['-pthread'] # configuration so explicitly add the flag here. c_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] cpp_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] + +[project options] +hexagon_idef_parser = false
I also considered a change to configure to workaround the PKG_CONFIG_LIBDIR override (below) but I didn't like the idea of such a broad change.
So this one has narrow impact to just turn off the idef parser for hexagon for now and we can revisit if later if desired.
+ if test -n "$PKG_CONFIG_LIBDIR"; then
+ native_pc_path=$(env -u PKG_CONFIG_PATH -u PKG_CONFIG_LIBDIR \
+ pkg-config --variable pc_path pkg-config 2>/dev/null) + if test -n "$native_pc_path"; then
+ native_pc_meson=$(echo "$native_pc_path" | \
+ sed "s|^|['|; s|:|', '|g; s|$|']|")
+ echo "" >> $native
+ echo "[built-in options]" >> $native
+ echo "pkg_config_path = $native_pc_meson" >> $native + fi
+ fi
Kohei Tokunaga
Reviewed-byHi Brian,
Quoted 16 lines
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets
PKG_CONFIG_LIBDIRto emscripten's sysroot which prevents native pkg-config from finding system-installed packages. Disable idef-parser by default for emscripten since the wasm target does not need it.Signed-off-by Brian Cain <[email protected]>--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)configs/meson/emscripten.txt +0
-0
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 7
Quoted 2 lines
configs/meson/emscripten.txt +0
-0@@ -6,3 +6,6 @@ objc_args = ['-pthread'] # configuration so explicitly add the flag here. c_link_args =
['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS']
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 8
Quoted 1 line
configs/meson/emscripten.txt +0
-0cpp_link_args =
['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS']
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 11
Quoted 3 lines
configs/meson/emscripten.txt +3
-0+ +[project options] +hexagon_idef_parser = false
Thanks for catching this.
Quoted 5 lines · Brian Cain
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets
PKG_CONFIG_LIBDIRto emscripten's sysroot which prevents native pkg-config from finding system-installed packages.
This sounds like a bug in their cross build setup.
Disable idef-parser
Quoted 12 lines
by default for emscripten since the wasm target does not need it.
Signed-off-by Brian Cain <[email protected]>--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)configs/meson/emscripten.txt +0
-0
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 11
Quoted 6 lines
configs/meson/emscripten.txt +3
-0@@ -6,3 +6,6 @@ objc_args = ['-pthread'] # configuration so explicitly add the flag here. c_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] cpp_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] + +[project options] +hexagon_idef_parser = false
We should have a comment here that briefly explains that we're doing this to work around a bug in the cross build setup we use.
-- PMM
Quoted 18 lines · Peter Maydell
Quoted 5 lines · Brian Cain
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets
PKG_CONFIG_LIBDIRto emscripten's sysroot which prevents native pkg-config from finding system-installed packages.This sounds like a bug in their cross build setup.
Disable idef-parser
Quoted 7 lines
by default for emscripten since the wasm target does not need it.
Signed-off-by Brian Cain <[email protected]>--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)
Quoted 14 lines
configs/meson/emscripten.txt objc_args = ['-pthread'] · line 11
Quoted 11 lines
configs/meson/emscripten.txt +3
-0@@ -6,3 +6,6 @@ objc_args = ['-pthread'] # configuration so explicitly add the flag here. c_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] cpp_link_args = ['-pthread','-sASYNCIFY=1','-sPROXY_TO_PTHREAD=1','-sFORCE_FILESYSTEM','-sALLOW_TABLE_GROWTH','-sTOTAL_MEMORY=2GB','-sWASM_BIGINT','-sEXPORT_ES6=1','-sASYNCIFY_IMPORTS=ffi_call_js','-sEXPORTED_RUNTIME_METHODS=addFunction,removeFunction,TTY,FS'] + +[project options] +hexagon_idef_parser = falseWe should have a comment here that briefly explains that we're doing this to work around a bug in the cross build setup we use.
Added a comment -
https://lore.kernel.org/qemu-devel/[email protected]/
Quoted 2 lines
-- PMM
Quoted 11 lines · Brian Cain
The idef-parser is a native build tool that requires glib-2.0 on the build machine. In emscripten cross builds, emconfigure sets
PKG_CONFIG_LIBDIRto emscripten's sysroot which prevents native pkg-config from finding system-installed packages. Disable idef-parser by default for emscripten since the wasm target does not need it.Signed-off-by Brian Cain <[email protected]>--- configs/meson/emscripten.txt | 3 +++ 1 file changed, 3 insertions(+)
Already included in PR v5, but just in case:
Regards,
Pierrick