Nate,

Your fix works for me.

MIke

On Sep 27, 2011, at 9:39 PM, nathan binkert wrote:

>>     static_objs = [ make_obj(s, True) for s in sources ]
>>     shared_objs = [ make_obj(s, False) for s in sources ]
>> 
>> such that shared_objs is defined first I get the library I want.
>> It appears that the first "for loop" pops objects from "sources" so it is 
>> empty when it's used the second time.
> 
> Ah, you're right.  Source.get is a generator, so we need to call every
> time we want to loop over it.  The correct fix should be something
> like this (can you verify that this works for you?):
> 
>  Nate
> 
> diff --git a/src/SConscript b/src/SConscript
> --- a/src/SConscript
> +++ b/src/SConscript
> @@ -904,9 +904,10 @@
> 
>         return obj
> 
> -    sources = Source.get(main=False, skip_lib=False)
> -    static_objs = [ make_obj(s, True) for s in sources ]
> -    shared_objs = [ make_obj(s, False) for s in sources ]
> +    static_objs = \
> +        [ make_obj(s, True) for s in Source.get(main=False, skip_lib=False) ]
> +    shared_objs = \
> +        [ make_obj(s, False) for s in Source.get(main=False, skip_lib=False) 
> ]
> 
>     static_date = make_obj(date_source, static=True, extra_deps=static_objs)
>     static_objs.append(static_date)
> _______________________________________________
> gem5-users mailing list
> [email protected]
> http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users
> 

_______________________________________________
gem5-users mailing list
[email protected]
http://m5sim.org/cgi-bin/mailman/listinfo/gem5-users

Reply via email to