diff options
author | Matthew Waters <matthew@centricular.com> | 2024-03-20 20:17:00 +1100 |
---|---|---|
committer | Matthew Waters <matthew@centricular.com> | 2024-03-20 20:17:00 +1100 |
commit | f9b6a48ca80495c76de21b7b3a4e7cd7b719ebdc (patch) | |
tree | 9a1ff39dddd77891d4e9fdd6fa891877c1383961 | |
parent | d069a3f10361e8b8bdd38df0764869c42329ff16 (diff) |
glib: disable error for int-conversion introduced by default with clang 15
macos/ios now ship clang 15 which flipped some default errors for some
warnings around int->pointer conversion that currently fail in glib to
the version we ship here. Unflip those errors.
https://reviews.llvm.org/D129881
Part-of: <https://gitlab.freedesktop.org/gstreamer/cerbero/-/merge_requests/1409>
-rw-r--r-- | recipes/build-tools/glib-tools.recipe | 3 | ||||
-rw-r--r-- | recipes/glib.recipe | 1 | ||||
-rw-r--r-- | recipes/pixman.recipe | 7 | ||||
-rw-r--r-- | recipes/pkg-config.recipe | 2 |
4 files changed, 9 insertions, 4 deletions
diff --git a/recipes/build-tools/glib-tools.recipe b/recipes/build-tools/glib-tools.recipe index 9f65ae83..620fe9ec 100644 --- a/recipes/build-tools/glib-tools.recipe +++ b/recipes/build-tools/glib-tools.recipe @@ -26,3 +26,6 @@ class Recipe(recipe.Recipe): # Want secure versions of stdlib functions. Glib already defines # _WIN32_WINNT, so undefine it on the cmdline to avoid warnings self.append_env('CFLAGS', '-DMINGW_HAS_SECURE_API=1', '-U_WIN32_WINNT') + + if self.config.platform == Platform.DARWIN: + self.append_env('CFLAGS', '-Wno-error=int-conversion') diff --git a/recipes/glib.recipe b/recipes/glib.recipe index b0801f38..7a688286 100644 --- a/recipes/glib.recipe +++ b/recipes/glib.recipe @@ -198,6 +198,7 @@ class Recipe(recipe.Recipe): extra_flags = ['-DGST_SDK_IOS=1'] # XXX: Why did we disable these for iOS? #self.configure_options += ' --disable-carbon --disable-modular-tests --disable-cocoa' + extra_flags += ['-Wno-error=int-conversion'] self.append_env('CFLAGS', *extra_flags) elif self.config.target_platform == Platform.LINUX: diff --git a/recipes/pixman.recipe b/recipes/pixman.recipe index ef6b6e9a..09b35cb4 100644 --- a/recipes/pixman.recipe +++ b/recipes/pixman.recipe @@ -30,9 +30,10 @@ class Recipe(recipe.Recipe): def prepare(self): # clang from xcode has a known bug, avoid codepath that trigger it # More info : https://github.com/Homebrew/homebrew/issues/41056 - if self.config.target_platform in [ Platform.DARWIN, Platform.IOS ] and \ - self.config.target_arch in [ Architecture.X86, Architecture.X86_64 ]: - self.meson_options['mmx'] = 'disabled' + if self.config.target_platform in [ Platform.DARWIN, Platform.IOS ]: + self.append_env('CFLAGS', '-Wno-error=incompatible-function-pointer-types') + if self.config.target_arch in [ Architecture.X86, Architecture.X86_64 ]: + self.meson_options['mmx'] = 'disabled' if self.config.target_platform == Platform.IOS: self.append_env('CFLAGS', '-DPIXMAN_NO_TLS') if self.config.target_platform == Platform.ANDROID: diff --git a/recipes/pkg-config.recipe b/recipes/pkg-config.recipe index 72036082..3a61cdff 100644 --- a/recipes/pkg-config.recipe +++ b/recipes/pkg-config.recipe @@ -17,4 +17,4 @@ class Recipe(recipe.Recipe): files_share = ['share/aclocal/pkg.m4'] def prepare(self): - self.append_env('CFLAGS', '-Wno-error=format-nonliteral') + self.append_env('CFLAGS', '-Wno-error=format-nonliteral -Wno-error=int-conversion') |