Mikhail Glushenkov wrote:> Hi, > > On Thu, Sep 10, 2009 at 8:01 PM, Sanjiv Gupta > <sanjiv.gupta at microchip.com> wrote: > >> Why do we need both 'conflict' and 'warning' ? >> > > 'warning' just prints a warning, 'conflict' is a fatal error. > > A better example would be something like: > > (warning (and (switch_on "O1"), (switch_on "O2")) "-O1 has no effect.") > > >Looks good. One more quick query. How to extract libname from "-l std" from the driver and pass it as "std.lib" to the linker tool? I know that unpack_values will give me "std", but an (append_cmd ".lib") with that will insert a space. Anything like append_cmd_nospace ? or any other way? - Sanjiv - Sanjiv
Mikhail Glushenkov wrote:> Hi, > > On Fri, Sep 11, 2009 at 11:46 AM, Sanjiv Gupta > <sanjiv.gupta at microchip.com> wrote: > >> Looks good. >> One more quick query. >> How to extract libname from "-l std" from the driver and pass it as >> "std.lib" to the linker tool? >> I know that unpack_values will give me "std", but an (append_cmd ".lib") >> with that will insert a space. >> > > This won't work since actions are not composable (alas). > > >> Anything like append_cmd_nospace ? or any other way? >> > > I'm afraid there is no way to do this right now. One way to support > this is to extend the hook mechanism to work with actions: > > (case (not_empty "-l"), (append_cmd "$CALL(AppendLibSuffix)")) > >Thanks for thinking over it. On second thoughts, I feel that it isn't right to ask for a feature for every such thing. The right way to do this is to fix one's linker itself so that it accepts a -l option as such forwarded by the driver. - Sanjiv