[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |
5.3.4 Cross target procedure
‘lib/target.exp’ defines these utility procedures:
-
push_target name
-
This makes the target named name be the current target connection. The value of name is an index into the
target_info
array and is set in the global config file. -
pop_target
-
This unsets the current target connection.
-
list_targets
-
This lists all the supported targets for this architecture.
-
push_host name
-
This makes the host named name be the current remote host connection. The value of name is an index into the
target_info
array and is set in the global config file. -
pop_host
-
This unsets the current host connection.
This invokes the compiler as set by
CC
to compile the file file. The default options for many cross compilation targets are guessed by DejaGnu, and these options can be added to by passing in more parameters as arguments tocompile
. Optionally, this will also use the value of thecflags
field in the target config array. If the host is not the same as the build machines, then then compiler is run on the remote host usingexecute_anywhere
.This produces an archive file. Any parameters passed to
archive
are used in addition to the default flags. Optionally, this will also use the value of thearflags
field in the target config array. If the host is not the same as the build machines, then then archiver is run on the remote host usingexecute_anywhere
.This generates an index for the archive file for systems that aren’t POSIX yet. Any parameters passed to
ranlib
are used in for the flags. -
execute_anywhere cmdline
-
This executes the cmdline on the proper host. This should be used as a replacement for the Tcl command
exec
as this version utilizes the target config info to execute this command on the build machine or a remote host. All config information for the remote host must be setup to have this command work. If this is a canadian cross, (where we test a cross compiler that runs on a different host then where DejaGnu is running) then a connection is made to the remote host and the command is executed there. It returns either REMOTERROR (for an error) or the output produced when the command was executed. This is used for running the tool to be tested, not a test case.
[ < ] | [ > ] | [ << ] | [ Up ] | [ >> ] | [Top] | [Contents] | [Index] | [ ? ] |