[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] GCL on mingw - patches
From: |
Vadim V. Zhytnikov |
Subject: |
[Gcl-devel] GCL on mingw - patches |
Date: |
Mon, 22 Dec 2003 07:14:05 +0300 |
User-agent: |
Mozilla/5.0 (Windows; U; Windows NT 5.1; ru-RU; rv:1.5) Gecko/20031006 |
Hi!
I'm posting a couple of patches intended to fix
GCL problems on mingw. Some of them should be
eventually committed to to CVS (well, maybe
with some modification) others are optional.
In any case with these patches I was able to
build ANSI GCL, latest CVS Maxima and
successfully test both programs.
gcl-pwd.patch - fixes GCL's ./configure failure
due to strange mingw #include "..." behavior.
I don't see that is wrong with it for other
platforms.
gcl-heap-size.patch - removes hard coded 256Mb
heap size limit on mingw. It works. I checked
at least with default 128K maxpege against cons
allocation tests and some heavy tests with Maxima.
gcl-makefile.patch - fixes make install path
and version problem.
Finally, two other patches are included for
convenience:
gcl-pcl.patch is required to build _ANSI_ GCL
as required by current CVS Maxima.
gcl-gcc.patch is required if gcc version is
older than 3.3.X.
--
Vadim V. Zhytnikov
<address@hidden>
<address@hidden>
diff -uNr gcl-2.6.1/configure gcl/configure
--- gcl-2.6.1/configure Wed Dec 3 18:10:36 2003
+++ gcl/configure Sun Dec 21 12:45:08 2003
@@ -3312,8 +3312,8 @@
#include <stdio.h>
#define EXTER
#include "$MP_INCLUDE"
- #include "`pwd`/h/enum.h"
- #include "`pwd`/h/object.h"
+ #include h/enum.h"
+ #include h/object.h"
int main(int argc,char **argv,char **envp) {
FILE *f=fopen("conftest1","w");
fprintf(f,"%u",sizeof(struct contblock));
diff -uNr gcl-2.6.1/h/mingw.defs gcl/h/mingw.defs
--- gcl-2.6.1/h/mingw.defs Wed Sep 24 07:47:58 2003
+++ gcl/h/mingw.defs Sun Dec 21 12:46:08 2003
@@ -22,8 +22,8 @@
# Remove -fno-zero-initialized-in-bss if using gcc less than 3.3.1
# It is needed for the Unexec stuff to work with 3.3.1 at least
-CFLAGS = -fno-zero-initialized-in-bss -Wall -fwritable-strings
-DVOL=volatile -fsigned-char $(PROCESSOR_FLAGS) -I$(GCLDIR)/o
-FINAL_CFLAGS = -fno-zero-initialized-in-bss -Wall -fwritable-strings
-DVOL=volatile -fsigned-char $(PROCESSOR_FLAGS)
+CFLAGS = -Wall -fwritable-strings -DVOL=volatile -fsigned-char
$(PROCESSOR_FLAGS) -I$(GCLDIR)/o
+FINAL_CFLAGS = -Wall -fwritable-strings -DVOL=volatile -fsigned-char
$(PROCESSOR_FLAGS)
O3FLAGS = -O2 -fomit-frame-pointer
O2FLAGS = -O
diff -uNr gcl-new/o/unexnt.c gcl/o/unexnt.c
--- gcl-new/o/unexnt.c Sun Dec 21 14:21:54 2003
+++ gcl/o/unexnt.c Sun Dec 21 14:28:32 2003
@@ -20,6 +20,9 @@
Geoff Voelker (address@hidden) 8-12-94
*/
+
+#include "gclincl.h"
+
#ifndef UNIXSAVE
#include <config.h>
#endif
@@ -955,7 +958,8 @@
unsigned long base = DBEGIN; /* 27MB */
/* unsigned long base = 0x01B00000; */ /* 27MB */
- unsigned long end = 1 << VALBITS; /* 256MB */
+ /* unsigned long end = 1 << VALBITS; */ /* 256MB */
+ unsigned long end = 2*PAGESIZE*MAXPAGE;
void *ptr = NULL;
#define NTHEAP_PROBE_BASE 0
diff -uNr gcl-new/makefile gcl/makefile
--- gcl-new/makefile Sun Dec 21 16:18:30 2003
+++ gcl/makefile Sun Dec 21 16:24:24 2003
@@ -32,6 +32,8 @@
TESTDIR = ansi-tests
#GMP_DIR = gmp3/
+VERSION=`cat majvers`.`cat minvers`
+
all: $(BUILD_BFD) $(PORTDIR)/$(FLISP) command cmpnew/gcl_collectfn.o
lsp/gcl_info.o do-gcl-tk do-info
xgcl: $(PORTDIR)/saved_xgcl
@@ -151,13 +153,13 @@
echo 'PROMPT %promp$%'; \
echo 'FOR %%c IN (CALL DEL) DO %%c %temp%.\setdir.bat'; \
echo 'set cwd=%cd%'; \
- echo 'set libdir=%cd%\..\lib\gcl-2.5.0'; \
+ echo 'set libdir=%cd%\..\lib\gcl-'$(VERSION) ; \
echo 'set unixportdir=%libdir%\unixport'; \
echo 'path %cd%\..\mingw\bin;%PATH%'; \
echo "start %unixportdir%\saved_gcl.exe -dir %unixportdir% -libdir
%libdir% -eval \"(setq si::*allow-gzipped-file* t)\" %1 %2 %3 %4 %5 %6 %7 %8
%9" ) > $(DESTDIR)$(prefix)/bin/gclm.bat ; fi
rm -f $(DESTDIR)$(prefix)/bin/gclfinal.bat
if gcc --version | grep -i mingw >/dev/null 2>&1 ; then (echo 'ECHO
path %1\mingw\bin;%PATH% > gcli.bat'; \
- echo "ECHO start %1\lib\gcl-2.5.0\unixport\saved_gcl.exe -dir
%1\lib\gcl-2.5.0\unixport -libdir %1\lib\gcl-2.5.0 -eval \"(setq
si::*allow-gzipped-file* t)\" %1 %2 %3 %4 %5 %6 %7 %8 %9 >> gcli.bat" ) >
$(DESTDIR)$(prefix)/bin/gclfinal.bat ; fi
+ echo "ECHO start %1\lib\gcl-$(VERSION)\unixport\saved_gcl.exe -dir
%1\lib\gcl-$(VERSION)\unixport -libdir %1\lib\gcl-$(VERSION) -eval \"(setq
si::*allow-gzipped-file* t)\" %1 %2 %3 %4 %5 %6 %7 %8 %9 >> gcli.bat" ) >
$(DESTDIR)$(prefix)/bin/gclfinal.bat ; fi
install:
$(MAKE) install1 "INSTALL_LIB_DIR=$(prefix)/lib/gcl-`cat majvers`.`cat
minvers`" "prefix=$(prefix)" "DESTDIR=$(DESTDIR)"
@@ -255,4 +257,4 @@
(cd go ; $(MAKE) "CFLAGS = -I../h -pg -c -g ")
(cd unixport ; $(MAKE) gcp)
-.INTERMEDIATE: unixport/saved_pcl_gcl
\ No newline at end of file
+.INTERMEDIATE: unixport/saved_pcl_gcl
diff -uNr gcl-new/pcl/makefile gcl/pcl/makefile
--- gcl-new/pcl/makefile Sun Dec 21 18:51:30 2003
+++ gcl/pcl/makefile Sun Dec 21 18:53:06 2003
@@ -19,7 +19,8 @@
'(setq compiler::*default-c-file* t)'\
'(setq compiler::*default-data-file* t)'\
'(setq compiler::*default-system-p* t)' \
- '(setq compiler::*keep-gaz* t)'
+ '(setq compiler::*keep-gaz* t)' \
+ '(si::use-fast-links nil)'
all: $(addsuffix .c,$(AFILES)) $(addsuffix .o,$(AFILES))