develooper Front page | perl.perl5.porters | Postings from April 2006

[PATCH] fix cygwin build

Thread Next
From:
Yitzchak Scott-Thoennes
Date:
April 16, 2006 18:05
Subject:
[PATCH] fix cygwin build
Message ID:
20060417010520.GA2888@efn.org
Building blead on cygwin has been broken for a while, I think by #27518:

gcc -shared -o  cygperl5_9_4.dll -Wl,--out-implib=libperl.dll.a -Wl,--export-all-symbols -Wl,--enable-auto-import -Wl,--stack,8388608 \
-L/usr/local/lib  perl.o malloc.o gv.o toke.o perly.o op.o pad.o regcomp.o dump.o util.o mg.o reentr.o hv.o av.o perl.o run.o pp_hot.o sv.o pp.o scope.o pp_ctl.o pp_sys.o doop.o doio.o regexec.o utf8.o taint.o deb.o universal.o xsutils.o globals.o perlio.o perlapi.o numeric.o mathoms.o locale.o pp_pack.o pp_sort.o cygwin.o -lcrypt -lgdbm_compat
perl.o: In function `perl_alloc':
/home/sthoenna/bleadperl/pp/perl.c:202: multiple definition of `_perl_alloc'
perl.o:/home/sthoenna/bleadperl/pp/perl.c:202: first defined here
perl.o: In function `perl_construct':
/home/sthoenna/bleadperl/pp/perl.c:229: multiple definition of `_perl_construct'
perl.o:/home/sthoenna/bleadperl/pp/perl.c:229: first defined here
perl.o: In function `Perl_nothreadhook':
/home/sthoenna/bleadperl/pp/perl.c:410: multiple definition of `_Perl_nothreadhook'
perl.o:/home/sthoenna/bleadperl/pp/perl.c:410: first defined here
perl.o: In function `perl_destruct':
/home/sthoenna/bleadperl/pp/perl.c:523: multiple definition of `_perl_destruct'
perl.o:/home/sthoenna/bleadperl/pp/perl.c:523: first defined here
 ...

This should fix it (though I haven't tested the non-useshrplib build):

--- perl/cygwin/Makefile.SHs.orig	2004-08-16 00:44:46.000000000 -0700
+++ perl/cygwin/Makefile.SHs	2006-04-16 17:43:39.328125000 -0700
@@ -104,13 +104,13 @@
 
 # library used to make statically linked executables
 # miniperl is linked against it to avoid libperl.dll locking
-$(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj)
-	$(AR) rcu $@ perl$(OBJ_EXT) $(cwobj)
+$(LIBPERL)$(LIB_EXT): $& $(cwobj)
+	$(AR) rcu $@ $(cwobj)
 
 # dll and import library
-$(LIBPERL).dll$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj) ld2
+$(LIBPERL).dll$(LIB_EXT): $& $(cwobj) ld2
 	$(LDLIBPTH) ld2 $(SHRPLDFLAGS) -o $(LIBPERL)$(DLSUFFIX) \
-	perl$(OBJ_EXT) $(cwobj) $(libs)
+	$(cwobj) $(libs)
 
 # How to build executables.
 
@@ -145,8 +145,8 @@
 cwobj = $(obj)
 
 # perl library
-$(LIBPERL)$(LIB_EXT): $& perl$(OBJ_EXT) $(cwobj)
-	$(AR) rcu $@ perl$(OBJ_EXT) $(cwobj)
+$(LIBPERL)$(LIB_EXT): $& $(cwobj)
+	$(AR) rcu $@ $(cwobj)
 
 # How to build executables.
 

Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About