Re: [patch #6416] AmigaOS4 support in libtool

2008-03-12 Thread Ralf Wildenhues
Hello Henning,

I have applied your patch now, including a NEWS entry, as below, and put
you in THANKS.  Please check that I did not make any errors, thanks.

Gathering from the testsuite failure, the shared library support has
some work ahead yet.

Cheers,
Ralf

2008-03-12  Henning Nielsen Lund  [EMAIL PROTECTED]

* libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
(_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [amigaos]: Port to
AmigaOS4 shared libraries on powerpc.
* libltdl/m4/ltdl.m4 (LT_SYS_DLOPEN_DEPLIBS) [amigaos]:
Likewise.
* THANKS, NEWS: Update.

Index: NEWS
===
RCS file: /cvsroot/libtool/libtool/NEWS,v
retrieving revision 1.222
diff -u -r1.222 NEWS
--- NEWS4 Mar 2008 22:31:33 -   1.222
+++ NEWS12 Mar 2008 19:47:00 -
@@ -2,6 +2,10 @@
 
 New in 2.3b: 2008-??-??: CVS version 2.3a, Libtool team:
 
+* Changes in supported systems or compilers:
+
+  - Initial shared library support for AmigaOS4 on powerpc.
+
 * Bug fixes:
 
   - Fix 2.2 regression in libltdl that causes memory corruption upon
Index: libltdl/m4/libtool.m4
===
RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
retrieving revision 1.142
diff -u -r1.142 libtool.m4
--- libltdl/m4/libtool.m4   8 Mar 2008 12:14:15 -   1.142
+++ libltdl/m4/libtool.m4   12 Mar 2008 19:47:04 -
@@ -2150,13 +2150,18 @@
   ;;
 
 amigaos*)
-  if test $host_cpu = m68k; then
+  case $host_cpu in
+  powerpc)
+# Since July 2007 AmigaOS4 officially supports .so libraries.
+# When compiling the executable, add -use-dynld -Lsobjs: to the 
compileline.
+library_names_spec='${libname}${release}${shared_ext}$versuffix 
${libname}${release}${shared_ext}$major $libname${shared_ext}'
+;;
+  m68k)
 library_names_spec='$libname.ixlibrary $libname.a'
 # Create ${libname}_ixlibrary.a entries in /sys/libs.
 finish_eval='for lib in `ls $libdir/*.ixlibrary 2/dev/null`; do 
libname=`$ECHO X$lib | $Xsed -e '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; 
test $RM /sys/libs/${libname}_ixlibrary.a; $show cd /sys/libs  $LN_S $lib 
${libname}_ixlibrary.a; cd /sys/libs  $LN_S $lib ${libname}_ixlibrary.a || 
exit 1; done'
-  else
-dynamic_linker=no
-  fi
+;;
+  esac
   ;;
 
 beos*)
@@ -3524,14 +3529,22 @@
_LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
   fi
   ;;
+
 amigaos*)
-  if test $host_cpu = m68k; then
-# FIXME: we need at least 68020 code to build shared libraries, but
-# adding the `-m68020' flag to GCC prevents building anything better,
-# like `-m68040'.
-_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 
-malways-restore-a4'
-  fi
+  case $host_cpu in
+  powerpc)
+# see comment about AmigaOS4 .so support
+_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+;;
+  m68k)
+# FIXME: we need at least 68020 code to build shared libraries, but
+# adding the `-m68020' flag to GCC prevents building anything 
better,
+# like `-m68040'.
+_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 
-malways-restore-a4'
+;;
+  esac
   ;;
+
 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
   # PIC is the default for these OSes.
   ;;
@@ -3816,12 +3829,18 @@
   ;;
 
 amigaos*)
-  if test $host_cpu = m68k; then
-# FIXME: we need at least 68020 code to build shared libraries, but
-# adding the `-m68020' flag to GCC prevents building anything better,
-# like `-m68040'.
-_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 
-malways-restore-a4'
-  fi
+  case $host_cpu in
+  powerpc)
+# see comment about AmigaOS4 .so support
+_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
+;;
+  m68k)
+# FIXME: we need at least 68020 code to build shared libraries, but
+# adding the `-m68020' flag to GCC prevents building anything 
better,
+# like `-m68040'.
+_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32 
-malways-restore-a4'
+;;
+  esac
   ;;
 
 beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
@@ -4228,19 +4247,18 @@
   ;;
 
 amigaos*)
