Skip to content

Commit

Permalink
Fix clang compilation of libdwarf on macOS 13
Browse files Browse the repository at this point in the history
  • Loading branch information
niklaut committed Nov 16, 2023
1 parent c38d8ed commit b17c7b1
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 1 deletion.
2 changes: 1 addition & 1 deletion subprojects/libdwarf.wrap
Original file line number Diff line number Diff line change
Expand Up @@ -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
15 changes: 15 additions & 0 deletions subprojects/packagefiles/libdwarf/0002-fix-compilation-clang.patch
Original file line number Diff line number Diff line change
@@ -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('.')]

0 comments on commit b17c7b1

Please sign in to comment.