This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: Call get_compiler_info before test_compiler_info.
- From: Pedro Alves <palves at redhat dot com>
- To: Andrew Burgess <aburgess at broadcom dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Tue, 10 Dec 2013 16:26:05 +0000
- Subject: Re: Call get_compiler_info before test_compiler_info.
- Authentication-results: sourceware.org; auth=none
- References: <52A728A0 dot 1050208 at broadcom dot com> <52A72C70 dot 5040305 at redhat dot com> <52A7303B dot 2080901 at broadcom dot com> <52A737EE dot 80800 at redhat dot com> <52A73CE2 dot 60002 at broadcom dot com>
On 12/10/2013 04:10 PM, Andrew Burgess wrote:
> On 10/12/2013 3:49 PM, Pedro Alves wrote:
>> On 12/10/2013 03:16 PM, Andrew Burgess wrote:
>>> On 10/12/2013 3:00 PM, Pedro Alves wrote:
>>
>>> @@ -2027,10 +2027,6 @@ gdb_caching_proc skip_altivec_tests {
>>>
>>> # Make sure we have a compiler that understands altivec.
>>> set compile_flags {debug nowarnings}
>>> - if [get_compiler_info] {
>>> - warning "Could not get compiler info"
>>> - return 1
>>> - }
>>> if [test_compiler_info gcc*] {
>>> set compile_flags "$compile_flags additional_flags=-maltivec"
>>> } elseif [test_compiler_info xlc*] {
>>
>> Before, the removed get_compiler_info would always overwrite
>> whatever was in the compiler_info before. Now, if the previous
>> call to get_compiler_info happened to get an $arg,
>> test_compiler_info will now reuse the wrong compiler_info.
>
> OK, I see. Here's a simpler solution that just adds the missing
> call to get_compiler_info.
>
> The example I found where this is an issue was: gdb.trace/pending.exp,
> which pre-patch fails to build for me (when I run just that test), but
> after the patch does run. There are probably other examples around.
>
> OK to apply?
OK, but please update the proc's intro comment:
# Build a shared library from SOURCES. You must use get_compiler_info
# first.
proc gdb_compile_shlib {sources dest options} {
--
Pedro Alves