cvsuser 04/05/18 02:22:01
Modified: config/gen/makefiles root.in
config/init/hints linux.pl
Log:
use -fPIC for libnci
Courtesy of Adam Thomason <[EMAIL PROTECTED]>
Revision Changes Path
1.210 +5 -7 parrot/config/gen/makefiles/root.in
Index: root.in
===================================================================
RCS file: /cvs/public/parrot/config/gen/makefiles/root.in,v
retrieving revision 1.209
retrieving revision 1.210
diff -u -w -r1.209 -r1.210
--- root.in 17 May 2004 16:07:48 -0000 1.209
+++ root.in 18 May 2004 09:21:58 -0000 1.210
@@ -1,4 +1,4 @@
-# $Id: root.in,v 1.209 2004/05/17 16:07:48 leo Exp $
+# $Id: root.in,v 1.210 2004/05/18 09:21:58 leo Exp $
###############################################################################
#
@@ -1155,15 +1155,13 @@
###### OS depend targets ##########
# libnci.so used by t/pmc/nci.t
-$(SRC)/libnci$(O): $(SRC)/nci_test.c
-
-$(DYNEXT_DIR)/libnci.so: $(SRC)/nci_test$(O)
+$(DYNEXT_DIR)/libnci.so: $(SRC)/nci_test.c
$(LD) $(LD_SHARED) $(LDFLAGS) \
- $(LD_OUT)$@ $(SRC)/nci_test$(O)
+ $(LD_OUT)$@ $(SRC)/nci_test.c
-$(DYNEXT_DIR)/libnci.dll: $(SRC)/nci_test$(O)
+$(DYNEXT_DIR)/libnci.dll: $(SRC)/nci_test.c
$(LD) $(LD_SHARED) -def:libnci.def $(LDFLAGS) \
- $(LD_OUT)$@ $(SRC)/nci_test$(O)
+ $(LD_OUT)$@ $(SRC)/nci_test.c
# vim ctags
# this needs exuberant-ctags
1.8 +5 -0 parrot/config/init/hints/linux.pl
Index: linux.pl
===================================================================
RCS file: /cvs/public/parrot/config/init/hints/linux.pl,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -w -r1.7 -r1.8
--- linux.pl 29 Apr 2004 19:13:03 -0000 1.7
+++ linux.pl 18 May 2004 09:22:01 -0000 1.8
@@ -3,10 +3,15 @@
if ($libs !~ /-lpthread/) {
$libs .= ' -lpthread';
}
+my $ld_shared = Configure::Data->get('ld_shared');
+if ( $ld_shared !~ /-fPIC/ ) {
+ $ld_shared .= ' -fPIC';
+}
Configure::Data->set(
ccflags => $cflags,
libs => $libs,
+ ld_shared => $ld_shared,
i_lib_pthread => 1, # XXX fake a header entry
linkflags => '-Wl,-E', # --export-dynamic, s. info gcc, ld
link => 'c++',