[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Gcl-devel] steps to compile gcl 2.7.0 (CVS head) on Mac OS X
From: |
Aurelien Chanudet |
Subject: |
[Gcl-devel] steps to compile gcl 2.7.0 (CVS head) on Mac OS X |
Date: |
Thu, 16 Oct 2003 18:46:58 +0200 |
Hi all,
Below are the steps I take to build GCL for Mac OS X 10.2.
1- Assuming bash, the shell needs to be configured as follows:
# For ACL2
ulimit -s 8192
# GNU sed is available from Fink
alias seg="gsed"
export MACOSX_DEPLOYMENT_TARGET=10.2
if [ -z "$LIBRARY_PATH" ]; then
export LIBRARY_PATH=/sw/lib
else
export LIBRARY_PATH=/sw/lib:$LIBRARY_PATH
fi
export LIBRARY_PATH
if [ -z "$C_INCLUDE_PATH" ]; then
C_INCLUDE_PATH=/sw/include
else
C_INCLUDE_PATH=/sw/include:$C_INCLUDE_PATH
fi
export C_INCLUDE_PATH
export CPPFLAGS="-no-cpp-precomp"
2- The following patches need to be applied:
--- main.c 14 Sep 2003 02:43:07 -0000 1.33
+++ main.c 16 Oct 2003 16:30:43 -0000
@@ -111,6 +111,11 @@
struct rlimit rl;
#endif
+#if defined(DARWIN)
+ extern void init_darwin_zone_compat ();
+ init_darwin_zone_compat ();
+#endif
+
#ifdef RECREATE_HEAP
RECREATE_HEAP
#endif
--- unixfasl.c 14 Sep 2003 02:43:08 -0000 1.5
+++ unixfasl.c 16 Oct 2003 16:34:10 -0000
@@ -282,7 +282,7 @@
static int
faslink(object faslfile, object ldargstring)
{
-#if defined(__linux__) && defined(__ELF__)
+#if (defined(__linux__) && defined(__ELF__)) || defined(DARWIN)
FEerror("faslink() not supported for ELF yet",0);
return 0;
#else
--- sgbc.c 14 Sep 2003 02:43:08 -0000 1.11
+++ sgbc.c 16 Oct 2003 16:29:24 -0000
@@ -1440,9 +1446,15 @@
#ifndef BSD
INSTALL_MPROTECT_HANDLER;
#endif
+
+#if !defined(DARWIN)
/* if (SIGSEGV == SIGPROTV) */
segmentation_catcher(SIGSEGV);
-
+#else
+ /* segmentation_catcher(SIGBUS,code,scp); */
+ /* for the sake of exactness */
+ segmentation_catcher(SIGBUS);
+#endif
}
--- makefile 24 Sep 2003 16:30:12 -0000 1.48
+++ makefile 16 Oct 2003 16:35:15 -0000
@@ -18,6 +18,7 @@
libgclp.a: $(ODIR)/gcllib.a
cp $< $@
+ ranlib $@
gmpfiles: $(shell find ../$(GMPDIR) -name "*.o" |grep -v '\.lib')
rm -rf gmp
@@ -116,30 +117,30 @@
libgcl.a: $(FIRST_FILE) $(OBJS) sys_gcl.o $(LAST_FILE) gmpfiles
bfdfiles
rm -rf $@
- ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
+ libtool -static -o $@ $(filter %.o,$^) $(shell find gmp bfd
-name "*.o")
libpre_gcl.a: $(FIRST_FILE) $(OOBJS) sys_pre_gcl.o $(LAST_FILE)
gmpfiles bfdfiles
rm -rf $@
- ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
+ libtool -static -o $@ $(filter %.o,$^) $(shell find gmp bfd
-name "*.o")
libmod_gcl.a: $(FIRST_FILE) $(OBJS) $(MODOBJS) sys_mod_gcl.o
$(LAST_FILE) gmpfiles bfdfiles
rm -rf $@
- ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
+ libtool -static -o $@ $(filter %.o,$^) $(shell find gmp bfd
-name "*.o")
libxgcl.a: libgcl.a
ln -snf $< $@
libansi_gcl.a: $(FIRST_FILE) $(OBJS) $(ANSIOBJS) sys_ansi_gcl.o
$(LAST_FILE) gmpfiles bfdfiles
rm -rf $@
- ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
+ libtool -static -o $@ $(filter %.o,$^) $(shell find gmp bfd
-name "*.o")
libpcl_gcl.a: $(FIRST_FILE) $(OBJS) $(PCLOBJS) sys_pcl_gcl.o
$(LAST_FILE) gmpfiles bfdfiles
rm -rf $@
- ar rs $@ $(filter %.o,$^) $(shell find gmp bfd -name "*.o")
+ libtool -static -o $@ $(filter %.o,$^) $(shell find gmp bfd
-name "*.o")
raw_%: lib%.a libgclp.a $(SYSTEM_OBJS) $(EXTRAS)
$(CC) -o raw_$*$(EXE) $(filter %.o,$^) \
- -L. $(EXTRA_LD_LIBS) $(LD_LIBS_PRE) -l$* $(LD_LIBS_POST)
+ -L. $(EXTRA_LD_LIBS) $(LD_LIBS_PRE) -l$*
$(LD_LIBS_POST) -llinkedit
clean:
rm -rf saved_*$(EXE) raw_*$(EXE) *.o core a.out $(RSYM) \
3- Configure with:
./configure --enable-machine=powerpc-macosx --enable-debug \
--disable-statsysbfd --enable-custreloc
Aurelien
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Gcl-devel] steps to compile gcl 2.7.0 (CVS head) on Mac OS X,
Aurelien Chanudet <=