OLD | NEW |
1 # Damn dejagnu for not having proper library search paths for load_lib. | 1 # Damn dejagnu for not having proper library search paths for load_lib. |
2 # We have to explicitly load everything that gcc-dg.exp wants to load. | 2 # We have to explicitly load everything that gcc-dg.exp wants to load. |
3 | 3 |
4 proc load_gcc_lib { filename } { | 4 proc load_gcc_lib { filename } { |
5 global srcdir loaded_libs | 5 global srcdir loaded_libs |
6 | 6 |
7 load_file $srcdir/../../gcc/testsuite/lib/$filename | 7 load_file $srcdir/../../gcc/testsuite/lib/$filename |
8 set loaded_libs($filename) "" | 8 set loaded_libs($filename) "" |
9 } | 9 } |
10 | 10 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
59 global target_triplet | 59 global target_triplet |
60 global always_ld_library_path | 60 global always_ld_library_path |
61 | 61 |
62 set blddir [lookfor_file [get_multilibs] libgomp] | 62 set blddir [lookfor_file [get_multilibs] libgomp] |
63 | 63 |
64 # We set LC_ALL and LANG to C so that we get the same error | 64 # We set LC_ALL and LANG to C so that we get the same error |
65 # messages as expected. | 65 # messages as expected. |
66 setenv LC_ALL C | 66 setenv LC_ALL C |
67 setenv LANG C | 67 setenv LANG C |
68 | 68 |
| 69 # Many hosts now default to a non-ASCII C locale, however, so |
| 70 # they can set a charset encoding here if they need. |
| 71 if { [ishost "*-*-cygwin*"] } { |
| 72 setenv LC_ALL C.ASCII |
| 73 setenv LANG C.ASCII |
| 74 } |
| 75 |
69 if ![info exists GCC_UNDER_TEST] then { | 76 if ![info exists GCC_UNDER_TEST] then { |
70 if [info exists TOOL_EXECUTABLE] { | 77 if [info exists TOOL_EXECUTABLE] { |
71 set GCC_UNDER_TEST $TOOL_EXECUTABLE | 78 set GCC_UNDER_TEST $TOOL_EXECUTABLE |
72 } else { | 79 } else { |
73 set GCC_UNDER_TEST "[find_gcc]" | 80 set GCC_UNDER_TEST "[find_gcc]" |
74 } | 81 } |
75 } | 82 } |
76 | 83 |
77 if ![info exists tmpdir] { | 84 if ![info exists tmpdir] { |
78 set tmpdir "/tmp" | 85 set tmpdir "/tmp" |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
116 if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]]
>= 1 } { | 123 if { [llength [glob -nocomplain ${gccdir}/${mldir}/libgcc_s*.so.*]]
>= 1 } { |
117 append always_ld_library_path ":${gccdir}/${mldir}" | 124 append always_ld_library_path ":${gccdir}/${mldir}" |
118 } | 125 } |
119 } | 126 } |
120 } | 127 } |
121 } | 128 } |
122 | 129 |
123 set ALWAYS_CFLAGS "" | 130 set ALWAYS_CFLAGS "" |
124 if { $blddir != "" } { | 131 if { $blddir != "" } { |
125 lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" | 132 lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/" |
| 133 # targets that use libgomp.a%s in their specs need a -B option |
| 134 # for uninstalled testing. |
| 135 lappend ALWAYS_CFLAGS "additional_flags=-B${blddir}/.libs" |
126 lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" | 136 lappend ALWAYS_CFLAGS "additional_flags=-I${blddir}" |
127 lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" | 137 lappend ALWAYS_CFLAGS "ldflags=-L${blddir}/.libs" |
128 } | 138 } |
129 lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." | 139 lappend ALWAYS_CFLAGS "additional_flags=-I${srcdir}/.." |
130 lappend ALWAYS_CFLAGS "ldflags=-lgomp" | 140 lappend ALWAYS_CFLAGS "ldflags=-lgomp" |
131 | 141 |
132 # We use atomic operations in the testcases to validate results. | 142 # We use atomic operations in the testcases to validate results. |
133 if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) | 143 if { ([istarget i?86-*-*] || [istarget x86_64-*-*]) |
134 && [check_effective_target_ilp32] } { | 144 && [check_effective_target_ilp32] } { |
135 lappend ALWAYS_CFLAGS "additional_flags=-march=i486" | 145 lappend ALWAYS_CFLAGS "additional_flags=-march=i486" |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 global libgomp_compile_options | 220 global libgomp_compile_options |
211 regsub "--additional_options," $option "" option | 221 regsub "--additional_options," $option "" option |
212 foreach x [split $option ","] { | 222 foreach x [split $option ","] { |
213 lappend libgomp_compile_options "additional_flags=$x" | 223 lappend libgomp_compile_options "additional_flags=$x" |
214 } | 224 } |
215 return 1 | 225 return 1 |
216 } else { | 226 } else { |
217 return 0 | 227 return 0 |
218 } | 228 } |
219 } | 229 } |
OLD | NEW |