[PATCH] Allow embedded timestamps by C/C++ macros to be set externally

Manuel López-Ibáñez lopezibanez@gmail.com
Tue Jun 30 14:49:00 GMT 2015


On 30/06/15 16:43, Manuel López-Ibáñez wrote:
> On 30/06/15 15:18, Dhole wrote:
>> A solution for toolchain packages that embed timestamps during the build
>> process has been proposed for anyone interested and it consists of the
>> following:
>
> Perhaps this has been discussed and discarded before (if so I would appreciate
> if you could point me to the relevant discussion), why not simply redefine
> __DATE__ and __TIME__ to an appropriate string via the command-line or a dummy
> include?
>
> That probably triggers some warnings (or it may not be supported at all, I
> haven't tried myself), but fixing those issues leads to a more general solution
> than GCC reacting to an arbitrary variable name and changing its behaviour
> quite silently.

In any case, you should be aware of point 10 here: 
https://gcc.gnu.org/wiki/Community (You only need to convince the 
decision-makers). I'm not one of them ;)

Cheers,

	Manuel.



More information about the Gcc-patches mailing list