summaryrefslogtreecommitdiff
path: root/autosetup
diff options
context:
space:
mode:
authorSteve Bennett <steveb@workware.net.au>2011-09-02 20:10:25 +1000
committerSteve Bennett <steveb@workware.net.au>2011-09-02 20:10:25 +1000
commit9fcdfa2964919dd5a0766e089b68af8b2b54e815 (patch)
tree8f86e600357d502bf4c4e10fbb92e32f92d7f09f /autosetup
parent8a0fa552e9f8c24619a815fa09201ebff41448ee (diff)
Update to the latest autosetup
For a couple of small bug fixes Signed-off-by: Steve Bennett <steveb@workware.net.au>
Diffstat (limited to 'autosetup')
-rw-r--r--autosetup/cc-lib.tcl4
-rw-r--r--autosetup/cc.tcl11
2 files changed, 5 insertions, 10 deletions
diff --git a/autosetup/cc-lib.tcl b/autosetup/cc-lib.tcl
index f4fb0db..e8e5e86 100644
--- a/autosetup/cc-lib.tcl
+++ b/autosetup/cc-lib.tcl
@@ -50,7 +50,7 @@ proc cc-check-endian {} {
msg-checking "Checking endian..."
cc-with {-includes {sys/types.h sys/param.h}} {
if {[cctest -code {
- #if! defined(BIG_ENDIAN) || !defined(BYTE_ORDER)
+ #if !defined(BIG_ENDIAN) || !defined(BYTE_ORDER)
#error unknown
#elif BYTE_ORDER != BIG_ENDIAN
#error little
@@ -60,7 +60,7 @@ proc cc-check-endian {} {
msg-result "big"
set rc 1
} elseif {[cctest -code {
- #if! defined(LITTLE_ENDIAN) || !defined(BYTE_ORDER)
+ #if !defined(LITTLE_ENDIAN) || !defined(BYTE_ORDER)
#error unknown
#elif BYTE_ORDER != LITTLE_ENDIAN
#error big
diff --git a/autosetup/cc.tcl b/autosetup/cc.tcl
index d0fd980..707e69c 100644
--- a/autosetup/cc.tcl
+++ b/autosetup/cc.tcl
@@ -333,13 +333,7 @@ proc cc-get-settings {} {
# Returns the previous settings
proc cc-update-settings {args} {
set prev [cc-get-settings]
- array set new $prev
-
- foreach {name value} $args {
- set new($name) $value
- }
- cc-store-settings $new
-
+ cc-store-settings [dict merge $prev $args]
return $prev
}
@@ -418,7 +412,7 @@ proc cc-with {settings args} {
#
proc cctest {args} {
set src conftest__.c
- set tmp conftest__.o
+ set tmp conftest__
# Easiest way to merge in the settings
cc-with $args {
@@ -470,6 +464,7 @@ proc cctest {args} {
}
if {!$opts(-link)} {
+ set tmp conftest__.o
lappend cmdline -c
}
lappend cmdline {*}$opts(-cflags)