[Scons-users] =?GB2312?Q?Re=3A_=5BScons=2Dusers=5D_is_there_any_way_that_I_can_get_th?= =?GB2312?Q?e_final_command_line_from_scons=A3=BF?=
Gary Oberbrunner
garyo at oberbrunner.com
Sun Nov 18 11:47:27 EST 2012
Try using $TEMPFILE. MSVC uses it for this purpose. Start by wrapping the
LINKCOM with TEMPFILE like ${TEMPFILE('$LINK ...')} and then maybe set
$TEMPFILE to TempFileMunge, and check Platform/__init__.py for how
TempFileMunge works; you'll need to make it use the --via or whatever your
linker needs. If you come up with something useful, at least post it on
the wiki, or make an add-on tool that people can use (e.g. by putting it in
site_scons/tools).
On Sun, Nov 18, 2012 at 9:09 AM, prife <goprife at gmail.com> wrote:
> HI, all
>
> I use scons to build sources, and the C compiler is the armcc (which is
> from MDK).
> In most cases, scons works very well, but if when there are too many
> objects in the final command line, then I will get an error.
> like this:
>
> armlink -o rtthread-stm32.axf --device DARMSTM --info sizes --info totals
> --info unused --info veneers --list rtthread-stm32.map --scatter
> stm32_rom.sct --libpath D:/Keil/ARM/RV31/LIB --keep __fsym_* --keep
> __vsym_* build\application.o build\startup.o build\board.o
> build\stm32f10x_it.o build\rtc.o ........................(many objs)
>
> The Command line is too long.
> scons: *** [rtthread-stm32.axf] Error 1
>
> because the armcc has a limited command line length. It provides an
> option
> --via=file
> ARM Compiler toolchain v4.1 for µVision Linker Reference Home > Linker
> command-line options > --via=file
> --via=*file*
>
> This option reads an additional list of input filenames and linker options
> from *file*.
>
> so, I want to get the final command line, the write some to an temp
> files, and use this --via option, then I can solve this issue. In fact I
> can get the link and link flags with:
>
> env['LINK']
>
> env['LINKFLAGS']
>
> like this:
>
> armlink -o rtthread-stm32.axf --device DARMSTM --info sizes --info totals
> --info unused --info veneers --list rtthread-stm32.map --scatter
> stm32_rom.sct --libpath D:/Keil/ARM/RV31/LIB --keep __fsym_* --keep
> __vsym_* --via ojb_files
>
> so what I really need is the string include all the objects. Any
> questions?
>
> Best Regards
>
> prife
>
> --
> 把有限的时间投入到无限的学习中去
>
> _______________________________________________
> Scons-users mailing list
> Scons-users at scons.org
> http://four.pairlist.net/mailman/listinfo/scons-users
>
>
--
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://four.pairlist.net/pipermail/scons-users/attachments/20121118/984d9b36/attachment.html>
More information about the Scons-users
mailing list