Re: Bug Creation of static library

Mats Wichmann <[email protected]>
Newsgroups gmane.comp.programming.tools.scons.user
Message-ID <[email protected]>
On 10/12/22 09:08, Mats Wichmann wrote:
> On 10/12/22 04:10, Yoann LEBANSAIS wrote:
>> Hello,
>>
>> I want to report a bug, or compatibility problem on creation of static 
>> library with alternate compiler.
>>
>> We are using armclang compiler and armar to create static library. 
>> Unfortunatly, armar doesn’t support option without ‘-‘prefix. So the 
>> generated command: « armar rc my_lib.a all.o » fail, but « armar -rc 
>> my_lib.a all.o » is OK.
>>
>> I’ve both configuration with gcc 10.2.1 and all work. If all 
>> compilator accept the "prefix version", it could be possible to update 
>> scons ? Or maybe there is an other way to did it?
> 
> As a quick answer, you ought to be able to set ARFLAGS to what you need 
> - that mechanism supports changing the flags as necessary (and in fact, 
> some tool modules already do this depending on the compiler in user - 
> Sun and SGI environments, neither of which are likely to be helpful to 
> you).
> 
> Roughly:
> 
> env = Environment()
> env['ARFLAGS'] = "-rc"
> 
> Believe you need to set it after environment creation because the "ar" 
> tool seems to set it unconditionally.

I should have added - GNU ar does support the leading dash, so this 
should meet your "work for both" scenario.  Manpage:

 >        If you wish, you may begin the first command-line argument 
with a dash.


_______________________________________________
Scons-users mailing list
[email protected]
https://pairlist4.pair.net/mailman/listinfo/scons-users
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.