[Patches] [ python-Patches-595821 ] --witch-cxx=c++ and correct LINKCC

noreply@sourceforge.net noreply@sourceforge.net
Fri, 16 Aug 2002 07:32:46 -0700


Patches item #595821, was opened at 2002-08-15 22:06
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=595821&group_id=5470

Category: Build
Group: Python 2.2.x
Status: Open
Resolution: None
Priority: 5
Submitted By: Jochen Küpper (kuepper)
Assigned to: Nobody/Anonymous (nobody)
Summary: --witch-cxx=c++ and correct LINKCC

Initial Comment:
Here LINKCC is not determined correctly when using
configure --with-cxx=c++

This is a RedHat-7.1 based system, gcc-3.2, python from
cvs.

The following patch against configure.in from
"release22-maint" might be a little overkill, but it
makes sure that the linker uses (and finds) libstdc++:

Index: configure.in
===================================================================
RCS file: /cvsroot/python/python/dist/src/configure.in,v
retrieving revision 1.288.6.6
diff -u -r1.288.6.6 configure.in
--- configure.in        2 Jun 2002 17:34:47 -0000     
 1.288.6.6
+++ configure.in        16 Aug 2002 02:04:47 -0000
@@ -279,7 +279,7 @@
         if test -z "$CXX"; then
               LINKCC="\ \"
         else
-              echo 'int main(){return 0;}' >
conftest.$ac_ext
+              echo '#include <string> int
main(){string c('Hello'); return 0;}' > conftest.$ac_ext
               $CXX -c conftest.$ac_ext 2>&5
               if $CC -o conftest$ac_exeext
conftest.$ac_objext 2>&5 \
                  && test -s conftest$ac_exeext &&
./conftest$ac_exeext



----------------------------------------------------------------------

>Comment By: Jochen Küpper (kuepper)
Date: 2002-08-16 10:32

Message:
Logged In: YES 
user_id=19849

I did

./configure --with-cxx=c++ && make

and LINKCC was set to gcc.  So later on when linking the
exectutable I get unresolved references, i.e.

Modules/ccpython.o(.eh_frame+0x11): undefined reference to
`__gxx_personality_v0'

These are defined in libstdc++.  If LINKCC is set to c++,
these go away, 'cause it knows where to find these symbols.

In the current test for LINKCC nevertheless gcc ($CC) is
good enough to link the conftest, so it is decided to use
that for python.

The patch merely supplies a conftest that really requires a
C++ linker.


----------------------------------------------------------------------

Comment By: Martin v. Löwis (loewis)
Date: 2002-08-16 03:14

Message:
Logged In: YES 
user_id=21627

Can you please elaborate what exactly you mean by "not
determined correctly"?

What did you do, what happened, what did you expect to
happen, why do you think the observed behaviour is incorrect?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=595821&group_id=5470