[Patches] [ python-Patches-761969 ] -DPIC should be added for the -fPIC case

SourceForge.net noreply@sourceforge.net
Tue, 01 Jul 2003 03:39:16 -0700


Patches item #761969, was opened at 2003-06-27 19:22
Message generated for change (Comment added) made by marc
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=305470&aid=761969&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Marc Recht (marc)
Assigned to: Nobody/Anonymous (nobody)
Summary: -DPIC should be added for the -fPIC case

Initial Comment:
AFAIK -DPIC should always added when compiling with
-DPIC.  At least that's what libtool does and shown in
many FAQs (like
http://www.netbsd.org/Documentation/elf.html).
A quick glance on NetBSD-current and FreeBSD (4.8)
shows that it's evaluated in machine/asm.h.

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

>Comment By: Marc Recht (marc)
Date: 2003-07-01 12:39

Message:
Logged In: YES 
user_id=205

So far I've only build tested it on NetBSD-current. And at
least the generated  .so differs (more than between two
builds). 
I've added this to all archs, because AFAIK that's what
libtool does, too. (And every FAQ I've looked at and also
other applications.)

Maybe configure could check if "-fPIC -DPIC" is supported by
the platform ?

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

Comment By: Guido van Rossum (gvanrossum)
Date: 2003-06-30 18:27

Message:
Logged In: YES 
user_id=6380

Adding -DPIC just adds a preprocessor symbol, and not a very
distinguished one. If FreeBSD really needs this particular
#define to work correctly when compiling with -fPIC, perhaps
a FreeBSD-specific patch would be acceptable.

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

Comment By: Andrew I MacIntyre (aimacintyre)
Date: 2003-06-30 12:30

Message:
Logged In: YES 
user_id=250749

I tested this patch on both FreeBSD 48 & 5.1.

AFAICT, this did not affect behaviour of the interpreter
either way.

I note that you've tagged quite a few platforms in this
patch, thus it would need to be tested on all affected
platforms to be accepted in full.

At this time, it isn't clear to me what benefits this patch
gets us.

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

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