summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--CHANGELOG6
-rwxr-xr-xconfigure6
-rw-r--r--configure.ac2
-rw-r--r--src/compiler.sml2
-rw-r--r--src/config.sig2
-rw-r--r--src/config.sml.in2
6 files changed, 18 insertions, 2 deletions
diff --git a/CHANGELOG b/CHANGELOG
index 1c20780e..aca01ea7 100644
--- a/CHANGELOG
+++ b/CHANGELOG
@@ -1,4 +1,10 @@
========
+20081028
+========
+
+- Add GCCARGS configure option
+
+========
20081027
========
diff --git a/configure b/configure
index e205575b..e34c6b57 100755
--- a/configure
+++ b/configure
@@ -618,6 +618,7 @@ BIN
LIB
INCLUDE
SITELISP
+GCCARGS
do_not_edit
LIBOBJS
LTLIBOBJS'
@@ -1665,6 +1666,7 @@ do_not_edit="Do not edit this file. It was generated automatically from"
+
# 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 @@ BIN!$BIN$ac_delim
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 @@ Ur/Web configuration:
lib directory: LIB $LIB
include directory: INCLUDE $INCLUDE
site-lisp directory: SITELISP $SITELISP
+ Extra GCC args: GCCARGS $GCCARGS
EOF
diff --git a/configure.ac b/configure.ac
index dee2bc1b..25196f76 100644
--- a/configure.ac
+++ b/configure.ac
@@ -56,6 +56,7 @@ AC_SUBST(BIN)
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 @@ Ur/Web configuration:
lib directory: LIB $LIB
include directory: INCLUDE $INCLUDE
site-lisp directory: SITELISP $SITELISP
+ Extra GCC args: GCCARGS $GCCARGS
EOF
diff --git a/src/compiler.sml b/src/compiler.sml
index 5d48287b..1f88705c 100644
--- a/src/compiler.sml
+++ b/src/compiler.sml
@@ -511,7 +511,7 @@ fun compileC {cname, oname, ename, libs} =
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
diff --git a/src/config.sig b/src/config.sig
index 890bd9ab..6075482e 100644
--- a/src/config.sig
+++ b/src/config.sig
@@ -6,4 +6,6 @@ signature CONFIG = sig
val libUr : string
val libC : string
+
+ val gccArgs : string
end
diff --git a/src/config.sml.in b/src/config.sml.in
index d1eb5025..9e53986b 100644
--- a/src/config.sml.in
+++ b/src/config.sml.in
@@ -10,4 +10,6 @@ val libUr = OS.Path.joinDirFile {dir = lib,
val libC = OS.Path.joinDirFile {dir = lib,
file = "c"}
+val gccArgs = "@GCCARGS@"
+
end