[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-06-22 Thread Dave Allured
Follow-up Comment #13, sr #111069 (group libtool):

[comment #7 comment #7:]
> ... Newer versions of ld64 already know to disable chained fixups when it is
passed `-undefined dynamic_lookup`. This patch is really only relevant for a
small range of versions of ld64 that doesn't have this behaviour.

Ideally '-no_fixup_chains' should be limited to this small range of linker
versions where the extra flag is actually needed to prevent error, or to
suppress an unwanted warning message.  Can anyone say which versions these
actually are, let alone how to code the proper test for them?


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-06-21 Thread Dave Allured
Follow-up Comment #11, sr #111069 (group libtool):

[comment #10 comment #10:]
> I have merged a patch in the development branch to append '-no_fixup_chains'
for macOS versions 11.3*-14* and Xcode versions 13-15* ...

Thanks for taking care of this.  I did not understand libtool enough to do it
myself.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-05-26 Thread Dave Allured
Follow-up Comment #4, sr #111069 (group libtool):

[comment #3 comment #3:]
> I personally tested this a while back

Thanks for letting me know about that testing.  Now I wonder if a feature test
might be better here in libtool, rather than a linker version number test.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-05-25 Thread Dave Allured
Follow-up Comment #2, sr #111069 (group libtool):

[comment #1 comment #1:]
> Note that the `-no_fixup_chains` flag is supported only on Xcode 13 or newer
(which in turn requires macOS 11.3 or newer).
> 
> See this relevant method used in Homebrew: ...

Thank you for this information.  I have trouble finding definitive
documentation for Apple development tools.

My original patch assumes that `-no_fixup_chains` would be silently ignored by
intermediate linker versions older than Xcode 13.  I have not yet tested this
assumption on any such Macs.

If that is a good assumption, then existing guards in the current 2.4.7
libtool code block should be sufficient, and I recommend merge with no
changes.

If not a good assumption, or it goes against GNU libtool design standards in
any way, such as no unknown flags, then I request help on how to construct the
correct test within libtool, for the Xcode linker version.


___

Reply to this item at:

  

___
Message sent via Savannah
https://savannah.gnu.org/




[sr #111069] libtool: patch: Fix dynamic_lookup warnings from new Mac linker

2024-05-24 Thread Dave Allured
URL:
  <https://savannah.gnu.org/support/?111069>

 Summary: libtool: patch: Fix dynamic_lookup warnings from new
Mac linker
   Group: GNU Libtool
   Submitter: dallured
   Submitted: Fri 24 May 2024 06:01:06 PM UTC
Category: None
Priority: 5 - Normal
Severity: 3 - Normal
  Status: None
 Privacy: Public
 Assigned to: None
Originator Email: 
 Open/Closed: Open
 Discussion Lock: Any
Operating System: Mac OS


___

Follow-up Comments:


---
Date: Fri 24 May 2024 06:01:06 PM UTC By: Dave Allured 
Apple introduced a new linker with macOS 14/Sonoma.  That included new
behavior for dynamic lookups.  Unpatched Mac builds now encounter this
warning, and possible subsequent execution failures:

ld: warning: -undefined dynamic_lookup may not work with chained fixups

The attached one-line patch for m4/libtool.m4 adds "-no_fixup_chains" which
constrains linker to traditional dynamic lookups and safe behavior.  This
patch targets the 2.4.7 release version of m4/libtool.m4.

Caveats.  I am not well experienced in linkers or GNU tool systems.  This
patch is my current best guess as to which libtool file to patch, and what is
the simplest remedy for that warning and consequences.

The current 2.4.7 version m4/libtool.m4 includes guards for platform and OS
version which I think are sufficient for this new flag.  I tested this patch
in a downstream package only, GNU GSL.  I tested this on several OS versions
including down level linkers, using Macports CI (github actions).  This did
not encounter any "unknown option" problems.  So I think that new guards are
not needed.

This patch was inspired by a downstream fix a year ago.  Please follow the
embedded link to Cpython, for a much more extensive analysis:
https://github.com/lcm-proj/lcm/pull/416

I like this:  "Compared to using chained fix-ups, the only potential downside
for us is a slightly larger dylib"






___
File Attachments:


---
Name: patch-libtool.darwin.no_fixup_chains.diff  Size: 473B
<https://file.savannah.gnu.org/file/patch-libtool.darwin.no_fixup_chains.diff?file_id=56099>

AGPL NOTICE

These attachments are served by Savane. You can download the corresponding
source code of Savane at
https://git.savannah.nongnu.org/cgit/administration/savane.git/snapshot/savane-4b48cbb9570c156bf7d681225b664258d7028914.tar.gz

___

Reply to this item at:

  <https://savannah.gnu.org/support/?111069>

___
Message sent via Savannah
https://savannah.gnu.org/