@@ -1,3 +1,9 @@
+2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * go.test/go-test.exp (go-set-goarch): Check x32.
+
+ * lib/target-supports.exp (check_effective_target_x32): New.
+
2011-03-02 H.J. Lu <hongjiu.lu@intel.com>
PR rtl-optimization/47958
@@ -119,7 +119,8 @@ proc go-set-goarch { } {
}
"i?86-*-*" -
"x86_64-*-*" {
- if [check_effective_target_ilp32] {
+ if { [check_effective_target_ilp32]
+ && ![check_effective_target_x32] } {
set goarch "386"
} else {
set goarch "amd64"
@@ -1492,6 +1492,17 @@ proc check_effective_target_ilp32 { } {
}]
}
+# Return 1 if we're generating x32 code using default options, 0
+# otherwise.
+
+proc check_effective_target_x32 { } {
+ return [check_no_compiler_messages x32 object {
+ int dummy[sizeof (int) == 4
+ && sizeof (void *) == 4
+ && sizeof (long) == 4 ? 1 : -1] = { __x86_64__ };
+ }]
+}
+
# Return 1 if we're generating 32-bit or larger integers using default
# options, 0 otherwise.
@@ -1,3 +1,7 @@
+2011-03-06 H.J. Lu <hongjiu.lu@intel.com>
+
+ * lib/libgomp.exp (libgomp_init): Don't add -march=i486 for x32.
+
2011-02-17 H.J. Lu <hongjiu.lu@intel.com>
* config/linux/x86/futex.h: Check __x86_64__ instead of
@@ -141,7 +141,8 @@ proc libgomp_init { args } {
# We use atomic operations in the testcases to validate results.
if { ([istarget i?86-*-*] || [istarget x86_64-*-*])
- && [check_effective_target_ilp32] } {
+ && [check_effective_target_ilp32]
+ && ![check_effective_target_x32] } {
lappend ALWAYS_CFLAGS "additional_flags=-march=i486"
}