Subject: libtool c++ issue on IRIX 5, need help
To: None <tech-pkg@netbsd.org>
From: Georg Schwarz <georg.schwarz@freenet.de>
List: tech-pkg
Date: 12/18/2005 02:23:46
On my IRIX 5 system I am using the SGI IDO cc and the GNU g++ compiler.
The problem with libtool seems to be that it assumes I am using some SGI
c++ compiler (CC).
The problem becomes apparent when building a library such as
graphocs/tiff which cointains c++ code.

I managed to get tiff compile after hacking libtool like this:

--- libtool.orig        Sun Dec 18 02:22:23 2005
+++ libtool     Sun Dec 18 02:25:54 2005
@@ -7093,7 +7093,7 @@
 
 # Commands used to build and install an old-style archive.
 RANLIB="true"
-old_archive_cmds="\$CC -ar -WR,-u -o \$oldlib \$oldobjs"
+old_archive_cmds="\$AR \$AR_FLAGS \$oldlib \$oldobjs"
 old_postinstall_cmds="\$RANLIB \$oldlib~chmod 644 \$oldlib"
 old_postuninstall_cmds=""
 
@@ -7104,7 +7104,7 @@
 old_archive_from_expsyms_cmds=""
 
 # Commands used to build and install a shared archive.
-archive_cmds="\$CC -shared -all \$predep_objects \$libobjs \$deplibs
\$postdep_objects \$compiler_flags -soname \$soname \\\`test -n
\\\"\$verstring\\\" && echo -set_version \$verstring\\\`
-update_registry \${output_objdir}/so_locations -o \$lib"
+archive_cmds="\$LD -shared -all \$predep_objects \$libobjs \$deplibs
\$postdep_objects \$compiler_flags -soname \$soname \\\`test -n
\\\"\$verstring\\\" && echo -set_version \$verstring\\\`
-update_registry \${output_objdir}/so_locations -o \$lib"
 archive_expsym_cmds=""
 postinstall_cmds=""
 postuninstall_cmds=""
@@ -7406,7 +7406,7 @@
 old_archive_from_expsyms_cmds=""
 
 # Commands used to build and install a shared archive.
-archive_cmds="\$LD -shared \$libobjs \$deplibs \$linker_flags -soname
\$soname \\\`test -n \\\"\$verstring\\\" && echo -set_version
\$verstring\\\` -update_registry \${output_objdir}/so_locations -o
\$lib"
+archive_cmds="\$CC -shared \$libobjs \$deplibs \$linker_flags -soname
\$soname \\\`test -n \\\"\$verstring\\\" && echo -set_version
\$verstring\\\` -update_registry \${output_objdir}/so_locations -o
\$lib"
 archive_expsym_cmds=""
 postinstall_cmds=""
 postuninstall_cmds=""


Is there a way to make devel/libtool-base check not only whether one is
using the SGI cc but also separately whether one is using the SGI CC or
g++?


-- 
Georg Schwarz    http://home.pages.de/~schwarz/
 georg.schwarz@freenet.de  +49 178 8545053