[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] AIX 5L shared vs static library logic
From: |
David Edelsohn |
Subject: |
[PATCH] AIX 5L shared vs static library logic |
Date: |
Thu, 04 Mar 2004 15:06:35 -0500 |
The default, non-SVR4 (non-"runtime linking"-style) shared library
behavior of AIX uses a shared object placed in an archive file. This
means that there is a filename conflict between a library archive of
object files and a shared library. This normally is not a problem because
shared libraries should be used, if available, so the traditional archive
is not necessary. One also may link statically with the shared library.
When GNU Libtool builds a shared library on AIX, it should not
build a static library because that causes libtool to archive *both* the
shared object and the PIC object files in the archive, causing breakage.
There is logic in libtool.m4 to do this, but it only was testing for
target aix4* and was not updated to test for aix5* as well.
The appended, simple patch corrects the oversight, making AIX 5L
behavior match AIX 4 behavior. I would appreciate if someone would
approve it and commit it to the libtool repository.
Thanks, David
2004-03-04 David Edelsohn <address@hidden>
* libtool.m4: Disable building static libraries if building shared
libraries on AIX 5L.
Index: libtool.m4
===================================================================
RCS file: /cvsroot/libtool/libtool/m4/libtool.m4,v
retrieving revision 1.48
diff -c -p -r1.48 libtool.m4
*** libtool.m4 22 Feb 2004 11:13:45 -0000 1.48
--- libtool.m4 4 Mar 2004 19:51:12 -0000
*************** aix3*)
*** 4405,4411 ****
fi
;;
! aix4*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
--- 4405,4411 ----
fi
;;
! aix4* | aix5*)
if test "$host_cpu" != ia64 && test "$aix_use_runtimelinking" = no ; then
test "$enable_shared" = yes && enable_static=no
fi
*************** aix3*)
*** 5534,5540 ****
postinstall_cmds='$RANLIB $lib'
fi
;;
! aix4*)
test "$enable_shared" = yes && enable_static=no
;;
esac
--- 5534,5540 ----
postinstall_cmds='$RANLIB $lib'
fi
;;
! aix4* | aix5*)
test "$enable_shared" = yes && enable_static=no
;;
esac
- [PATCH] AIX 5L shared vs static library logic,
David Edelsohn <=