-
Notifications
You must be signed in to change notification settings - Fork 58
[terapines.mk] Change compiler built-in libraries for different $STDCLIB options (Require after zcc 4.1.2). #63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[terapines.mk] Change compiler built-in libraries for different $STDCLIB options (Require after zcc 4.1.2). #63
Conversation
|
为了兼容之前的,这个能不能通过制定不同实际编译或者链接选项来替代? |
|
我看了下这里的实现 -> 这里是有问题的,我们实际上常规情况下,不会用到这个semihost的库的,只会在需要semihost打印的时候才使用上。 这里的nano实际上就是期望我们在使用c库的时候尽量使用nano版本。 我觉得应该可以这么改下。 还有这个nano和small具体是哪个更小? |
fanghuaqi
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
同时npk.yml文件里面的内容也需要针对性的修改才行
|
好的,我注意一下 |
在.cfg文件中封装这些库链接,主要是想方便用户使用 |
|
clangrt的nano和small版本差异呢 |
我实际上不需要使用semihost的,没有默认就带上,用户如果明确需要semihost才带上更合适些。 |
目前在libclang_rt.builtins_nano.a中相对于libclang_rt.builtins_small.a关闭了对次规格数的处理 |
这个没太理解,使用上有啥区别? |
使用上没有太大差别,主要是在code size上做了进一步缩小。 这里修改成--config的形式的话,主要是考虑到若后续工具链发生一些变动可以不用修改sdk, 且这里nuclei-sdk做的比较好,就算指定链接semihost,最后结果也不会真正链接进去(没有调用semihost库里的内容)。 这里提到”用户如果明确需要semihost才带上更合适些“, 按照当前sdk的设计也确实是这样做的,基于这点确实应该由sdk自己控制,我们补一个commit. |
这个文件需要怎么修改,目前没有看出来影响 |
…re after zcc 4.1.2).
69233f3 to
58fc6b5
Compare
我们确认了一下,按照尾缀的方式更改,将在ZCC 4.1.2之后的版本才能使用_nano |
This option is no longer effective in zcc version 4.1.2 and later. This option searches for C libraries under the size directory and is now being deprecated.
|
|
已经更新 |
|
请额外加一些注释,在 toolchain_terapines.mk 和 Common/npk.yml 里面注明一下,这个依赖什么版本的Zcc, 避免客户使用了错误版本的Zcc,然后请加一下changelog doc/source/changelog.rst , 更新到 Build System 字段 |
…rom making mistakes during use
已经添加注释,麻烦看一下是否合适 |
zcc 4.1.2 uses configuration files to link different built-in C libraries.
If $STDCLIB is newlib_full, the default configuration
-lc -lclang_rt.builtinsis used.If $STDCLIB is newlib_fast or newlib_small, use
-lc_small -lclang_rt.builtins_small.If $STDCLIB is newlib_nano, use the
-lc_nano -lclang_rt.builtins_nanoflag.zcc 4.1.2 remove the -fuse-size-lib compile flag