Hi, I added support for this. If you place .a file in a source directory, it gets included. Let me know if you encounter any errors.
—8<—cut start— Repository: incubator-mynewt-newt Updated Branches: refs/heads/develop f9159f5d8 -> 93cf30fbe MYNEWT-476; if package source has .a's, include them when linking. Project: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/repo> Commit: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/commit/93cf30fb> Tree: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/tree/93cf30fb> Diff: http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/93cf30fb <http://git-wip-us.apache.org/repos/asf/incubator-mynewt-newt/diff/93cf30fb> Branch: refs/heads/develop Commit: 93cf30fbe0b908de14f7bf630348da7efd0602d6 Parents: f9159f5 Author: Marko Kiiskila <[email protected] <mailto:[email protected]>> Authored: Wed Nov 9 17:10:18 2016 -0800 Committer: Marko Kiiskila <[email protected] <mailto:[email protected]>> Committed: Wed Nov 9 17:10:18 2016 -0800 ---------------------------------------------------------------------- newt/builder/build.go | 23 ++++++++++++----- newt/toolchain/compiler.go | 57 +++++++++++++++++++++++++++++++++++++---- newt/toolchain/deps.go | 27 +++++++++++++++++++ 3 files changed, 95 insertions(+), 12 deletions(-) ——————————————————————————————————— > On Nov 8, 2016, at 5:59 PM, 李梦翔 <[email protected]> wrote: > > Tanks for your reply. > > ---原始邮件--- > 发件人: "marko kiiskila"<[email protected]> > 发送时间: 2016年11月9日 00:49:14 > 收件人: "dev"<[email protected]>; > 主题: Re: How to link the thirdparty library such as .a file into myproject? > > Hi, > > when in doubt, you can take a look at output of newt -lDEBUG build > <your_target> > That’ll show the command line during linking. > > I admit, that looks promising. When I tried that one out, those flags were not > passed to linker, however. So it’s quite possible that pkg.lflags are not > honored. > > Also, we need more native support on newt for this, as having to use absolute > path in that line pointing to .a is not good. > > > On Nov 7, 2016, at 5:26 PM, 李梦翔 <[email protected]> wrote: > > > > I have to add this line to my pkg.xml: > > pkg.lflags: /workspace/hw/mcu/synochip/as568/src/as568_romfunc.a > > /workspace/hw/mcu/synochip/as568/src/as568_crypto.a > > > > > > Seems that works for me, but i'm not sure is that really OK? > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > [email protected]
