fix some problems with sandboxes and extension (PR 10381) and Snow Leopard extension building (also demonstrated by PR 10381)
svn: r15964
This commit is contained in:
parent
4c8b0b8b13
commit
d4e40e0b25
|
@ -65,8 +65,10 @@
|
||||||
(define gcc-cpp-flags
|
(define gcc-cpp-flags
|
||||||
(add-variant-flags (case (string->symbol (path->string (system-library-subpath #f)))
|
(add-variant-flags (case (string->symbol (path->string (system-library-subpath #f)))
|
||||||
[(parisc-hpux) '("-D_HPUX_SOURCE")]
|
[(parisc-hpux) '("-D_HPUX_SOURCE")]
|
||||||
[(ppc-macosx i386-macosx) '("-DOS_X")]
|
[(ppc-macosx) '("-DOS_X")]
|
||||||
|
[(i386-macosx) '("-DOS_X" "-m32")]
|
||||||
[(ppc-darwin) '("-DOS_X" "-DXONX")]
|
[(ppc-darwin) '("-DOS_X" "-DXONX")]
|
||||||
|
[(i386-darwin) '("-DOS_X" "-DXONX" "-m32")]
|
||||||
[else null])))
|
[else null])))
|
||||||
|
|
||||||
(define gcc-compile-flags (append '("-c" "-O2" "-fPIC")
|
(define gcc-compile-flags (append '("-c" "-O2" "-fPIC")
|
||||||
|
|
|
@ -124,6 +124,8 @@
|
||||||
(define win-gcc-linker-flags (list "--dll"))
|
(define win-gcc-linker-flags (list "--dll"))
|
||||||
(define borland-linker-flags (list "/Tpd" "/c"))
|
(define borland-linker-flags (list "/Tpd" "/c"))
|
||||||
|
|
||||||
|
(define mac-link-flags (list "-bundle" "-flat_namespace" "-undefined" "suppress"))
|
||||||
|
|
||||||
(define (get-unix-link-flags)
|
(define (get-unix-link-flags)
|
||||||
(case (string->symbol (path->string (system-library-subpath #f)))
|
(case (string->symbol (path->string (system-library-subpath #f)))
|
||||||
[(sparc-solaris i386-solaris) (list "-G")]
|
[(sparc-solaris i386-solaris) (list "-G")]
|
||||||
|
@ -138,8 +140,8 @@
|
||||||
(format "-bE:~a/ext.exp" include-dir)
|
(format "-bE:~a/ext.exp" include-dir)
|
||||||
"-bnoentry")]
|
"-bnoentry")]
|
||||||
[(parisc-hpux) (list "-b")]
|
[(parisc-hpux) (list "-b")]
|
||||||
[(ppc-macosx ppc-darwin i386-macosx i386-darwin)
|
[(ppc-macosx ppc-darwin) mac-link-flags]
|
||||||
(list "-bundle" "-flat_namespace" "-undefined" "suppress")]
|
[(i386-macosx i386-darwin) (append mac-link-flags '("-m32"))]
|
||||||
[(i386-cygwin) win-gcc-linker-flags]
|
[(i386-cygwin) win-gcc-linker-flags]
|
||||||
[else (list "-fPIC" "-shared")]))
|
[else (list "-fPIC" "-shared")]))
|
||||||
|
|
||||||
|
|
|
@ -266,8 +266,13 @@
|
||||||
(simplify-path* (resolve-module-path-index i path)))
|
(simplify-path* (resolve-module-path-index i path)))
|
||||||
(filter (lambda (i)
|
(filter (lambda (i)
|
||||||
(and (module-path-index? i) (not (lib? i))))
|
(and (module-path-index? i) (not (lib? i))))
|
||||||
(append-map cdr (module-compiled-imports
|
(append-map cdr (let ([m (get-module-code
|
||||||
(get-module-code path))))))
|
path
|
||||||
|
#:extension-handler
|
||||||
|
(lambda (path loader?) #f))])
|
||||||
|
(if m
|
||||||
|
(module-compiled-imports m)
|
||||||
|
null))))))
|
||||||
(cons path r)))])))
|
(cons path r)))])))
|
||||||
|
|
||||||
;; Resources ----------------------------------------------------------------
|
;; Resources ----------------------------------------------------------------
|
||||||
|
|
|
@ -72,7 +72,10 @@
|
||||||
(define-struct (exn:get-module-code exn) (path))
|
(define-struct (exn:get-module-code exn) (path))
|
||||||
|
|
||||||
(define (get-module-code path
|
(define (get-module-code path
|
||||||
[sub-path "compiled"] [compiler compile] [extension-handler #f]
|
#:sub-path [sub-path0 "compiled"]
|
||||||
|
#:compile [compile0 compile]
|
||||||
|
#:extension-handler [ext-handler0 #f]
|
||||||
|
[sub-path sub-path0] [compiler compile0] [extension-handler ext-handler0]
|
||||||
#:choose [choose (lambda (src zo so) #f)]
|
#:choose [choose (lambda (src zo so) #f)]
|
||||||
#:notify [notify void]
|
#:notify [notify void]
|
||||||
#:source-reader [read-src-syntax read-syntax])
|
#:source-reader [read-src-syntax read-syntax])
|
||||||
|
|
Loading…
Reference in New Issue
Block a user