diff --git a/Makefile b/Makefile index 0c426ca5bc..bfaaa3eee4 100644 --- a/Makefile +++ b/Makefile @@ -160,7 +160,7 @@ factor-console: $(DLL_OBJS) $(EXE_OBJS) $(CFLAGS) $(CFLAGS_CONSOLE) -o factor$(EXE_SUFFIX)$(CONSOLE_EXTENSION) $(EXE_OBJS) factor-ffi-test: $(TEST_OBJS) - $(CC) $(LIBPATH) $(CFLAGS) $(SHARED_FLAG) -o libfactor-ffi-test$(DLL_EXTENSION) $(TEST_OBJS) + $(CC) $(LIBPATH) $(CFLAGS) $(FFI_TEST_CFLAGS) $(SHARED_FLAG) -o libfactor-ffi-test$(DLL_EXTENSION) $(TEST_OBJS) clean: rm -f vm/*.o diff --git a/basis/alien/fortran/fortran.factor b/basis/alien/fortran/fortran.factor index 83d56bf9e2..71efa1aa24 100644 --- a/basis/alien/fortran/fortran.factor +++ b/basis/alien/fortran/fortran.factor @@ -5,7 +5,7 @@ byte-arrays combinators combinators.short-circuit fry generalizations kernel lexer macros math math.parser namespaces parser sequences splitting stack-checker vectors vocabs.parser words locals io.encodings.ascii io.encodings.string shuffle effects math.ranges -math.order sorting strings system ; +math.order sorting strings system alien.libraries ; IN: alien.fortran SINGLETONS: f2c-abi gfortran-abi intel-unix-abi intel-windows-abi ; diff --git a/basis/compiler/tests/alien.factor b/basis/compiler/tests/alien.factor index 2aed251676..aa9346f788 100644 --- a/basis/compiler/tests/alien.factor +++ b/basis/compiler/tests/alien.factor @@ -4,7 +4,7 @@ namespaces namespaces tools.test sequences stack-checker stack-checker.errors words arrays parser quotations continuations effects namespaces.private io io.streams.string memory system threads tools.test math accessors combinators -specialized-arrays.float ; +specialized-arrays.float alien.libraries ; << : libfactor-ffi-tests-path ( -- string ) diff --git a/basis/math/blas/ffi/ffi.factor b/basis/math/blas/ffi/ffi.factor index 1749103ce4..5466ad2161 100644 --- a/basis/math/blas/ffi/ffi.factor +++ b/basis/math/blas/ffi/ffi.factor @@ -1,4 +1,5 @@ -USING: alien alien.fortran kernel system combinators ; +USING: alien alien.fortran kernel system combinators +alien.libraries ; IN: math.blas.ffi << diff --git a/basis/pango/cairo/cairo.factor b/basis/pango/cairo/cairo.factor index 7683b78890..45b7a9cb31 100644 --- a/basis/pango/cairo/cairo.factor +++ b/basis/pango/cairo/cairo.factor @@ -3,7 +3,8 @@ ! See http://factorcode.org/license.txt for BSD license. ! ! pangocairo bindings, from pango/pangocairo.h -USING: alien alien.syntax combinators system cairo.ffi ; +USING: alien alien.syntax combinators system cairo.ffi +alien.libraries ; IN: pango.cairo << { @@ -85,4 +86,4 @@ FUNCTION: void pango_cairo_layout_path ( cairo_t* cr, PangoLayout* layout ) ; FUNCTION: void -pango_cairo_error_underline_path ( cairo_t* cr, double x, double y, double width, double height ) ; \ No newline at end of file +pango_cairo_error_underline_path ( cairo_t* cr, double x, double y, double width, double height ) ; diff --git a/core/alien/alien-docs.factor b/core/alien/alien-docs.factor index 398d04e4dd..6bd1d2f53a 100644 --- a/core/alien/alien-docs.factor +++ b/core/alien/alien-docs.factor @@ -266,7 +266,6 @@ $nl { $warning "C does not perform runtime type checking, automatic memory management or array bounds checks. Incorrect usage of C library functions can lead to crashes, data corruption, and security exploits." } { $subsection "loading-libs" } { $subsection "aliens" } -{ $subsection "alien.libraries" } { $subsection "alien-invoke" } { $subsection "alien-callback" } { $subsection "c-data" } diff --git a/vm/Config.linux.x86.64 b/vm/Config.linux.x86.64 index bfd1222496..a02fcb4d6d 100644 --- a/vm/Config.linux.x86.64 +++ b/vm/Config.linux.x86.64 @@ -1,3 +1,4 @@ include vm/Config.linux include vm/Config.x86.64 LIBPATH = -L/usr/X11R6/lib64 -L/usr/X11R6/lib +FFI_TEST_CFLAGS = -fPIC