develooper Front page | perl.perl5.porters | Postings from June 2002

Re: Binary compatibility broken @13746

Thread Previous | Thread Next
From:
Ilya Zakharevich
Date:
June 28, 2002 10:46
Subject:
Re: Binary compatibility broken @13746
Message ID:
20020628134145.A26621@math.ohio-state.edu
On Thu, Mar 14, 2002 at 06:49:27PM -0500, Ilya Zakharevich wrote:
> Given the result (apparently, not much), here is the necessary fix.
> In addition to creation of necessary entry points, it also automates
> the build of backward-compatibility shim (make perlshim_dll).

Looks like it was not included (together with many other patches of
mine, sigh).

Here is the part which automates the binary compatibility shim.

Enjoy,
Ilya

--- ./os2/Makefile.SHs-pre-shim	Thu Mar  7 18:29:46 2002
+++ ./os2/Makefile.SHs	Wed Mar 13 19:27:52 2002
@@ -83,7 +83,7 @@ perl.imp: perl5.def
 	perlrexx test_prep_perl_ test_prep_perl_sys test_prep_perl_stat \
 	test_prep_perl_stat_aout test_prep_various \
 	stat_aout_harness aout_harness stat_harness sys_harness all_harness \
-	stat_aout_test aout_test stat_test sys_test all_test
+	stat_aout_test aout_test stat_test sys_test all_test perlshim_dll perlrexx
 
 perl_dll: $(PERL_DLL)
 
@@ -178,10 +178,41 @@ SYS_CLDFLAGS = $(STAT_CLDFLAGS) -Zsys
 perl_sys: $& perlmain$(OBJ_EXT) $(LIBPERL) $(DYNALOADER) $(static_ext) ext.libs
 	$(SHRPENV) $(CC) $(SYS_CLDFLAGS) $(CCDLFLAGS) -o $@ perlmain$(OBJ_EXT) $(DYNALOADER) $(static_ext) $(LIBPERL) `cat ext.libs` $(libs) -Zlinker /map/PM:VIO
 
-installcmd : 
-	@perl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
+installcmd : miniperl
+	@./miniperl -e 'die qq{Give the option INSTALLCMDDIR=... to make!} if $$ARGV[0] eq ""' $(INSTALLCMDDIR)
 	./miniperl -Ilib os2/perl2cmd.pl $(INSTALLCMDDIR)
 
+PREV_DLL_HEX=E0AC
+PREV_DLL_VERSION=5.00553
+PERLSHIM_DLL=perl$(PREV_DLL_HEX).dll
+
+shim_dll_check : 
+	@./miniperl -e 'die qq{Give the option PREV_DLL_HEX=... to make!} if $$ARGV[0] eq ""' $(PREV_DLL_HEX)
+
+perl5shim.def-leader: miniperl
+	@echo Building shim DLL named $(PERLSHIM_DLL)
+	@echo "  " for compatibility with modules for version $(PREV_DLL_VERSION).
+	@echo "  " Remove and remake perl5shim.def-leader with arguments similar to
+	@echo "     " make perlshim_dll PREV_DLL_HEX=E0AC PREV_DLL_VERSION=5.00553
+	@echo "  " if you want compatibility with other versions
+	echo "LIBRARY 'perl$(PREV_DLL_HEX)' INITINSTANCE TERMINSTANCE"	> perl5shim.def-tmp
+	echo DESCRIPTION "'@#perl5-porters@perl.org:`miniperl -Ilib -MConfig -e 'print \$$]'`#@ Forwarder for Perl modules compiled for $(PREV_DLL_VERSION) -> Perl `miniperl -Ilib -MConfig -e 'print \$$Config{version}'`'"	>>perl5shim.def-tmp
+	echo CODE LOADONCALL				>>perl5shim.def-tmp
+	echo DATA LOADONCALL NONSHARED MULTIPLE		>>perl5shim.def-tmp
+	echo EXPORTS					>>perl5shim.def-tmp
+	sh mv-if-diff perl5shim.def-tmp $@
+
+perl5shim.def: perl5shim.def-leader perl5.def miniperl
+	cp perl5shim.def-leader $@
+	./miniperl -wnle 'next if 0../EXPORTS/; print qq(  "$$1") if /"(\w+)"/' perl5.def >> $@
+
+# The warnings are written to STDOUT !!!
+$(PERLSHIM_DLL): perl5shim.def libperl.lib
+	gcc -Zomf -Zdll -o $@ perl5shim.def -s -llibperl | egrep -v "warning L4085:"
+	@echo ...Warnings L4085 ignored!
+
+perlshim_dll: $(PERLSHIM_DLL)
+
 # Aout section:
 
 aout_obj = $(addsuffix $(AOUT_OBJ_EXT),$(basename $(obj)))
@@ -265,7 +296,6 @@ aout_install.perl: perl_ installperl
 	./perl_ installperl
 
 perlrexx: $(PERLREXX_DLL)
-	@sh -c true
 
 perlrexx.c: os2/perlrexx.c
 	@cp -f os2/$@ $@


Thread Previous | 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