diff --git a/meson.build b/meson.build index 5609219e523..4d2d4eb9341 100644 --- a/meson.build +++ b/meson.build @@ -616,13 +616,16 @@ endif softfloat_dep = dependency('softfloat', required: get_option('use_sys_softfloat'), static: is_static_build) if not softfloat_dep.found() - softfloat_proj = subproject('softfloat', default_options: ['default_library=static', 'warning_level=0']) + softfloat_proj = subproject('softfloat', default_options: ['default_library=static']) softfloat_dep = softfloat_proj.get_variable('softfloat_dep') endif if meson.is_cross_build() - softfloat_proj = subproject('softfloat', default_options: ['default_library=static', 'warning_level=0']) - softfloat_native_dep = softfloat_proj.get_variable('softfloat_dep') + softfloat_native_dep = dependency('softfloat_cross_native', required: get_option('use_sys_softfloat'), static: is_static_build, native: true) + if not softfloat_native_dep.found() + softfloat_cross_native_proj = subproject('softfloat_cross_native', default_options: ['default_library=static']) + softfloat_native_dep = softfloat_cross_native_proj.get_variable('softfloat_native_dep') + endif endif # handle zip dependency diff --git a/subprojects/softfloat.wrap b/subprojects/softfloat.wrap index a41cb5507ba..25f0cc5cf2a 100644 --- a/subprojects/softfloat.wrap +++ b/subprojects/softfloat.wrap @@ -3,3 +3,6 @@ url = https://github.com/rizinorg/softfloat revision = e06f4fcbdc6b3545c0624ac70725daf95eda53e8 directory = softfloat depth = 1 + +[provide] +softfloat=softfloat_dep diff --git a/subprojects/softfloatt_cross_native.wrap b/subprojects/softfloatt_cross_native.wrap new file mode 100644 index 00000000000..1d91fb268cd --- /dev/null +++ b/subprojects/softfloatt_cross_native.wrap @@ -0,0 +1,9 @@ +[wrap-git] +url = https://github.com/rizinorg/softfloat +revision = 05dc625eecbccae9113403248cb33730600ed722 +directory = softfloat_cross_native +depth = 1 + +[provide] +dependency_names = softfloat_cross_native +softfloat_cross_native = softfloat_cross_native_dep