开发者

QNX QCC linker includes file timestamps

Is there a flag to pass into the linker which will NOT include each file's timestamp in the library.a output?

We are creating a library with the qcc -A parameter and when it does this it gathers all the compiled files into the library correctly but it always adds certain file information (file size, timestamp, etc). The problem is that we cannot cre开发者_运维知识库ate exactly the same binary after a clean since the timestamp is part of the binary

Output includes a line like this for every .o in the project:

DirReader.o/    1299620472  0     0     100666  15364


Which version of QCC and Neutrino?

Are you using any __DATE__ or __TIME__ macros in your code? Those are expanded and will change the checksum of your binary.

You can always do something like the following in your make file:

DEFINES += -DSW_COMPILE_DATE="'TestDate'

Then just use SW_COMPILE_DATE instead of __DATE__ or __TIME__, and you can control what shows up in your binary.

http://gcc.gnu.org/onlinedocs/cpp/Standard-Predefined-Macros.html has more information about Standard Predefined Macros.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