Problems compiling with clang (3.8.21)
Aleksander Morgado
aleksander at aleksander.es
Fri Apr 5 08:03:08 UTC 2019
Hey!
> > https://gitlab.freedesktop.org/mobile-broadband/libmbim/merge_requests/8
> > https://gitlab.freedesktop.org/mobile-broadband/libqmi/merge_requests/35
> >
> https://gitlab.freedesktop.org/mobile-broadband/ModemManager/merge_requests/88
>
> I tested the patches against the following versions:
>
> - libmbim: 1.16.0
> - libqmi: 1.20.0
> - ModemManager: 1.8.0
>
> and the compilation was successful with clang 3.8.21.
>
> For ModemManager I had to modify the patch as in 1.8.0 the -Werror had
> to be added, here is the resulting diff against 1.8.0:
>
> --- a/m4/compiler_warnings.m4
> +++ b/m4/compiler_warnings.m4
> @@ -10,10 +10,10 @@ if test "$GCC" = "yes" -a "$set_more_warnings" !=
> "no"; then
> for option in -Wmissing-declarations -Wmissing-prototypes \
> -Wdeclaration-after-statement -Wstrict-prototypes \
> -Wno-unused-parameter -Wno-sign-compare \
> - -Wno-deprecated-declarations \
> - -Wno-unused-but-set-variable -Wformat-security; do
> + -Wno-deprecated-declarations -Wno-unused-function \
> + -Wno-unused-variable -Wformat-security; do
> SAVE_CFLAGS="$CFLAGS"
> - CFLAGS="$CFLAGS $option"
> + CFLAGS="$CFLAGS $option -Werror"
> AC_MSG_CHECKING([whether gcc understands $option])
> AC_TRY_COMPILE([], [],
> has_option=yes,
>
I merged those 3 branches now, thanks to all.
--
Aleksander
https://aleksander.es
More information about the ModemManager-devel
mailing list