Make compiler options in dejagnu runs compiler specific
This commit is contained in:
@@ -1,3 +1,11 @@
|
|||||||
|
2013-01-08 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
|
* testsuite/libffi.call/call.exp: Run tests with different
|
||||||
|
options, depending on whether or not we are using gcc or the
|
||||||
|
vendor compiler.
|
||||||
|
* testsuite/lib/libffi.exp (libffi-init): Set using_gcc based on
|
||||||
|
whether or not we are building/testing with gcc.
|
||||||
|
|
||||||
2013-01-08 Anthony Green <green@moxielogic.com>
|
2013-01-08 Anthony Green <green@moxielogic.com>
|
||||||
|
|
||||||
* configure.ac: Switch x86 solaris target to X86 by default.
|
* configure.ac: Switch x86 solaris target to X86 by default.
|
||||||
|
|||||||
@@ -101,9 +101,17 @@ proc libffi-init { args } {
|
|||||||
global tool_root_dir
|
global tool_root_dir
|
||||||
global ld_library_path
|
global ld_library_path
|
||||||
|
|
||||||
|
global using_gcc
|
||||||
|
|
||||||
set blddirffi [pwd]/..
|
set blddirffi [pwd]/..
|
||||||
verbose "libffi $blddirffi"
|
verbose "libffi $blddirffi"
|
||||||
|
|
||||||
|
# Are we building with GCC?
|
||||||
|
set tmp [grep ../config.status "GCC='yes'"]
|
||||||
|
if { [string match $tmp "GCC='yes'"] } {
|
||||||
|
|
||||||
|
set using_gcc "yes"
|
||||||
|
|
||||||
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
|
set gccdir [lookfor_file $tool_root_dir gcc/libgcc.a]
|
||||||
if {$gccdir != ""} {
|
if {$gccdir != ""} {
|
||||||
set gccdir [file dirname $gccdir]
|
set gccdir [file dirname $gccdir]
|
||||||
@@ -127,6 +135,13 @@ proc libffi-init { args } {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
set using_gcc "no"
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
# add the library path for libffi.
|
# add the library path for libffi.
|
||||||
append ld_library_path ":${blddirffi}/.libs"
|
append ld_library_path ":${blddirffi}/.libs"
|
||||||
|
|
||||||
|
|||||||
@@ -19,11 +19,20 @@ libffi-init
|
|||||||
|
|
||||||
global srcdir subdir
|
global srcdir subdir
|
||||||
|
|
||||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" ""
|
if { [string match $using_gcc "yes"] } {
|
||||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2" ""
|
|
||||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O3" ""
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O0 -W -Wall" ""
|
||||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-Os" ""
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2" ""
|
||||||
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2 -fomit-frame-pointer" ""
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O3" ""
|
||||||
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-Os" ""
|
||||||
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "-O2 -fomit-frame-pointer" ""
|
||||||
|
|
||||||
|
} else {
|
||||||
|
|
||||||
|
# Assume we are using the vendor compiler.
|
||||||
|
dg-runtest [lsort [glob -nocomplain $srcdir/$subdir/*.\[cS\]]] "" ""
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
dg-finish
|
dg-finish
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user