Mercurial > hg > octave-max
changeset 4159:e9e2055ad0af
[project @ 2002-11-08 03:27:35 by jwe]
author | jwe |
---|---|
date | Fri, 08 Nov 2002 03:27:35 +0000 |
parents | d837e6375cbc |
children | b822bfbb2277 |
files | src/ChangeLog src/Makefile.in src/main.c src/octave.cc |
diffstat | 4 files changed, 24 insertions(+), 10 deletions(-) [+] |
line wrap: on
line diff
--- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,5 +1,9 @@ 2002-11-07 John W. Eaton <jwe@bevo.che.wisc.edu> + * Makefile.in (liboctinterp.$(LIBEXT)): Include $(XERBLA) here. + (octave.$(EXEEXT)): Not here. + (liboctinterp.$(SHLEXT)): Include $(PIC_XERBLA) here. + * main.c: Move decl for xerbla here from octave.cc. * cutils.c (octave_vsnprintf): Use portable_snprintf to avoid
--- a/src/Makefile.in +++ b/src/Makefile.in @@ -227,15 +227,17 @@ objects: $(OBJECTS) XERBLA = ../libcruft/blas-xtra/xerbla.o +ifdef FPICFLAG + PIC_XERBLA = ../libcruft/blas-xtra/pic/xerbla.o +else + PIC_XERBLA = $(XERBLA) +endif ifeq ($(SHARED_LIBS), true) ifeq ($(STATIC_LIBS), true) LIBRARIES = liboctinterp.$(LIBEXT) liboctinterp.$(SHLEXT_VER) else LIBRARIES = liboctinterp.$(SHLEXT_VER) - ifdef FPICFLAG - XERBLA = ../libcruft/blas-xtra/pic/xerbla.o - endif endif else ifeq ($(STATIC_LIBS), true) @@ -243,14 +245,13 @@ else ## This is not going to work, but hey, you asked for it... LIBRARIES = - XERBLA = endif endif libraries: $(LIBRARIES) .PHONY: libraries -liboctinterp.$(LIBEXT): $(OBJECTS) +liboctinterp.$(LIBEXT): $(OBJECTS) $(XERBLA) rm -f $@ $(TEMPLATE_AR) $(TEMPLATE_ARFLAGS) $@ $^ $(RANLIB) $@ @@ -259,7 +260,7 @@ rm -f $@ $(LN_S) $< $@ -liboctinterp.$(SHLEXT): $(PICOBJ) +liboctinterp.$(SHLEXT): $(PICOBJ) $(PIC_XERBLA) rm -f $@ $(SH_LD) $(SH_LDFLAGS) $(SONAME_FLAGS) -o $@ $^ $(OCTINTERP_LINK_DEPS) @@ -275,7 +276,7 @@ octave$(EXEEXT): stamp-prereq $(LIBRARIES) main.o $(DLD_STATIC_OBJ) $(LD_CXX) $(CPPFLAGS) $(ALL_CXXFLAGS) $(RDYNAMIC_FLAG) \ $(ALL_LDFLAGS) -o $@ \ - main.o $(XERBLA) $(DLD_STATIC_OBJ) \ + main.o $(DLD_STATIC_OBJ) \ $(OCTAVE_LFLAGS) \ $(OCTAVE_LIBS) \ $(LEXLIB) $(BLAS_LIBS) $(FFTW_LIBS) $(LIBS) $(FLIBS)
--- a/src/main.c +++ b/src/main.c @@ -25,12 +25,10 @@ #endif #include "f77-fcn.h" +#include "lo-ieee.h" #include "octave.h" -// Kluge. -extern void F77_FUNC (xerbla, XERBLA) (const char *, int); - int main (int argc, char **argv) {
--- a/src/octave.cc +++ b/src/octave.cc @@ -74,6 +74,9 @@ #include "variables.h" #include <version.h> +// Kluge. +extern "C" void F77_FUNC (xerbla, XERBLA) (const char *, int, long); + extern void install_builtins (void); #if !defined (HAVE_ATEXIT) && defined (HAVE_ON_EXIT) @@ -375,6 +378,14 @@ sysdep_init (); + // The idea here is to force xerbla to be referenced so that we will + // link to our own version instead of the one provided by the BLAS + // library. But octave_NaN should never be -1, so we should never + // actually call xerbla. + + if (octave_NaN == -1) + F77_FUNC (xerbla, XERBLA) ("octave", 13, 6L); + initialize_error_handlers (); install_defaults ();