libtool-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: HP-UX g++ support in MLB


From: libtool-patches
Subject: Re: HP-UX g++ support in MLB
Date: Thu, 15 Mar 2001 16:43:20 -0600
User-agent: Mutt/1.1.12i

On Sat, Mar 03, 2001 at 06:26:11PM -0300, Alexandre Oliva wrote:
> Ok to install in the MLB?

I just tried building ImageMagick 5.3.0 on HP-UX 10.20 with GCC 2.95.2
and I got:
  g++ -shared [blah blah]
/usr/ccs/bin/ld: DP relative code in file /var/tmp/ccgJsPhb.o - shared
library must be position
    independent.  Use +z or +Z to recompile.
collect2: ld returned 1 exit status

The patch below adds -fPIC after -shared which resolved this.

-- 
albert chin (address@hidden)

-- snip snip
Index: ltcf-cxx.sh
===================================================================
RCS file: /home/cvs/libtool/Attic/ltcf-cxx.sh,v
retrieving revision 1.1.2.34
diff -u -3 -p -r1.1.2.34 ltcf-cxx.sh
--- ltcf-cxx.sh 2001/03/06 11:14:53     1.1.2.34
+++ ltcf-cxx.sh 2001/03/15 22:42:25
@@ -270,7 +270,7 @@ case $host_os in
         if test $with_gcc = yes; then
          case "$host_os" in
          hpux9*) archive_cmds='$rm $output_objdir/$soname~$CC -shared ${wl}+b 
${wl}$install_libdir -o $output_objdir/$soname $predep_objects $libobjs 
$deplibs $postdep_objects $compiler_flags~test $output_objdir/$soname = $lib || 
mv $output_objdir/$soname $lib' ;;
-         *) archive_cmds='$CC -shared ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags' ;;
+         *) archive_cmds='$CC -shared -fPIC ${wl}+h ${wl}$soname ${wl}+b 
${wl}$install_libdir -o $lib $predep_objects $libobjs $deplibs $postdep_objects 
$compiler_flags' ;;
          esac
        else
          # FIXME: insert proper C++ library support



reply via email to

[Prev in Thread] Current Thread [Next in Thread]