Re: -no_fixup_chains patch

2024-06-27 Thread Ozkan Sezer
[Sorry, I seem to have deleted the mailing list message from my inbox]

Regarding -no_fixup_chains patch i.e.
 
http://git.savannah.gnu.org/gitweb/?p=libtool.git;a=commitdiff;h=3d1baeeef90a6b9e16c545babe833f28dca155a7

Is '+=' universally supported?? Maybe change to something like the following??


diff --git a/m4/libtool.m4 b/m4/libtool.m4
index 381d4cb..31f1be0 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -1032,3 +1032,3 @@
   [ save_LDFLAGS=$LDFLAGS
-LDFLAGS+=" -Wl,-no_fixup_chains"
+LDFLAGS="$LDFLAGS -Wl,-no_fixup_chains"
 AC_LINK_IFELSE(
@@ -1093,3 +1093,3 @@ _LT_EOF
   if test yes = "$lt_cv_support_no_fixup_chains"; then
-_lt_dar_allow_undefined+=' $wl-no_fixup_chains'
+_lt_dar_allow_undefined='$_lt_dar_allow_undefined
$wl-no_fixup_chains'
   fi



Re: flang compiler and wrappers

2024-06-27 Thread Ileana Dumitrescu

On 26/06/2024 10:21, Shterenlikht, Anton wrote:

Please help understand and fix this problem:

libtool: link: ftn -shared -soname libxxx.so.0 -o 
.libs/libxxx.so.0.0.0
clang-16: error: unknown argument: '-soname'

which comes from my compiler wrapper not recognised.


Sorry for missing your earlier response. To set 'wl' for
flang, armflang, flang-new, and ftn, the following patch
should work:

--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@@ -4805,7 -4805,7 +4805,7 @@@ m4_if([$1], [CXX],
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-KPIC'
_LT_TAGVAR(lt_prog_compiler_static, $1)='-static'
  ;;
--  *flang)
++  *flang* | ftn*)
  # Flang compiler.
_LT_TAGVAR(lt_prog_compiler_wl, $1)='-Wl,'
_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'

Could you test this again in your environment?


The libtool script generated for my project has:

# A language specific compiler.
CC="ftn"

# Is the compiler the GNU compiler?
with_gcc=no

# Compiler flag to turn off builtin functions.
no_builtin_flag=""

# Additional compiler flags for building library objects.
pic_flag=""

# How to pass a linker flag through the compiler.
wl=""

I can fix this with

sed -i -e 's/wl=""/wl="-Wl,"/g' libtool

as I reported in https://savannah.gnu.org/patch/?9442

However, what is the right way to deal with this?

Finally, will the patch from https://savannah.gnu.org/patch/?9442
be included in the upcoming libtool release?


The previous patch was applied in the latest alpha release of
libtool 2.5.0, and you should see it in the upcoming beta and
stable releases.


Thank you

Anton


--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354


OpenPGP_0x6570EA01146F7354.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


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

2024-06-27 Thread Ileana Dumitrescu

On 27/06/2024 18:28, Ozkan Sezer wrote:

On Thu, Jun 27, 2024 at 5:29 PM Ileana Dumitrescu
 wrote:


Follow-up Comment #16, sr #111069 (group libtool):

I have updated development with a feature test:

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development=3d1baeeef90a6b9e16c545babe833f28dca155a7

Please tell me if there are any issues with it.


Working for me: -no_fixup_chains support is detected correctly against
several Apple linker versions in my linux-to-mac cross-compile attempts.


I am happy to know this is working for someone else! If no issues
are reported before next week, I will merge this into master and
close this issue.


--
O.S.



--
Ileana Dumitrescu

GPG Public Key: FA26 CA78 4BE1 8892 7F22 B99F 6570 EA01 146F 7354


OpenPGP_0x6570EA01146F7354.asc
Description: OpenPGP public key


OpenPGP_signature.asc
Description: OpenPGP digital signature


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

2024-06-27 Thread Ozkan Sezer
On Thu, Jun 27, 2024 at 5:29 PM Ileana Dumitrescu
 wrote:
>
> Follow-up Comment #16, sr #111069 (group libtool):
>
> I have updated development with a feature test:
>
> https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development=3d1baeeef90a6b9e16c545babe833f28dca155a7
>
> Please tell me if there are any issues with it.

Working for me: -no_fixup_chains support is detected correctly against
several Apple linker versions in my linux-to-mac cross-compile attempts.

--
O.S.



[patch #9999] Fix --preserve-dup-deps flag not to strip some duplicates

2024-06-27 Thread Ileana Dumitrescu
Update of patch # (group libtool):

  Status:None => Done   

___

Follow-up Comment #6:

This has been updated in development, and thank you again for your patch!

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development=e517cfe7e1f11d5b5d99f63554521e239d5219e8


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


branch development updated: ltmain: Remove unnecessary comment for INN

2024-06-27 Thread Ileana Dumitrescu
This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch development
in repository libtool.

The following commit(s) were added to refs/heads/development by this push:
 new e517cfe7 ltmain: Remove unnecessary comment for INN
e517cfe7 is described below

commit e517cfe7e1f11d5b5d99f63554521e239d5219e8
Author: Ileana Dumitrescu 
AuthorDate: Thu Jun 27 17:31:29 2024 +0300

ltmain: Remove unnecessary comment for INN
---
 build-aux/ltmain.in | 1 -
 1 file changed, 1 deletion(-)

diff --git a/build-aux/ltmain.in b/build-aux/ltmain.in
index f850b951..5221b87f 100644
--- a/build-aux/ltmain.in
+++ b/build-aux/ltmain.in
@@ -6734,7 +6734,6 @@ func_mode_link ()
  #that some nasty dependency loop isn't accidentally
  #broken: new_libs="$deplib $new_libs"
  for deplib in $tmp_libs; do
-   # Modification for INN in the loop (fix --preserve-dup-deps).
if $opt_preserve_dup_deps; then
  new_libs="$deplib $new_libs"
else



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

2024-06-27 Thread Ileana Dumitrescu
Follow-up Comment #16, sr #111069 (group libtool):

I have updated development with a feature test:

https://git.savannah.gnu.org/cgit/libtool.git/commit/?h=development=3d1baeeef90a6b9e16c545babe833f28dca155a7

Please tell me if there are any issues with it.


___

Reply to this item at:

  

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


signature.asc
Description: PGP signature


branch development updated: m4: Update disabling chained fixups for macOS

2024-06-27 Thread Ileana Dumitrescu
This is an automated email from the git hooks/post-receive script.

ildumi pushed a commit to branch development
in repository libtool.

The following commit(s) were added to refs/heads/development by this push:
 new 3d1baeee m4: Update disabling chained fixups for macOS
3d1baeee is described below

commit 3d1baeeef90a6b9e16c545babe833f28dca155a7
Author: Ileana Dumitrescu 
AuthorDate: Tue Jun 25 17:09:52 2024 +0300

m4: Update disabling chained fixups for macOS

This is an update for commit 001d22d7d587e85a911c71c4d0c798ede8014b77.

* m4/libtool.m4: Replace version testing with a feature test for
  the '-no_fixup_chains' flag.
* tests/no-executables.at: Set cache variable for link test.
---
 m4/libtool.m4   | 38 --
 tests/no-executables.at |  1 +
 2 files changed, 21 insertions(+), 18 deletions(-)

diff --git a/m4/libtool.m4 b/m4/libtool.m4
index a1fcdf7a..381d4cb3 100644
--- a/m4/libtool.m4
+++ b/m4/libtool.m4
@@ -974,6 +974,7 @@ _lt_linker_boilerplate=`cat conftest.err`
 $RM -r conftest*
 ])# _LT_LINKER_BOILERPLATE
 
