PR27725, better objcopy -p times
Simon Marchi
simon.marchi@polymtl.ca
Fri Apr 16 04:47:44 GMT 2021
On 2021-04-15 10:48 p.m., Alan Modra wrote:
> On Thu, Apr 15, 2021 at 09:07:40PM -0400, Simon Marchi wrote:
>> On 2021-04-15 8:16 p.m., Alan Modra wrote:
>>> ccache weirdness? There are definition of those two functions a few
>>> lines above the references.
>>
>> Hmm nope, I tried a build from scratch with ccache completely out of the
>> way, it still does it:
>>
>> This fixes it though:
>>
>> -inline struct timespec
>> +static struct timespec
>
> Oh, it's funny how I can read over something and autocorrect. In this
> case I meant to write "static inline". (If anyone is wondering why,
> see ISO C 6.7.4 in particular note 8.)
>
> PR 27725
> * rename.c (get_stat_atime, get_stat_mtime): Make static.
> (get_stat_atime_ns, get_stat_mtime_ns): Likewise.
>
> diff --git a/binutils/rename.c b/binutils/rename.c
> index fe6019b2631..544225d73f7 100644
> --- a/binutils/rename.c
> +++ b/binutils/rename.c
> @@ -103,7 +103,7 @@ simple_copy (int fromfd, const char *to,
> #endif
>
> /* Return the nanosecond component of *ST's access time. */
> -inline long int
> +static inline long int
> get_stat_atime_ns (struct stat const *st ATTRIBUTE_UNUSED)
> {
> # if defined STAT_TIMESPEC
> @@ -116,7 +116,7 @@ get_stat_atime_ns (struct stat const *st ATTRIBUTE_UNUSED)
> }
>
> /* Return the nanosecond component of *ST's data modification time. */
> -inline long int
> +static inline long int
> get_stat_mtime_ns (struct stat const *st ATTRIBUTE_UNUSED)
> {
> # if defined STAT_TIMESPEC
> @@ -129,7 +129,7 @@ get_stat_mtime_ns (struct stat const *st ATTRIBUTE_UNUSED)
> }
>
> /* Return *ST's access time. */
> -inline struct timespec
> +static inline struct timespec
> get_stat_atime (struct stat const *st)
> {
> #ifdef STAT_TIMESPEC
> @@ -143,7 +143,7 @@ get_stat_atime (struct stat const *st)
> }
>
> /* Return *ST's data modification time. */
> -inline struct timespec
> +static inline struct timespec
> get_stat_mtime (struct stat const *st)
> {
> #ifdef STAT_TIMESPEC
>
That works, thanks!
Simon
More information about the Binutils
mailing list