On Fri, Jan 09, 2026 at 05:54:47PM +0000, Joseph Myers wrote:
> I think updates to gcc/config/loongarch/genopts/gen-evolution.awk's calls
> to copyright_header are needed as well. At present, building for
> loongarch can result in files in the source tree being reverted to older
> copyright dates because the generation hasn't been updated (discovered via
> my glibc bot with GCC mainline stopping updating its GCC source tree
> because such modifications appeared in the sources). Of course this also
> shows up missing entries in contrib/gcc_update for the three files
> generated by gen-evolution.awk.
gen-evolution.awk is explicitly blacklisted:
self.skip_files |= set ([
# Not part of GCC
'math-68881.h',
# Weird ways to compose copyright year
'GmcOptions.cc',
'gen-evolution.awk',
'gen-cxxapi-file.py',
])
and that is due to
if (to_year == "")
print " Copyright (C) " from_year \
" Free Software Foundation, Inc."
else
print " Copyright (C) " from_year "-" to_year \
" Free Software Foundation, Inc."
which contrib/update-copyright.py just can't parse.
Guess we could break it up as
print " Copy" "right (C) " from_year \
" Free Software Foundation, Inc."
or similar.
gen-cxxapi-file.py is similar, it has
print("""%language=C++
%define class-name std_name_hint_lookup
%struct-type
%{{
/* This file is auto-generated by {:s}. */
/* Copyright (C) 2022-{:s} Free Software Foundation, Inc.
...
#""".format(script, time.strftime('%Y')))
So, maybe in that case we could use
/* Copy{:s}right (C) 2022-{:s} Free Software Foundation, Inc.
and
#""".format(script, "", time.strftime('%Y')))
Jakub