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:
Matthew Flatt 2009-09-10 19:39:37 +00:00
parent 4c8b0b8b13
commit d4e40e0b25
4 changed files with 18 additions and 6 deletions

View File

@ -65,8 +65,10 @@
(define gcc-cpp-flags
(add-variant-flags (case (string->symbol (path->string (system-library-subpath #f)))
[(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")]
[(i386-darwin) '("-DOS_X" "-DXONX" "-m32")]
[else null])))
(define gcc-compile-flags (append '("-c" "-O2" "-fPIC")

View File

@ -124,6 +124,8 @@
(define win-gcc-linker-flags (list "--dll"))
(define borland-linker-flags (list "/Tpd" "/c"))
(define mac-link-flags (list "-bundle" "-flat_namespace" "-undefined" "suppress"))
(define (get-unix-link-flags)
(case (string->symbol (path->string (system-library-subpath #f)))
[(sparc-solaris i386-solaris) (list "-G")]
@ -138,8 +140,8 @@
(format "-bE:~a/ext.exp" include-dir)
"-bnoentry")]
[(parisc-hpux) (list "-b")]
[(ppc-macosx ppc-darwin i386-macosx i386-darwin)
(list "-bundle" "-flat_namespace" "-undefined" "suppress")]
[(ppc-macosx ppc-darwin) mac-link-flags]
[(i386-macosx i386-darwin) (append mac-link-flags '("-m32"))]
[(i386-cygwin) win-gcc-linker-flags]
[else (list "-fPIC" "-shared")]))

View File

@ -266,8 +266,13 @@
(simplify-path* (resolve-module-path-index i path)))
(filter (lambda (i)
(and (module-path-index? i) (not (lib? i))))
(append-map cdr (module-compiled-imports
(get-module-code path))))))
(append-map cdr (let ([m (get-module-code
path
#:extension-handler
(lambda (path loader?) #f))])
(if m
(module-compiled-imports m)
null))))))
(cons path r)))])))
;; Resources ----------------------------------------------------------------

View File

@ -72,7 +72,10 @@
(define-struct (exn:get-module-code exn) (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)]
#:notify [notify void]
#:source-reader [read-src-syntax read-syntax])