- ECL now ships with ASDF version 1.596
+ - The variables C:*USER-CC-FLAGS* and C:*USER-LD-FLAGS* are lists of strings
+ which can be customized by the user to change the behavior of the C compiler
+ and the linker. Note, however, that the flags that ECL uses may take
+ priority.
+
;;; Local Variables: ***
;;; mode:text ***
;;; fill-column:79 ***
"*COMPILE-VERBOSE*"
"*CC*"
"*CC-OPTIMIZE*"
+ "*USER-CC-FLAGS*"
+ "*USER-LD-FLAGS*"
"BUILD-ECL"
"BUILD-PROGRAM"
"BUILD-FASL"
(defvar *cc-optimize* #-msvc "-O"
#+msvc "@CFLAGS_OPTIMIZE@")
-(defvar *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@[~S~] ~A"
- #+msvc "~A -Fe~S~* ~{~S ~} ~@[~S~] ~A")
+(defvar *ld-format* #-msvc "~A -o ~S -L~S ~{~S ~} ~@[~S~]~{ '~A'~} ~A"
+ #+msvc "~A -Fe~S~* ~{~S ~} ~@[~S~]~{ '~A'~} ~A")
-(defvar *cc-format* #-msvc "~A \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\""
- #+msvc "~A -I\"~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -Fo\"~A\"")
+(defvar *cc-format* #-msvc "~A \"-I~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -o \"~A\"~{ '~A'~}"
+ #+msvc "~A -I\"~A\" ~A ~:[~*~;~A~] -w -c \"~A\" -Fo\"~A\"~{ '~A'~}")
#-dlopen
(defvar *ld-flags* "@LDFLAGS@ -lecl @CORE_LIBS@ @FASL_LIBS@ @LIBS@")
(defvar *ld-bundle-flags* #-msvc "@BUNDLE_LDFLAGS@ @LDFLAGS@ -lecl @FASL_LIBS@ @LIBS@"
#+msvc "@BUNDLE_LDFLAGS@ @LDFLAGS@ ecl.lib @CLIBS@")
+(defvar *user-ld-flags* '()
+"Flags and options to be passed to the linker when building FASL, shared libraries
+and standalone programs. It is not required to surround values with quotes or use
+slashes before special characters.")
+
+(defvar *user-cc-flags* '()
+"Flags and options to be passed to the C compiler when building FASL, shared libraries
+and standalone programs. It is not required to surround values with quotes or use
+slashes before special characters.")
+
(defvar +shared-library-prefix+ "@SHAREDPREFIX@")
(defvar +shared-library-extension+ "@SHAREDEXT@")
(defvar +shared-library-format+ "@SHAREDPREFIX@~a.@SHAREDEXT@")
(fix-for-mingw (ecl-library-directory))
options
*ld-rpath*
+ *user-ld-flags*
*ld-flags*))
#+msvc
(embed-manifest-file o-pathname :program)
(fix-for-mingw (ecl-library-directory))
options
*ld-rpath*
+ *user-ld-flags*
(dll-extra-flags o-pathname)))
#+msvc
(embed-manifest-file o-pathname :dll)
(let ((lib-file (compile-file-pathname o-pathname :type :lib)))
(safe-system
(format nil
- "gcc -shared -o ~S -L~S ~{~S ~} ~@[~S~] ~@?"
+ "gcc -shared -o ~S -L~S ~{~S ~} ~@[~S~]~{ '~A'~} ~@?"
(si::coerce-to-filename o-pathname)
(fix-for-mingw (ecl-library-directory))
options
*ld-rpath*
+ *user-ld-flags*
*ld-shared-flags*))))
#+dlopen
(fix-for-mingw (ecl-library-directory))
options
*ld-rpath*
+ *user-ld-flags*
(bundle-extra-flags init-name o-pathname)))
#+msvc
(embed-manifest-file o-pathname :fasl)
#+(or mingw32)
(safe-system
(format nil
- "gcc -shared -o ~S -Wl,--export-all-symbols -L~S ~{~S ~} ~@[~S~] ~A"
+ "gcc -shared -o ~S -Wl,--export-all-symbols -L~S ~{~S ~} ~@[~S~]~{ '~A'~} ~A"
(si::coerce-to-filename o-pathname)
(fix-for-mingw (ecl-library-directory))
options
*ld-rpath*
+ *user-ld-flags*
*ld-bundle-flags*)))
(defconstant +lisp-program-header+ "
(fix-for-mingw (ecl-include-directory))
*cc-flags* (>= (cmp-env-optimization 'speed) 2) *cc-optimize*
(si::coerce-to-filename c-pathname)
- (si::coerce-to-filename o-pathname))
+ (si::coerce-to-filename o-pathname)
+ *user-cc-flags*)
; Since the SUN4 assembler loops with big files, you might want to use this:
; (format nil
; "~A ~@[~*-O1~] -S -I. -I~A -w ~A ; as -o ~A ~A"