This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
excluding flags from build, part II
- To: bug-dejagnu at prep dot ai dot mit dot edu
- Subject: excluding flags from build, part II
- From: Robert Lipe <robertl at dgii dot com>
- Date: Sat, 18 Jul 1998 23:42:46 -0500
- Cc: law at cygnus dot com
Actually, once I figured out tcl's quoting scheme, the general case
isn't any harder than the specific case I was solving. Quick testing
shows this works...
$ diff -c target.exp_ target.exp
*** target.exp_ Mon Jun 29 23:20:03 1998
--- target.exp Sat Jul 18 23:38:22 1998
***************
*** 405,410 ****
if [board_info $dest exists multilib_flags] {
append add_flags " [board_info $dest multilib_flags]";
}
verbose "doing compile"
set sources ""
--- 406,419 ----
if [board_info $dest exists multilib_flags] {
append add_flags " [board_info $dest multilib_flags]";
}
+
+ if [board_info $dest exists exclude_from_build] {
+ if [regexp -- [board_info $dest exclude_from_build] $add_flags] {
+ send_user "**** $add_flags\n"
+ unsupported "[board_info $dest exclude_from_build] is not supported"
+ return
+ }
+ }
verbose "doing compile"
set sources ""
Then this lets you specify a regex in the baseboards/unix.exp (or whatever)
to allow you to exclude certain compiles...
if [regexp -- "-mcoff" [board_info $board multilib_flags]] {
set_board_info exclude_from_build (-fPIC|-fpic)
}
RJL