issues with current libtool.m4 in macOS 11.x

Aleix Conchillo Flaqué aconchillo at gmail.com
Tue Sep 21 18:00:51 CEST 2021


On Tue, Sep 21, 2021 at 12:28 AM NIIBE Yutaka <gniibe at fsij.org> wrote:
>
> Hello,
>
> Aleix Conchillo Flaqué wrote:
> > A few days ago I sent a patch to update libtool.m4 out of the blue.
> > The reason for this update is that the current libtool.m4 doesn't
> > support macOS 11.x properly which means libgcrypt is linked with the
> > option flat_namespace.
>
> Thank you for your report.  I created a ticket to track this issue:
>
>     https://dev.gnupg.org/T5610
>

Thank you!

> If our purpose is to minimize the changes of GnuPG and its friends, I
> think that the change could be minimized like the following.
>
> diff --git a/m4/libtool.m4 b/m4/libtool.m4
> index 8795701..a83d3f1 100644
> --- a/m4/libtool.m4
> +++ b/m4/libtool.m4
> @@ -1054,7 +1054,7 @@ _LT_EOF
>           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
>         10.[[012]]*)
>           _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress' ;;
> -       10.*)
> +       10.*|11.*)
>           _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
>        esac
>      ;;
> --

With this it seems we will get the same issue when macOS releases 12.x
(whenever that is). Should we use what new libtool.m4 does instead? It
basically improves version detection and makes it generic for future
macOS versions (it keeps the same linking options as before, so no big
risks I believe).

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 8795701e..77d62f75 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1045,16 +1045,11 @@ _LT_EOF
       _lt_dar_allow_undefined='${wl}-undefined ${wl}suppress' ;;
     darwin1.*)
       _lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined
${wl}suppress' ;;
-    darwin*) # darwin 5.x on
-      # if running on 10.5 or later, the deployment target defaults
-      # to the OS version, if on x86, and 10.4, the deployment
-      # target defaults to 10.4. Don't you love it?
-      case ${MACOSX_DEPLOYMENT_TARGET-10.0},$host in
-       10.0,*86*-darwin8*|10.0,*-darwin[[91]]*)
-         _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
-       10.[[012]]*)
+    darwin*)
+      case ${MACOSX_DEPLOYMENT_TARGET},$host in
+        10.[[012]],*|,*powerpc*)
          _lt_dar_allow_undefined='${wl}-flat_namespace
${wl}-undefined ${wl}suppress' ;;
-       10.*)
+       *)
          _lt_dar_allow_undefined='${wl}-undefined ${wl}dynamic_lookup' ;;
       esac
     ;;



More information about the Gcrypt-devel mailing list