Re: How to make a C++ -module?

Patrick Welche <[email protected]>
Newsgroups gmane.comp.gnu.libtool.general
Message-ID <20160623164038.GG1114@quark>
I just made a sandbox with autoconf-2.69, automake-1.15 and git libtool.
Running the tests on NetBSD-current/amd64, gcc 5.4.0, binutils 2.26, I see
several failures, including:

  61: flags.at:24        passing CXX flags through libtool
      libtool cxx

which appears to be the same problem, as shown at the end of this
message.

If I then replace the libtool script in the srcdir of git libtool with

  #! /bin/sh
  exec /usr/pkg/bin/libtool "$@"

and re-run the tests, I get:

 61: passing CXX flags through libtool               ok

This suggests that something among the patches in

  http://cdn.netbsd.org/pub/pkgsrc/current/pkgsrc/devel/libtool/patches/

(probably patch-ab ?) is allowing me to build a loadable module.


Cheers,

Patrick


61. flags.at:24: testing passing CXX flags through libtool ...
./flags.at:24: { test -n "$CXX" && test "X$CXX" != Xno; } || (exit 77)
./flags.at:24: test g++ != "$CXX" || (g++ -v >/dev/null 2>&1) || (exit 77)
enable shared libraries
./flags.at:24: $LIBTOOL --tag=CXX --mode=compile $compile -c $source
stderr:
stdout:
libtool: compile:  g++ -g -O2 -c a.cpp  -fPIC -DPIC -o .libs/a.o
libtool: compile:  g++ -g -O2 -c a.cpp -o a.o >/dev/null 2>&1
./flags.at:24: $LIBTOOL -n --tag=CXX --mode=compile $compile         $flag-foo -c $source
stderr:
stdout:
libtool: compile:  g++ -g -foo -O2 -c a.cpp  -fPIC -DPIC -o .libs/a.o
libtool: compile:  g++ -g -foo -O2 -c a.cpp -o a.o >/dev/null 2>&1
./flags.at:24: $FGREP " -foo" stdout
stdout:
libtool: compile:  g++ -g -foo -O2 -c a.cpp  -fPIC -DPIC -o .libs/a.o
libtool: compile:  g++ -g -foo -O2 -c a.cpp -o a.o >/dev/null 2>&1
./flags.at:24: $LIBTOOL -n --tag=CXX --mode=link $link     -o program$EXEEXT a.lo $flag-foo
stderr:
stdout:
libtool: link: g++ -g -O2 -o program .libs/a.o -foo  
./flags.at:24: $FGREP " $flag_prefix_prog-foo" stdout
stdout:
libtool: link: g++ -g -O2 -o program .libs/a.o -foo  
./flags.at:24: $LIBTOOL -n --tag=CXX --mode=link $link       -o $output a.lo -rpath /nowhere $flag-foo
stderr:
stdout:

*** Warning: linker path does not have real file for library -lgcc.
*** I have the capability to make that library automatically link in when
*** you link to this library.  But I can only do this if you have a
*** shared version of the library, which you do not appear to have
*** because I did check the linker path looking for a file starting
*** with libgcc and none of the candidates passed a file format test
*** using a regex pattern. Last file checked: /usr/lib/libgcc.a
*** The inter-library dependencies that have been dropped here will be
*** automatically added whenever a program is linked with this library
*** or is declared to -dlopen it.



_______________________________________________
https://lists.gnu.org/mailman/listinfo/libtool
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.