Message ID | CAKdteOZdoH6hGQFTgMQQyZJBxyKRb0zBNtb8dyaN0f7=Tyt4gA@mail.gmail.com |
---|---|
State | New |
Headers | show |
On 10/17/14 15:05, Christophe Lyon wrote: > Hi, > > In testsuite/lib/wrapper.exp's ${tool}_maybe_build_wrapper, we call > set_currtarget_info wrap_compile_flags > to override wrap_compile_flags with additional flags when compiling testglue.c. > > However, dejagnu's set_currtarget_info {entry value} will write into > value only if it's not already defined. > > This caused me problems since I had defined wrap_compile_flags much > earlier in my main .exp file: -w was not added, causing compilation of > testglue.c to fail under RHEL5. > > The attach patch unsets wrap_compile_flags before calling set_currtarget_info. > > OK for trunk? > > Thanks, > Christophe > > 2014-10-17 Christophe Lyon <christophe.lyon@linaro.org> > > * lib/wrapper.exp ({tool}_maybe_build_wrapper): Clear > wrap_compile_flags before setting it. OK. Sigh. One day someone will rewrite all this nonsense in something other than expect/tcl. Until then we slog along ;( jeff
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog index 29ed3e6..faadd79 100644 --- a/gcc/testsuite/ChangeLog +++ b/gcc/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2014-10-17 Christophe Lyon <christophe.lyon@linaro.org> + + * lib/wrapper.exp ({tool}_maybe_build_wrapper): Clear + wrap_compile_flags before setting it. + 2014-10-17 Marek Polacek <polacek@redhat.com> PR c/63543 diff --git a/gcc/testsuite/lib/wrapper.exp b/gcc/testsuite/lib/wrapper.exp index 1291c11..6880172 100644 --- a/gcc/testsuite/lib/wrapper.exp +++ b/gcc/testsuite/lib/wrapper.exp @@ -34,9 +34,11 @@ proc ${tool}_maybe_build_wrapper { filename args } { # became true for dejagnu-1.4.4. The set of warnings and code # that gcc objects on may change, so just make sure -w is always # passed to turn off all warnings. + unset_currtarget_info wrap_compile_flags set_currtarget_info wrap_compile_flags \ "$saved_wrap_compile_flags -w $flags" set result [build_wrapper $filename] + unset_currtarget_info wrap_compile_flags set_currtarget_info wrap_compile_flags "$saved_wrap_compile_flags" if { $result != "" } { set gluefile [lindex $result 0]