-  if test $host_cpu = m68k; then
-_LT_TAGVAR(archive_cmds, $1)='$RM 
$output_objdir/a2ixlibrary.data~$ECHO #define NAME $libname  
$output_objdir/a2ixlibrary.data~$ECHO #define LIBRARY_ID 1  
$output_objdir/a2ixlibrary.data~$ECHO #define VERSION $major  
$output_objdir/a2ixlibrary.data~$ECHO #define REVISION $revision  
$output_objdir/a2ixlibrary.data~$AR $AR_FLAGS $lib $libobjs~$RANLIB $lib~(cd 
$output_objdir  a2ixlibrary -32)'
-_LT_TAGVAR(hardcode_libdir_flag_spec, $1)='-L$libdir'
-_LT_TAGVAR(hardcode_minus_L, $1)=yes

Re: [patch #6416] AmigaOS4 support in libtool

2008-03-12 Thread Henning Nielsen Lund
Thank you Ralf

I hope that I will find some more time to make some more tests/changes in
about week.

Best regards,
Henning


 Hello Henning,

 I have applied your patch now, including a NEWS entry, as below, and put
 you in THANKS.  Please check that I did not make any errors, thanks.

 Gathering from the testsuite failure, the shared library support has
 some work ahead yet.

 Cheers,
 Ralf

 2008-03-12  Henning Nielsen Lund  [EMAIL PROTECTED]

   * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER)
   (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS) [amigaos]: Port to
   AmigaOS4 shared libraries on powerpc.
   * libltdl/m4/ltdl.m4 (LT_SYS_DLOPEN_DEPLIBS) [amigaos]:
   Likewise.
   * THANKS, NEWS: Update.

 Index: NEWS
 ===
 RCS file: /cvsroot/libtool/libtool/NEWS,v
 retrieving revision 1.222
 diff -u -r1.222 NEWS
 --- NEWS  4 Mar 2008 22:31:33 -   1.222
 +++ NEWS  12 Mar 2008 19:47:00 -
 @@ -2,6 +2,10 @@

  New in 2.3b: 2008-??-??: CVS version 2.3a, Libtool team:

 +* Changes in supported systems or compilers:
 +
 +  - Initial shared library support for AmigaOS4 on powerpc.
 +
  * Bug fixes:

- Fix 2.2 regression in libltdl that causes memory corruption upon
 Index: libltdl/m4/libtool.m4
 ===
 RCS file: /cvsroot/libtool/libtool/libltdl/m4/libtool.m4,v
 retrieving revision 1.142
 diff -u -r1.142 libtool.m4
 --- libltdl/m4/libtool.m4 8 Mar 2008 12:14:15 -   1.142
 +++ libltdl/m4/libtool.m4 12 Mar 2008 19:47:04 -
 @@ -2150,13 +2150,18 @@
;;

  amigaos*)
 -  if test $host_cpu = m68k; then
 +  case $host_cpu in
 +  powerpc)
 +# Since July 2007 AmigaOS4 officially supports .so libraries.
 +# When compiling the executable, add -use-dynld -Lsobjs: to the
 compileline.
 +library_names_spec='${libname}${release}${shared_ext}$versuffix
 ${libname}${release}${shared_ext}$major $libname${shared_ext}'
 +;;
 +  m68k)
  library_names_spec='$libname.ixlibrary $libname.a'
  # Create ${libname}_ixlibrary.a entries in /sys/libs.
  finish_eval='for lib in `ls $libdir/*.ixlibrary 2/dev/null`; do
 libname=`$ECHO X$lib | $Xsed -e
 '\''s%^.*/\([[^/]]*\)\.ixlibrary$%\1%'\''`; test $RM
 /sys/libs/${libname}_ixlibrary.a; $show cd /sys/libs  $LN_S $lib
 ${libname}_ixlibrary.a; cd /sys/libs  $LN_S $lib
 ${libname}_ixlibrary.a || exit 1; done'
 -  else
 -dynamic_linker=no
 -  fi
 +;;
 +  esac
;;

  beos*)
 @@ -3524,14 +3529,22 @@
   _LT_TAGVAR(lt_prog_compiler_static, $1)='-Bstatic'
fi
;;
 +
  amigaos*)
 -  if test $host_cpu = m68k; then
 -# FIXME: we need at least 68020 code to build shared libraries,
 but
 -# adding the `-m68020' flag to GCC prevents building anything
 better,
 -# like `-m68040'.
 -_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
 -malways-restore-a4'
 -  fi
 +  case $host_cpu in
 +  powerpc)
 +# see comment about AmigaOS4 .so support
 +_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 +;;
 +  m68k)
 +# FIXME: we need at least 68020 code to build shared
 libraries, but
 +# adding the `-m68020' flag to GCC prevents building anything
 better,
 +# like `-m68040'.
 +_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
 -malways-restore-a4'
 +;;
 +  esac
