changeset 435:f7b25375c0cf

GCCARGS configure option
author Adam Chlipala <adamc@hcoop.net>
date Tue, 28 Oct 2008 15:05:16 -0400
parents c471345f5165
children 024478c34f4d
files CHANGELOG configure configure.ac src/compiler.sml src/config.sig src/config.sml.in
diffstat 6 files changed, 18 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGELOG	Mon Oct 27 08:27:45 2008 -0400
+++ b/CHANGELOG	Tue Oct 28 15:05:16 2008 -0400
@@ -1,3 +1,9 @@
+========
+20081028
+========
+
+- Add GCCARGS configure option
+
 ========
 20081027
 ========
--- a/configure	Mon Oct 27 08:27:45 2008 -0400
+++ b/configure	Tue Oct 28 15:05:16 2008 -0400
@@ -618,6 +618,7 @@
 LIB
 INCLUDE
 SITELISP
+GCCARGS
 do_not_edit
 LIBOBJS
 LTLIBOBJS'
@@ -1665,6 +1666,7 @@
 
 
 
+
 # finish the configure script and generate various files; ./configure
 # will apply variable substitutions to <filename>.in to generate <filename>;
 # I find it useful to mark generated files as read-only so I don't
@@ -2365,12 +2367,13 @@
 LIB!$LIB$ac_delim
 INCLUDE!$INCLUDE$ac_delim
 SITELISP!$SITELISP$ac_delim
+GCCARGS!$GCCARGS$ac_delim
 do_not_edit!$do_not_edit$ac_delim
 LIBOBJS!$LIBOBJS$ac_delim
 LTLIBOBJS!$LTLIBOBJS$ac_delim
 _ACEOF
 
-  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 44; then
+  if test `sed -n "s/.*$ac_delim\$/X/p" conf$$subs.sed | grep -c X` = 45; then
     break
   elif $ac_last_try; then
     { { echo "$as_me:$LINENO: error: could not make $CONFIG_STATUS" >&5
@@ -2712,4 +2715,5 @@
   lib directory:       LIB       $LIB
   include directory:   INCLUDE   $INCLUDE
   site-lisp directory: SITELISP  $SITELISP
+  Extra GCC args:      GCCARGS   $GCCARGS
 EOF
--- a/configure.ac	Mon Oct 27 08:27:45 2008 -0400
+++ b/configure.ac	Tue Oct 28 15:05:16 2008 -0400
@@ -56,6 +56,7 @@
 AC_SUBST(LIB)
 AC_SUBST(INCLUDE)
 AC_SUBST(SITELISP)
+AC_SUBST(GCCARGS)
 AC_SUBST(do_not_edit)
 
 # finish the configure script and generate various files; ./configure
@@ -98,4 +99,5 @@
   lib directory:       LIB       $LIB
   include directory:   INCLUDE   $INCLUDE
   site-lisp directory: SITELISP  $SITELISP
+  Extra GCC args:      GCCARGS   $GCCARGS
 EOF
--- a/src/compiler.sml	Mon Oct 27 08:27:45 2008 -0400
+++ b/src/compiler.sml	Tue Oct 28 15:05:16 2008 -0400
@@ -511,7 +511,7 @@
         val urweb_o = clibFile "urweb.o"
         val driver_o = clibFile "driver.o"
 
-        val compile = "gcc -Wstrict-prototypes -Werror -O3 -I include -c " ^ cname ^ " -o " ^ oname
+        val compile = "gcc " ^ Config.gccArgs ^ " -Wstrict-prototypes -Werror -O3 -I include -c " ^ cname ^ " -o " ^ oname
         val link = "gcc -Werror -O3 -lm -pthread " ^ libs ^ " " ^ urweb_o ^ " " ^ oname ^ " " ^ driver_o ^ " -o " ^ ename
     in
         if not (OS.Process.isSuccess (OS.Process.system compile)) then
--- a/src/config.sig	Mon Oct 27 08:27:45 2008 -0400
+++ b/src/config.sig	Tue Oct 28 15:05:16 2008 -0400
@@ -6,4 +6,6 @@
 
     val libUr : string
     val libC : string
+
+    val gccArgs : string
 end
--- a/src/config.sml.in	Mon Oct 27 08:27:45 2008 -0400
+++ b/src/config.sml.in	Tue Oct 28 15:05:16 2008 -0400
@@ -10,4 +10,6 @@
 val libC = OS.Path.joinDirFile {dir = lib,
                                 file = "c"}
 
+val gccArgs = "@GCCARGS@"
+
 end