From b17c7b15083f7580c265b3e1fc47c38bf60335a2 Mon Sep 17 00:00:00 2001 From: Niklas Hauser Date: Thu, 16 Nov 2023 13:28:36 +0100 Subject: [PATCH] Fix clang compilation of libdwarf on macOS 13 --- subprojects/libdwarf.wrap | 2 +- .../libdwarf/0002-fix-compilation-clang.patch | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 subprojects/packagefiles/libdwarf/0002-fix-compilation-clang.patch diff --git a/subprojects/libdwarf.wrap b/subprojects/libdwarf.wrap index 23d63c90..1f64d7e4 100644 --- a/subprojects/libdwarf.wrap +++ b/subprojects/libdwarf.wrap @@ -5,4 +5,4 @@ source_url = https://www.prevanders.net/libdwarf-0.7.0.tar.xz source_filename = libdwarf-0.7.0.tar.xz source_hash = 23b71829de875fa5842e49f232c8ee1a5043805749738bc61424d9abc1189f38 -diff_files = ./libdwarf/0001-fix-Use-project_source_root-for-subproject-compatibi.patch +diff_files = ./libdwarf/0001-fix-Use-project_source_root-for-subproject-compatibi.patch, ./libdwarf/0002-fix-compilation-clang.patch diff --git a/subprojects/packagefiles/libdwarf/0002-fix-compilation-clang.patch b/subprojects/packagefiles/libdwarf/0002-fix-compilation-clang.patch new file mode 100644 index 00000000..616d5fd0 --- /dev/null +++ b/subprojects/packagefiles/libdwarf/0002-fix-compilation-clang.patch @@ -0,0 +1,15 @@ +diff --git a/meson.build b/meson.build +index 83ecd99..4d3fb4e 100644 +--- a/meson.build ++++ b/meson.build +@@ -87,7 +87,11 @@ libdwarf_args = [ '-D__USE_MINGW_ANSI_STDIO=0' ] + if cc.get_id() == 'msvc' + libdwarf_args += [ '-D_CRT_NONSTDC_NO_WARNINGS', '-D_CRT_SECURE_NO_WARNINGS' ] + endif ++if cc.get_id() == 'clang' ++ add_project_arguments('-Wno-error=unused-but-set-variable', language: 'c') ++ add_project_arguments('-Wno-error=strict-prototypes', language: 'c') ++endif + + config_dir = [include_directories('.')] +