;;
 +
  beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
# PIC is the default for these OSes.
;;
 @@ -3816,12 +3829,18 @@
;;

  amigaos*)
 -  if test $host_cpu = m68k; then
 -# FIXME: we need at least 68020 code to build shared libraries,
 but
 -# adding the `-m68020' flag to GCC prevents building anything
 better,
 -# like `-m68040'.
 -_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
 -malways-restore-a4'
 -  fi
 +  case $host_cpu in
 +  powerpc)
 +# see comment about AmigaOS4 .so support
 +_LT_TAGVAR(lt_prog_compiler_pic, $1)='-fPIC'
 +;;
 +  m68k)
 +# FIXME: we need at least 68020 code to build shared
 libraries, but
 +# adding the `-m68020' flag to GCC prevents building anything
 better,
 +# like `-m68040'.
 +_LT_TAGVAR(lt_prog_compiler_pic, $1)='-m68020 -resident32
 -malways-restore-a4'
 +;;
 +  esac
;;

  beos* | irix5* | irix6* | nonstopux* | osf3* | osf4* | osf5*)
 @@ -4228,19 +4247,18 @@
;;

  amigaos*)
 -  if test $host_cpu = m68k; then
 -_LT_TAGVAR(archive_cmds, $1)='$RM
 $output_objdir/a2ixlibrary.data~$ECHO #define NAME $libname 
 $output_objdir/a2ixlibrary.data~$ECHO #define LIBRARY_ID 1 
 $output_objdir/a2ixlibrary.data~$ECHO #define VERSION $major 
 $output_objdir/a2ixlibrary.data~$ECHO #define REVISION $revision 
 

Re: [patch #6416] AmigaOS4 support in libtool

2008-03-11 Thread Henning Nielsen Lund

 Hello Henning,

Hello Ralf,

 * Henning Nielsen Lund wrote on Fri, Feb 15, 2008 at 07:05:05PM CET:
  * Henning Nielsen Lund wrote on Sun, Feb 10, 2008 at 07:16:17PM CET:
 
  Since July 2007 AmigaOS4 officially supports .so libraries. It would
 be
  nice if it would be possible to add support for it in Libtool. The
  attached patch does make it working.
 
  Thanks a lot for the patch.  Apart from minor version skew-induced
  hunks, it looks good to me.  Could you be bothered to run the
 testsuite
 [...]
 Sorry for the delay, but here is my result, using a crosscompilation
 suite
 on cygwin. The test was running on libtool-2.1b with my changes - patch
 #6416

 It will be more difficult to make the test native, as we do not have a
 new
 enough version of automake/autoconf running on AmigaOS4. But I will do
 mine to test it this weekend.

 It's fine if you do cross compilation testing.

 What I'd like to know though before applying the patch: are there
 systems other than m68k and powerpc on which AmigaOS runs?

No, it is only m68k and PowerPC.

 Do we have to maintain backward compatibility to AmigaOS versions earlier
 than the one that supports shared libraries?

ppc-amigaos (AmigaOS4) is supporting shared libraries. The update that
enabled shared libraries is an official update, that is free for people
owning AmigaOS4.

 And then, you remove this comment:

 -  # Samuel A. Falvo II [EMAIL PROTECTED] reports
 -  # that the semantics of dynamic libraries on AmigaOS, at least up
 -  # to version 4, is to share data among multiple programs linked
 -  # with the same dynamic library.  Since this doesn't match the
 -  # behavior of shared libraries on other platforms, we can't use
 -  # them.

 Is this issue now fixed?

Some people are still using it, but I do hornestly do not know how many
people is using it (and why it was removed from libtool). It does not
matter much for me, as I am only an AmigaOS4 user and there is not that
much work done on classic (m68k) AmigaOS anymore.

 Thanks,
 Ralf

-- 
best regards,
hnl_dk - Henning Nielsen Lund

µA1-C (IBM PowerPC 750 FX V2.2 @ 800MHz), 256MB RAM, NEC ND-3500A DVD/CD
RW, Samsung SP1604N 160GB PATA Harddisk drive, Acer AL1721 17 TFT,
modified Tyan M2042 1-3 PCI Riser...



___
Bug-libtool mailing list
Bug-libtool@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-libtool