aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordos-reis <gdr@axiomatics.org>2008-03-26 05:57:19 +0000
committerdos-reis <gdr@axiomatics.org>2008-03-26 05:57:19 +0000
commitc98e47a0c148103da65955acfb3782e37a8fc4c3 (patch)
treef4a461581ed5e50201e1df586e8156873f1e1458 /src
parent68c6afce19df6a92b0569a23bcfe3a73f109b754 (diff)
downloadopen-axiom-c98e47a0c148103da65955acfb3782e37a8fc4c3.tar.gz
Fix shared linking regression
Diffstat (limited to 'src')
-rw-r--r--src/ChangeLog17
-rw-r--r--src/boot/Makefile.in10
-rw-r--r--src/boot/translator.boot2
-rw-r--r--src/clef/Makefile.in5
-rw-r--r--src/graph/view2D/Makefile.in5
-rw-r--r--src/graph/view3D/Makefile.in6
-rw-r--r--src/graph/viewAlone/Makefile.in6
-rw-r--r--src/graph/viewman/Makefile.in6
-rw-r--r--src/hyper/Makefile.in15
-rw-r--r--src/interp/Makefile.in2
-rw-r--r--src/interp/Makefile.pamphlet2
-rw-r--r--src/lib/Makefile.in27
-rw-r--r--src/lisp/Makefile.in1
-rw-r--r--src/lisp/core.lisp.in5
-rw-r--r--src/sman/Makefile.in14
15 files changed, 74 insertions, 49 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 9ced4373..40a75581 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,3 +1,20 @@
+2008-03-26 Gabriel Dos Reis <gdr@cs.tamu.edu>
+
+ * lib/Makefile.in: Explicitly build both static and shared version
+ of libopen-axiom-core.
+ * lisp/Makefile.in: Tidy.
+ * lisp/core.lisp.in: Export $NativeModuleExt.
+ * clef/Makefile.in: Use only static archive.
+ * graph/view2D/Makefile.in: Likewise.
+ * graph/view3D/Makefile.in: Likewise.
+ * graph/viewAlone/Makefile.in: Likewise.
+ * graph/viewman/Makefile.in: Likewise.
+ * hyper/Makefile.in: Likewise.
+ * sman/Makefile.in: Likewise.
+ * boot/Makefile.in: Place bootsys binary in staged starget directory.
+ * boot/translator.boot (loadSystemRuntimeCore): Tidy.
+ * interp/Makefile.pamphlet: Use bootsys from staged target dir.
+
2008-03-25 Gabriel Dos Reis <gdr@cs.tamu.edu>
* interp/bootlex.lisp: Import "sys-globals".
diff --git a/src/boot/Makefile.in b/src/boot/Makefile.in
index 756d59c6..f8d57bd9 100644
--- a/src/boot/Makefile.in
+++ b/src/boot/Makefile.in
@@ -80,14 +80,14 @@ all: all-ax all-boot
all-ax all-boot: stamp
-stamp: $(axiom_build_bindir)/bootsys$(EXEEXT)
+stamp: $(axiom_target_bindir)/bootsys$(EXEEXT)
@rm -f stamp
$(STAMP) $@
## The final `bootsys' image.
-$(axiom_build_bindir)/bootsys$(EXEEXT): stage2/bootsys$(EXEEXT)
- $(mkinstalldirs) $(axiom_build_bindir)
- $(INSTALL_PROGRAM) stage2/bootsys$(EXEEXT) $(axiom_build_bindir)
+$(axiom_target_bindir)/bootsys$(EXEEXT): stage2/bootsys$(EXEEXT)
+ $(mkinstalldirs) $(axiom_target_bindir)
+ $(INSTALL_PROGRAM) $< $@
.PRECIOUS: strap/%.$(FASLEXT)
@@ -209,7 +209,7 @@ stage2/%.clisp: %.boot stage1/stamp stage2/.started
##
mostlyclean-local:
- @rm -f $(axiom_build_bindir)/bootsys$(EXEEXT)
+ @rm -f $(axiom_target_bindir)/bootsys$(EXEEXT)
@rm -rf prev-stage
@rm -rf strap stage1 stage2
@rm -f *.data *.fn
diff --git a/src/boot/translator.boot b/src/boot/translator.boot
index d5020cf2..b5245d92 100644
--- a/src/boot/translator.boot
+++ b/src/boot/translator.boot
@@ -835,5 +835,5 @@ $OpenAxiomCoreModuleLoaded := false
loadSystemRuntimeCore() ==
$OpenAxiomCoreModuleLoaded => nil
loadNativeModule strconc(systemLibraryDirectory(),
- '"libopen-axiom-core.so")
+ '"libopen-axiom-core",$NativeModuleExt)
$OpenAxiomCoreModuleLoaded := true
diff --git a/src/clef/Makefile.in b/src/clef/Makefile.in
index 7e885ff5..eeda85f8 100644
--- a/src/clef/Makefile.in
+++ b/src/clef/Makefile.in
@@ -39,8 +39,9 @@ clef_SOURCES = edible.c
clef_objects = $(clef_SOURCES:.c=.lo)
-clef_LDADD = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+build_libdir = $(top_builddir)/src/lib
+
+clef_LDADD = $(build_libdir)/libspad.la -L$(build_libdir) -lopen-axiom-core
clef_DEPENDENCIES =
diff --git a/src/graph/view2D/Makefile.in b/src/graph/view2D/Makefile.in
index e64ad57b..477ca263 100644
--- a/src/graph/view2D/Makefile.in
+++ b/src/graph/view2D/Makefile.in
@@ -37,7 +37,7 @@ LINC= $(axiom_src_srcdir)/graph/include
# global include files shared by everyone
GINC= $(axiom_src_srcdir)/include
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
bin_PROGRAMS = view2D$(EXEEXT)
@@ -48,8 +48,7 @@ view2D_objects = $(view2D_SOURCES:.c=.lo)
Gfun_objects = ../Gdraws/Gfun.lo
-view2D_LDADD = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+view2D_LDADD = $(build_libdir)/libspad.la -L$(build_libdir) -lopen-axiom-core
view2D_DEPENDENCIES = $(Gfun_objects)
diff --git a/src/graph/view3D/Makefile.in b/src/graph/view3D/Makefile.in
index 897c17c9..d8c4fe79 100644
--- a/src/graph/view3D/Makefile.in
+++ b/src/graph/view3D/Makefile.in
@@ -41,7 +41,7 @@ GINC= $(axiom_src_srcdir)/include
# bitmaps for cursors
BIT= $(axiom_src_srcdir)/graph/include/purty
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
bin_PROGRAMS = view3D$(EXEEXT)
@@ -57,8 +57,8 @@ view3D_objects = $(addprefix $(builddir)/, $(view3D_SOURCES:.c=.lo))
Gfun_objects = ../Gdraws/Gfun.lo
-view3D_LDADD = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+view3D_LDADD = $(build_libdir)/libspad.la \
+ -L$(build_libdir) -lopen-axiom-core
view3D_DEPENDENCIES = $(Gfun_objects)
subdir = src/graph/view3D/
diff --git a/src/graph/viewAlone/Makefile.in b/src/graph/viewAlone/Makefile.in
index 6f679cbe..707f4507 100644
--- a/src/graph/viewAlone/Makefile.in
+++ b/src/graph/viewAlone/Makefile.in
@@ -36,7 +36,7 @@ LINC= $(axiom_src_srcdir)/graph/include
# global include files shared by everyone
GINC= $(axiom_src_srcdir)/include
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
bin_PROGRAMS = viewAlone$(EXEEXT)
@@ -44,8 +44,8 @@ viewAlone_SOURCES = viewAlone.c spoonComp.c spoon2D.c
viewAlone_objects = $(viewAlone_SOURCES:.c=.lo)
-viewAlone_LDADD = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+viewAlone_LDADD = $(build_libdir)/libspad.la \
+ -L$(build_libdir) -lopen-axiom-core
viewAlone_DEPENDENCIES =
subdir = src/graph/viewAlone/
diff --git a/src/graph/viewman/Makefile.in b/src/graph/viewman/Makefile.in
index 2a6f8ac2..9f096bdd 100644
--- a/src/graph/viewman/Makefile.in
+++ b/src/graph/viewman/Makefile.in
@@ -36,7 +36,7 @@ LINC= $(axiom_src_srcdir)/graph/include
# global include files shared by everyone
GINC= $(axiom_src_srcdir)/include
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
bin_PROGRAMS = viewman$(EXEEXT)
@@ -53,8 +53,8 @@ viewman_headers = $(srcdir)/viewman.h \
viewman_DEPENDENCIES =
-viewman_LDFLAGS = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+viewman_LDFLAGS = $(build_libdir)/libspad.la \
+ -L$(build_libdir) -lopen-axiom-core
subdir = src/graph/viewman/
diff --git a/src/hyper/Makefile.in b/src/hyper/Makefile.in
index e19fe2ab..e1847c03 100644
--- a/src/hyper/Makefile.in
+++ b/src/hyper/Makefile.in
@@ -59,7 +59,7 @@ HEADERS = display.h event.h extent.h \
titlebar.h token.h $(axiom_c_macros_h)
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
hypertex_SOURCES = addfile.c cond.c dialog.c display.c event.c extent1.c \
extent2.c form-ext.c group.c halloc.c hash.c hterror.c \
@@ -68,31 +68,30 @@ hypertex_SOURCES = addfile.c cond.c dialog.c display.c event.c extent1.c \
parse-paste.c parse-types.c ReadBitmap.c scrollbar.c \
show-types.c spadint.c titlebar.c
-libspad_la = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+libspad_la = $(build_libdir)/libspad.la
hypertex_objects = $(hypertex_SOURCES:.c=.lo)
-hypertex_LDADD = $(libspad_la)
+hypertex_LDADD = $(libspad_la) -L$(build_libdir) -lopen-axiom-core
hypertex_DEPENDENCIES =
htadd_SOURCES = addfile.c halloc.c hash.c htadd.c hterror.c lex.c
htadd_objects = $(htadd_SOURCES:.c=.lo)
-htadd_LDADD = $(libspad_la)
+htadd_LDADD = $(libspad_la) -L$(build_libdir) -lopen-axiom-core
htadd_DEPENDENCIES =
spadbuf_SOURCES = spadbuf.c
spadbuf_objects = $(spadbuf_SOURCES:.c=.lo)
-spadbuf_LDADD = $(libspad_la)
+spadbuf_LDADD = $(libspad_la) -L$(build_libdir) -lopen-axiom-core
spadbuf_DEPENDENCIES =
hthits_SOURCES = hthits.c
hthits_objects = $(hthits_SOURCES:.c=.lo)
-hthits_LDADD = $(libspad_la)
+hthits_LDADD = $(libspad_la) -L$(build_libdir) -lopen-axiom-core
hthits_DEPENDENCIES =
ex2ht_SOURCES = ex2ht.c
ex2ht_objects = $(ex2ht_SOURCES:.c=.lo)
-ex2ht_LDADD = $(libspad_la)
+ex2ht_LDADD = $(libspad_la) -L$(build_libdir) -lopen-axiom-core
ex2ht_DEPENDENCIES =
subdir = src/hyper/
diff --git a/src/interp/Makefile.in b/src/interp/Makefile.in
index c5e2c4a9..efd93df8 100644
--- a/src/interp/Makefile.in
+++ b/src/interp/Makefile.in
@@ -12,7 +12,7 @@ autoload_objects =
# derived Lisp images (interpsys, AXIOMsys)
LISPSYS= $(axiom_build_bindir)/lisp
-BOOTSYS= $(axiom_build_bindir)/bootsys -- --syslib=$(axiom_target_libdir)
+BOOTSYS= $(axiom_target_bindir)/bootsys -- --syslib=$(axiom_target_libdir)
SAVESYS= interpsys$(EXEEXT)
AXIOMSYS= $(axiom_target_bindir)/AXIOMsys$(EXEEXT)
diff --git a/src/interp/Makefile.pamphlet b/src/interp/Makefile.pamphlet
index d1925c5b..86450182 100644
--- a/src/interp/Makefile.pamphlet
+++ b/src/interp/Makefile.pamphlet
@@ -76,7 +76,7 @@ itself to bootstrap the system). This image is assumed to
have been built (on the build platform) by a previous step in the
make process.
<<environment>>=
-BOOTSYS= $(axiom_build_bindir)/bootsys -- --syslib=$(axiom_target_libdir)
+BOOTSYS= $(axiom_target_bindir)/bootsys -- --syslib=$(axiom_target_libdir)
@
diff --git a/src/lib/Makefile.in b/src/lib/Makefile.in
index 5d2476fd..adc4657a 100644
--- a/src/lib/Makefile.in
+++ b/src/lib/Makefile.in
@@ -62,22 +62,23 @@ subdir = src/lib/
all: all-ax
all-ax all-lib: stamp
-stamp: $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT) \
- $(axiom_target_libdir)/libspad.la
+stamp: $(axiom_target_libdir)/libopen-axiom-core$(SHREXT) \
+ libopen-axiom-core.$(LIBEXT) libspad.la
rm -f stamp
$(STAMP) stamp
-$(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT): \
+$(axiom_target_libdir)/libopen-axiom-core$(SHREXT): \
$(libopen_axiom_core_la_objects)
$(mkinstalldirs) $(axiom_target_libdir)
- $(LIBTOOL) --mode=link $(CC) -shared -o $@ \
- $(libopen_axiom_core_la_objects) @axiom_c_runtime_extra@ \
- -rpath "$(libdir)"/axiom/target/$(target)/lib
+ $(LIBTOOL) --mode=link $(CC) -shared -module -o $@ \
+ $(libopen_axiom_core_la_objects) @axiom_c_runtime_extra@ -lm
-$(axiom_target_libdir)/libspad.la: $(libspad_la_objects)
- $(mkinstalldirs) $(axiom_target_libdir)
- $(LIBTOOL) --mode=link $(CC) -o $@ $(libspad_la_objects) \
- -rpath "$(libdir)"/axiom/target/$(target)/lib
+libopen-axiom-core.$(LIBEXT): $(libopen_axiom_core_la_objects)
+ $(LIBTOOL) --mode=link $(CC) -static -o $@ \
+ $(libopen_axiom_core_la_objects) @axiom_c_runtime_extra@ -lm
+
+libspad.la: $(libspad_la_objects)
+ $(LIBTOOL) --mode=link $(CC) -o $@ $(libspad_la_objects)
.PRECIOUS: %.$(OBJEXT) %.lo
@@ -92,9 +93,9 @@ mostlyclean-local:
@rm -f *.lo *.$(OBJEXT)
clean-local: mostlyclean-local
- @$(LIBTOOL) --mode=clean $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
- @$(LIBTOOL) --mode=clean $(axiom_target_libdir)/libspad.la
- @rm -f $(other_objects)
+ @$(LIBTOOL) --mode=clean $(axiom_target_libdir)/libopen-axiom-core$(SHREXT)
+ @$(LIBTOOL) --mode=clean libopen-axiom-core$(LIBEXT)
+ @$(LIBTOOL) --mode=clean libspad.la
@rm -fr .libs _libs
@rm -f stamp
diff --git a/src/lisp/Makefile.in b/src/lisp/Makefile.in
index c9a76d8d..7d05550f 100644
--- a/src/lisp/Makefile.in
+++ b/src/lisp/Makefile.in
@@ -131,6 +131,7 @@ edit = sed \
-e 's|@host[@]|$(host)|g' \
-e 's|@build[@]|$(build)|g' \
-e 's|@target[@]|$(target)|g' \
+ -e 's|@SHREXT[@]|$(SHREXT)|g' \
-e 's|@void_type[@]|$(void_type)|g' \
-e 's|@char_type[@]|$(char_type)|g' \
-e 's|@int_type[@]|$(int_type)|g' \
diff --git a/src/lisp/core.lisp.in b/src/lisp/core.lisp.in
index 0571a908..52375325 100644
--- a/src/lisp/core.lisp.in
+++ b/src/lisp/core.lisp.in
@@ -71,6 +71,7 @@
"$targetPlatform"
"$faslType"
+ "$NativeModuleExt"
"$systemInstallationDirectory"
"$NativeTypeTable"
@@ -133,6 +134,10 @@
(defconstant |$faslType|
(pathname-type (compile-file-pathname "foo.lisp")))
+;; Extension of file containers for native shared libraries.
+(defconstant |$NativeModuleExt|
+ "@SHREXT@")
+
;;
;; -*- OpenAxiom source file extensions -*-
;;
diff --git a/src/sman/Makefile.in b/src/sman/Makefile.in
index e395b80c..730514d6 100644
--- a/src/sman/Makefile.in
+++ b/src/sman/Makefile.in
@@ -39,28 +39,30 @@ OUTLIB= $(axiom_target_libdir)
# this is where the include files live
INC= $(axiom_src_srcdir)/include
-build_libdir = $(abs_top_builddir)/src/lib
+build_libdir = $(top_builddir)/src/lib
bin_PROGRAMS = session$(EXEEXT) \
spadclient$(EXEEXT) \
sman$(EXEEXT)
-libspad_la = $(axiom_target_libdir)/libspad.la \
- $(axiom_target_libdir)/libopen-axiom-core.$(DLLEXT)
+libspad_la = $(build_libdir)/libspad.la
session_SOURCES = session.c
session_objects = $(session_SOURCES:.c=.lo)
-session_LDADD = $(libspad_la) @axiom_c_runtime_extra@
+session_LDADD = $(libspad_la) @axiom_c_runtime_extra@ \
+ -L$(build_libdir) -lopen-axiom-core
session_DEPENDENCIES =
spadclient_SOURCES = spadclient.c
spadclient_objects = $(spadclient_SOURCES:.c=.lo)
-spadclient_LDADD = $(libspad_la) @axiom_c_runtime_extra@
+spadclient_LDADD = $(libspad_la) @axiom_c_runtime_extra@ \
+ -L$(build_libdir) -lopen-axiom-core
spadclient_DEPENDENCIES =
sman_SOURCES = sman.c
sman_objects = $(sman_SOURCES:.c=.lo) $(top_builddir)/src/driver/utils.lo
-sman_LDADD = $(libspad_la) @axiom_c_runtime_extra@
+sman_LDADD = $(libspad_la) @axiom_c_runtime_extra@ \
+ -L$(build_libdir) -lopen-axiom-core
sman_DEPENDENCIES =