Friday, September 24, 2021

Re: [sparc64] fix pulseaudio 15.0 build

On Fri, Sep 24, 2021 at 11:03:05AM +0200, Antoine Jacoutot wrote:
> On Fri, Sep 24, 2021 at 10:43:08AM +0200, Theo Buehler wrote:
> > The patch below makes pulseaudio build on sparc64.
> >
> > The problem is that the determination of libintl_dep works as intended
> > with base-clang but fails with ports-gcc (*). Thus, pacat and a couple
> > other programs are linked without -lintl on sparc64, which won't work.
> >
> > http://build-failures.rhaalovely.net/sparc64/2021-09-18/audio/pulseaudio.log
> >
> > I did not bump revision, since this should not change anything on
> > architectures where pulseaudio 15.0 already builds.
>
> Could we maybe add the patch only for the ".if !${PROPERTIES:Mclang}" case?

If you tell me how to do that...

Note that cc.has_function('dgettext') is false for ${PROPERTIES:Mclang}
and true for !${PROPERTIES:Mclang}.

>
> >
> >
> > (*) Meson uses the test program below which compiles with
> >
> > egcc -L/usr/local/lib -I/usr/local/include testfile.c -o test.out -O2 -pipe -O0 -std=gnu11
> >
> > but doesn't compile with clang.
> >
> > int main(void) {
> > /* With some toolchains (MSYS2/mingw for example) the compiler
> > * provides various builtins which are not really implemented and
> > * fall back to the stdlib where they aren't provided and fail at
> > * build/link time. In case the user provides a header, including
> > * the header didn't lead to the function being defined, and the
> > * function we are checking isn't a builtin itself we assume the
> > * builtin is not functional and we just error out. */
> > #if !1 && !defined(dgettext) && !0
> > #error "No definition for __builtin_dgettext found in the prefix"
> >

No comments:

Post a Comment