From fb37142b896a9a4680ea53eeec0572cbdefa6fb4 Mon Sep 17 00:00:00 2001 From: Martin Cermak Date: Thu, 7 Jun 2018 20:13:27 +0200 Subject: [PATCH] Compat arch support detection improvement for 32-bit only systems. Commit d24c50ecfcf49e4579f475ac52bafb31850cf523 doesn't handle well 32-bit only systems such as i386. This update fixes it. --- testsuite/lib/compile_flags.exp | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/testsuite/lib/compile_flags.exp b/testsuite/lib/compile_flags.exp index f18890a72..45628d263 100644 --- a/testsuite/lib/compile_flags.exp +++ b/testsuite/lib/compile_flags.exp @@ -41,17 +41,30 @@ proc arch_compile_init {} { puts $hello_file "int main () { printf(\"Hello World!\"); return 0; }" close $hello_file - puts "Checking for compat arch support..." + set systemtap_arch_compile_flags 0 + + puts "Checking for 64-bit support..." + set flags "additional_flags=-g compiler=gcc additional_flags=-m64" + set exe "hello-m64" + set result [target_compile $source $exe executable $flags] + if { $result != "" } { + puts "$platform_machine 64-bit support unavailable" + } else { + puts "$platform_machine 64-bit support available" + incr systemtap_arch_compile_flags + } + + puts "Checking for $compat_arch_bits-bit support..." set flags "additional_flags=-g compiler=gcc additional_flags=-m$compat_arch_bits" set exe "hello-m$compat_arch_bits" set result [target_compile $source $exe executable $flags] if { $result != "" } { - set systemtap_arch_compile_flags 1 puts "$platform_machine $compat_arch_bits-bit support unavailable" } else { - set systemtap_arch_compile_flags 2 puts "$platform_machine $compat_arch_bits-bit support available" + incr systemtap_arch_compile_flags } + cd ${curdir} catch {exec rm -rf $tmpdir} } -- 2.43.5