global flags_to_postpone
global board_info
- if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
- lappend options "libs=${gluefile}"
- lappend options "ldflags=${wrap_flags}"
- }
-
global TEST_EXTRA_LIBS
if [info exists TEST_EXTRA_LIBS] {
lappend options "ldflags=$TEST_EXTRA_LIBS"
set options [dg-additional-files-options $options $source]
+ if { [target_info needs_status_wrapper] != "" && [info exists gluefile] } {
+ lappend options "libs=${gluefile}"
+ lappend options "ldflags=${wrap_flags}"
+ }
+
set result [target_compile $source $dest $type $options]
if {[board_info $tboard exists multilib_flags]} {
global flags_to_postpone
global board_info
- if {[target_info needs_status_wrapper] != "" && \
- [target_info needs_status_wrapper] != "0" && \
- [info exists gluefile] } {
- lappend options "libs=${gluefile}"
- lappend options "ldflags=$wrap_flags"
- if { $type == "executable" } {
- set options [concat "{additional_flags=-dumpbase \"\"}" $options]
- }
- }
-
global TEST_EXTRA_LIBS
if [info exists TEST_EXTRA_LIBS] {
lappend options "ldflags=$TEST_EXTRA_LIBS"
lappend options "timeout=[timeout_value]"
lappend options "compiler=$GCC_UNDER_TEST"
set options [dg-additional-files-options $options $source]
+
+ if {[target_info needs_status_wrapper] != "" && \
+ [target_info needs_status_wrapper] != "0" && \
+ [info exists gluefile] } {
+ lappend options "libs=${gluefile}"
+ lappend options "ldflags=$wrap_flags"
+ if { $type == "executable" } {
+ set options [concat "{additional_flags=-dumpbase \"\"}" $options]
+ }
+ }
+
set return_val [target_compile $source $dest $type $options]
if {[board_info $tboard exists multilib_flags]} {
# the compiler when compiling FILENAME.
proc ${tool}_maybe_build_wrapper { filename args } {
- global gluefile wrap_flags
+ global gluefile wrap_flags gcc_adjusted_linker_flags
if { [target_info needs_status_wrapper] != "" \
&& [target_info needs_status_wrapper] != "0" \
if { $result != "" } {
set gluefile [lindex $result 0]
set wrap_flags [lindex $result 1]
+
+ # Reset the cached state of the adjusted flags
+ if { [info exists gcc_adjusted_linker_flags] } {
+ set gcc_adjusted_linker_flags 0
+ }
}
}
}