Welcome to mirror list, hosted at ThFree Co, Russian Federation.

cygwin.com/git/newlib-cygwin.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Fitzsimmons <fitzsim@redhat.com>2002-05-01 21:06:25 +0400
committerThomas Fitzsimmons <fitzsim@redhat.com>2002-05-01 21:06:25 +0400
commit6e9d950a9126f8eaef47394a82cde0a09b952bbc (patch)
tree9742a1078ebf9abd084b7d7bd015d519668c4ade /newlib/testsuite
parent1e997c5625bb584eaf78788fbde70965ec4a18fd (diff)
* Add flags.exp.
Diffstat (limited to 'newlib/testsuite')
-rw-r--r--newlib/testsuite/lib/flags.exp82
1 files changed, 82 insertions, 0 deletions
diff --git a/newlib/testsuite/lib/flags.exp b/newlib/testsuite/lib/flags.exp
new file mode 100644
index 000000000..f6bffde1f
--- /dev/null
+++ b/newlib/testsuite/lib/flags.exp
@@ -0,0 +1,82 @@
+# Copyright (C) 2002 by Red Hat, Incorporated. All rights reserved.
+#
+# Permission to use, copy, modify, and distribute this software
+# is freely granted, provided that this notice is preserved.
+#
+
+# flags.exp: overrides the dejagnu versions of libgloss_link_flags,
+# newlib_link_flags, and newlib_include_flags.
+
+# These versions of the procedures generate link and include flags
+# by searching for the needed files in the current build and source
+# directories, rather than in the build and source paths of the
+# compiler being used.
+
+proc libgloss_link_flags { args } {
+ global target_cpu
+ # These values come from the local site.exp.
+ global srcdir objdir
+ global multibuildtop
+
+ verbose "In newlib version of libgloss_link_flags...\n"
+
+ if [isnative] {
+ return ""
+ }
+
+ if [is_remote host] {
+ return ""
+ }
+
+ set target_build_path "$objdir/$multibuildtop.."
+
+ set gloss_srcdir [lookfor_file ${srcdir} libgloss/$target_cpu]
+
+ if { $gloss_srcdir == "" } {
+ return ""
+ }
+
+ if [file exists $target_build_path/libgloss/$target_cpu] {
+ verbose "libgloss path is $target_build_path/libgloss/$target_cpu" 2
+ return "-B$target_build_path/libgloss/$target_cpu/ -L$target_build_path/libgloss/$target_cpu -L$gloss_srcdir"
+ } else {
+ verbose -log "No libgloss support for this target." 2
+ return ""
+ }
+}
+
+proc newlib_link_flags { args } {
+ global tool_root_dir
+ global srcdir objdir
+
+ verbose "In newlib version of newlib_link_flags...\n"
+
+ if [is_remote host] {
+ return ""
+ }
+
+ set ld_script_path [lookfor_file ${tool_root_dir} "ld/ldscripts"];
+ if { $ld_script_path != "" } {
+ set result "-L[file dirname $ld_script_path]"
+ } else {
+ set result ""
+ }
+
+ return "$result -B$objdir -L$objdir"
+}
+
+proc newlib_include_flags { args } {
+ global srcdir objdir
+
+ verbose "In newlib version of newlib_include_flags...\n"
+
+ if [is_remote host] {
+ return ""
+ }
+
+ set newlib_dir [lookfor_file ${srcdir} newlib/libc/include/assert.h]
+ if { ${newlib_dir} != "" } {
+ set newlib_dir [file dirname ${newlib_dir}]
+ }
+ return " -I$objdir/targ-include -I${newlib_dir}"
+}