#endif
};
-#include "../lib/precise-aligned-alloc.c"
+#include "precise-aligned-alloc.c"
int
main (int argc, char **argv)
# C11 for _Alignas, gnu for asm.
lappend flags additional_flags=-std=gnu11
+lappend_include_file flags $srcdir/lib/precise-aligned-alloc.c
+
if { [test_compiler_info gcc*] || [test_compiler_info clang*] } {
lappend flags "additional_flags=-mavx -I${srcdir}/.."
}
return 0;
}
-#include "../lib/precise-aligned-alloc.c"
+#include "precise-aligned-alloc.c"
int
main (int argc, char **argv)
lappend flags "additional_flags=-msse -I${srcdir}/.."
}
+lappend_include_file flags $srcdir/lib/precise-aligned-alloc.c
+
if { [gdb_compile "${srcdir}/${subdir}/${srcfile}" "${binfile}" executable \
$flags] != "" } {
unsupported "compiler does not support SSE"
additional_flags=$flag]
}
+
+# Handle include file FILE, and if necessary update compiler flags variable
+# FLAGS.
+
+proc lappend_include_file { flags file } {
+ upvar $flags up_flags
+ if { [is_remote host] } {
+ gdb_remote_download host $file
+ } else {
+ set dir [file dirname $file]
+ if { $dir != [file join $::srcdir $::subdir] } {
+ lappend up_flags "additional_flags=-I$dir"
+ }
+ }
+}
+
# Always load compatibility stuff.
load_lib future.exp