OS checks with configuration time DLOPEN_NEEDS_LIBDL

Norbert Thiebaud nthiebaud at gmail.com
Tue Sep 22 09:51:22 PDT 2015


On Tue, Sep 22, 2015 at 6:31 AM, Richard PALO <richard at netbsd.org> wrote:
> Since GUIBASE was replaced with the equivalent OS checks, there seems
> to be a bit of abandon in keeping multiple OSes up to snuff.
>
> in https://gerrit.libreoffice.org/#/c/18591/  I took our base in pkgsrc and
> given the biggest difference in unix systems is the need for -ldl or not for dlopen,
>
> I added a configuration check for DLOPEN_NEEDS_LIBDL and updated a number of the existing
> OS checks to check simultaneously for, among others, %BSD and SOLARIS in addition to LINUX.
>
> It would be nice to get some review on this approach.

Jenkins got us a first review. the patch break on windows because it seems that
AC_SEARCH_LIBS([dlopen],
trigger a search of gcc...

is there any chance that is relevant for windows ? if not the 'if
test' that out of configure ofr cygwin case (and prolly for macosx
case as at bes it will work , but it can pick up accidentally some
crap if the mac has some extra stuff installed)

that being said couldn't this be done without putting all that logic
in the 'client' makefile.

and just have $(if $(DLOPEN_NEEDS_LIBDL), -ldl) logic in gbuild and
define a gb_LIBDL defined to -ldl or empty (most likely in
RepositoryExternal.mk or in platform/* not sure on top of my head
which is the cleanest.

and then have for example

$(eval $(call gb_Executable_add_libs,gengal,\
    $(gb_LIBDL) \
    -lpthread \

(and yes that could be extended to the few place that do the same kind
of exercise with lpthread... and there is maybe an even better way but
one step at the time...)


also you may want to split the part of the patch that touch
Repositoty.mk as that seems somewhat orthogonal with the -ldl stuff

Norbert


More information about the LibreOffice mailing list