Subject: C++, libtool and a.out
To: None <tech-pkg@netbsd.org, tech-toolchain@netbsd.org>
From: Nick Hudson <nick@nthcliff.demon.co.uk>
List: tech-pkg
Date: 06/21/2000 21:19:56
This is a multi-part message in MIME format.
--------------777C7AA8D205058B4ADBFEF0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
OK so pkglibtool supported C++ constructors and destructors on a.out
systems by introducing the cplusplus flag which would link in
/usr/lib/c++rt0.o if specified. I would to apply the attached patch
so that libtool 1.3.5 will also support C++ and a.out. I think we
should drop the cplusplus flag for two reasons
i) Its simpler to maintain any C++ packages that use libtool
ii) Its easier to maintain libtool, i.e. we don't have to
re-introduce if we change libtool again.
Any one got any objects?
Matthias, you first added the cplusplus flag - are you happy?
If everyone is happy I'll also try and get the changes into
the libtool CVS tree.
Nick
--------------777C7AA8D205058B4ADBFEF0
Content-Type: text/plain; charset=us-ascii;
name="libtool-diffs"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
filename="libtool-diffs"
cvs server: Diffing .
Index: Makefile
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libtool/Makefile,v
retrieving revision 1.18
diff -r1.18 Makefile
5c5
< PKGNAME= libtool-1.3.5nb3
---
> PKGNAME= libtool-1.3.5nb4
cvs server: Diffing files
Index: files/patch-sum
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libtool/files/patch-sum,v
retrieving revision 1.7
diff -r1.7 patch-sum
3c3
< MD5 (patch-aa) = 9872a6807c4d4ffc5383b81882d7779b
---
> MD5 (patch-aa) = 8c3a5a080242462bca6ae6720b74c775
cvs server: Diffing patches
Index: patches/patch-aa
===================================================================
RCS file: /cvsroot/pkgsrc/devel/libtool/patches/patch-aa,v
retrieving revision 1.10
diff -r1.10 patch-aa
2,5c2,4
<
< --- ltconfig.in.orig Sat May 27 03:58:57 2000
< +++ ltconfig.in Sun Jun 4 19:35:00 2000
< @@ -1194,11 +1194,11 @@
---
> --- ./ltconfig.in.orig Sat May 27 02:58:57 2000
> +++ ./ltconfig.in Wed Jun 21 21:07:48 2000
> @@ -1194,11 +1194,15 @@
12c11,16
< archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
---
> - archive_cmds='$LD -Bshareable $libobjs $deplibs $linkopts -o $lib'
> + archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts'
> + if [ -f /usr/lib/c++rt0.o ]; then
> + # Add in C++ constructor/destructor support
> + archive_cmds="$archive_cmds /usr/lib/c++rt0.o"
> + fi
20c24,35
< @@ -2012,6 +2012,9 @@
---
> @@ -1393,6 +1397,10 @@
> netbsd*)
> if echo __ELF__ | $CC -E - | grep __ELF__ >/dev/null; then
> archive_cmds='$LD -Bshareable -o $lib $libobjs $deplibs $linkopts' # a.out
> + if [ -f /usr/lib/c++rt0.o ]; then
> + # Add in C++ constructor/destructor support
> + archive_cmds="$archive_cmds /usr/lib/c++rt0.o"
> + fi
> else
> archive_cmds='$LD -shared -o $lib $libobjs $deplibs $linkopts' # ELF
> fi
> @@ -2012,6 +2020,9 @@
cvs server: Diffing pkg
--------------777C7AA8D205058B4ADBFEF0--