This is the mail archive of the gdb-patches@sourceware.org mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Call get_compiler_info before test_compiler_info.


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]