This patch changes the makefiles to call LD rather than CC where 
appropriate.

This doesn't address the linking of shared libs.  I'll look into that next.

Index: Configure.pl
===================================================================
RCS file: /home/perlcvs/parrot/Configure.pl,v
retrieving revision 1.63
diff -u -r1.63 Configure.pl
--- Configure.pl        1 Jan 2002 19:45:24 -0000       1.63
+++ Configure.pl        2 Jan 2002 04:59:16 -0000
@@ -137,7 +137,7 @@
     ld_debug      => '',                  # include debug info in executable
 
     perl          => $^X,
-    test_prog     => 'test_parrot' . $Config{_exe},
+    test_prog     => 'test_parrot',
     debugging     => $opt_debugging,
     rm_f          => 'rm -f',
     rm_rf         => 'rm -rf',
@@ -675,7 +675,7 @@
     my $name;
     $name = shift;
     $name = "test" unless $name;
-    system("$c{cc} $c{ccflags} -I./include -o test_siz$c{exe} $name.c") and die "C 
compiler died!";
+    system("$c{cc} $c{ccflags} -I./include $c{ld_out}test_siz$c{exe} $name.c") and 
+die "C compiler died!";
 }
 
 
Index: Makefile.in
===================================================================
RCS file: /home/perlcvs/parrot/Makefile.in,v
retrieving revision 1.98
diff -u -r1.98 Makefile.in
--- Makefile.in 2 Jan 2002 00:55:03 -0000       1.98
+++ Makefile.in 2 Jan 2002 04:59:16 -0000
@@ -108,8 +108,8 @@
 #
 ###############################################################################
 
-TEST_PROG = ${test_prog}
-TEST_PROG_SO = ${test_prog}_so
+TEST_PROG = ${test_prog}${exe}
+TEST_PROG_SO = ${test_prog}_so${exe}
 PDUMP = pdump${exe}
 LINT = lclint
 LINTFLAGS = +showscan +posixlib -weak +longintegral +matchanyintegral -formattype
@@ -136,7 +136,7 @@
 mops: examples/assembly/mops${exe} examples/mops/mops${exe}
 
 $(TEST_PROG): test_main$(O) $(GEN_HEADERS) $(O_FILES) Parrot/OpLib/core.pm 
Parrot/PMC.pm
-       $(CC) $(CFLAGS) -o $(TEST_PROG) $(O_FILES) test_main$(O) $(C_LIBS)
+       $(LD) ${ld_out}$(TEST_PROG) $(O_FILES) test_main$(O) $(C_LIBS)
 
 
 ###############################################################################
@@ -156,7 +156,7 @@
 shared: blib_lib blib/lib/libparrot$(SO) blib/lib/libcore_prederef$(SO) 
$(TEST_PROG_SO)
 
 blib/lib/libparrot$(SO).${VERSION}: $(O_FILES)
-       $(CC) -shared -Wl,-soname,libparrot$(SO).${MAJOR} -o 
blib/lib/libparrot$(SO).${VERSION} $(O_FILES)
+       $(LD) -shared -Wl,-soname,libparrot$(SO).${MAJOR} -o 
+blib/lib/libparrot$(SO).${VERSION} $(O_FILES)
 
 blib/lib/libparrot$(SO).${MAJOR}.${MINOR}: blib/lib/libparrot$(SO).${VERSION}
        rm -f $@
@@ -171,7 +171,7 @@
        cd blib/lib; ln -s libparrot$(SO).${MAJOR} libparrot$(SO)
 
 blib/lib/libcore_prederef$(SO).${VERSION}: core_ops_prederef$(O)
-       $(CC) -shared -Wl,-soname,libparrot$(SO).${MAJOR} -o 
blib/lib/libcore_prederef$(SO).${VERSION} core_ops_prederef$(O)
+       $(LD) -shared -Wl,-soname,libparrot$(SO).${MAJOR} -o 
+blib/lib/libcore_prederef$(SO).${VERSION} core_ops_prederef$(O)
 
 blib/lib/libcore_prederef$(SO).${MAJOR}.${MINOR}: 
blib/lib/libcore_prederef$(SO).${VERSION}
        rm -f $@
@@ -186,7 +186,7 @@
        cd blib/lib; ln -s libcore_prederef$(SO).${MAJOR} libcore_prederef$(SO)
 
 $(TEST_PROG_SO): test_main$(O) blib/lib/libparrot$(SO) Parrot/OpLib/core.pm 
Parrot/PMC.pm
-       $(CC) $(CFLAGS) -o $(TEST_PROG) test_main$(O) $(C_LIBS) -L blib/lib -lparrot
+       $(LD) ${ld_out}$(TEST_PROG) test_main$(O) $(C_LIBS) -L blib/lib -lparrot
 
 
 #
@@ -194,7 +194,7 @@
 #
 
 $(PDUMP): pdump$(O) $(O_FILES)
-       $(CC) $(CFLAGS) -o $(PDUMP) $(O_FILES) pdump$(O) $(C_LIBS)
+       $(LD) ${ld_out}$(PDUMP) $(O_FILES) pdump$(O) $(C_LIBS)
 
 
 ###############################################################################
@@ -228,7 +228,7 @@
        $(PERL) pbc2c.pl examples/assembly/mops.pbc > examples/assembly/mops.c
 
 examples/assembly/mops${exe}: examples/assembly/mops$(O) $(O_FILES)
-       $(CC) $(CFLAGS) -o examples/assembly/mops${exe} examples/assembly/mops$(O) 
$(O_FILES) $(C_LIBS)
+       $(LD) ${ld_out}examples/assembly/mops${exe} examples/assembly/mops$(O) 
+$(O_FILES) $(C_LIBS)
 
 
 ###############################################################################
@@ -240,7 +240,7 @@
 examples/mops/mops$(O): examples/mops/mops.c
 
 examples/mops/mops${exe}: examples/mops/mops$(O) platform$(O)
-       $(CC) $(CFLAGS) -o examples/mops/mops${exe} examples/mops/mops$(O) 
platform$(O) $(C_LIBS)
+       $(LD) ${ld_out}examples/mops/mops${exe} examples/mops/mops$(O) platform$(O) 
+$(C_LIBS)
 
 
 ###############################################################################
Index: docs/Makefile
===================================================================
RCS file: /home/perlcvs/parrot/docs/Makefile,v
retrieving revision 1.4
diff -u -r1.4 Makefile
--- docs/Makefile       1 Jan 2002 20:23:46 -0000       1.4
+++ docs/Makefile       2 Jan 2002 04:59:16 -0000
@@ -1,4 +1,4 @@
-PERL = /usr/bin/perl
+PERL = perl
 RM_F = rm -f
 
 all: packfile-c.pod packfile-perl.pod core_ops.pod


Reply via email to