+
 # _LT_REQUIRED_DARWIN_CHECKS
 # -
 m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
@@ -1024,6 +1025,21 @@ m4_defun_once([_LT_REQUIRED_DARWIN_CHECKS],[
rm -f conftest.*
   fi])
 
+# Feature test to disable chained fixups since it is not
+# compatible with '-undefined dynamic_lookup'
+AC_CACHE_CHECK([for -no_fixup_chains linker flag],
+  [lt_cv_support_no_fixup_chains],
+  [ save_LDFLAGS=$LDFLAGS
+LDFLAGS+=" -Wl,-no_fixup_chains"
+AC_LINK_IFELSE(
+  [AC_LANG_PROGRAM([],[])],
+  lt_cv_support_no_fixup_chains=yes,
+  lt_cv_support_no_fixup_chains=no
+)
+LDFLAGS=$save_LDFLAGS
+  ]
+)
+
 AC_CACHE_CHECK([for -exported_symbols_list linker flag],
   [lt_cv_ld_exported_symbols_list],
   [lt_cv_ld_exported_symbols_list=no
@@ -1069,28 +1085,14 @@ _LT_EOF
 darwin1.*)
   _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined ${wl}suppress' 
;;
 darwin*)
-  # $MACOSX_DEPLOYMENT_TARGET seems to be deprecated as a darwin
-  # environment variable
   case $MACOSX_DEPLOYMENT_TARGET,$host in
 10.[[012]],*|,*powerpc*-darwin[[5-8]]*)
   _lt_dar_allow_undefined='$wl-flat_namespace $wl-undefined 
${wl}suppress' ;;
 *)
-  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup' ;;
-  esac
-  # Disable chained fixups since it is not compatible with
-  # '-undefined dynamic_lookup'
-  macos_version=`sw_vers -productVersion`
-  case $macos_version in
-11.[[3-7]]*|1[[2-4]]*)
-  xcode_version=`pkgutil --pkg-info=com.apple.pkg.CLTools_Executables`
-  case $xcode_version in
-*version:\ 1[[3-5]]*)
-  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup 
$wl-no_fixup_chains' ;;
-*)
-;;
-  esac
-;;
-*)
+  _lt_dar_allow_undefined='$wl-undefined ${wl}dynamic_lookup'
+  if test yes = "$lt_cv_support_no_fixup_chains"; then
+_lt_dar_allow_undefined+=' $wl-no_fixup_chains'
+  fi
 ;;
   esac
 ;;
diff --git a/tests/no-executables.at b/tests/no-executables.at
index 46225a6f..7530fe36 100644
--- a/tests/no-executables.at
+++ b/tests/no-executables.at
@@ -50,6 +50,7 @@ AM_PROG_GCJ
 lt_cv_shlibpath_overrides_runpath=no
 lt_cv_archive_cmds_need_lc=no
 lt_cv_cc_needs_belf=no
+lt_cv_support_no_fixup_chains=no
 lt_cv_ld_exported_symbols_list=no
 lt_cv_prog_compiler_static_works=no
 lt_cv_aix_libpath=/usr/lib:/lib