https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93965

            Bug ID: 93965
           Summary: Problematic ld_date configure check
           Product: gcc
           Version: 9.0
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: other
          Assignee: unassigned at gcc dot gnu.org
          Reporter: marxin at gcc dot gnu.org
  Target Milestone: ---

We're trying as SUSE to update binutils in our Factory and I noticed strange
configure detection. We've got the following version of ld:

$ ld -v
GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.34.0.20200216-385

which is then wrongly parsed in gcc/configure.ac:

    ld_date=`echo $ld_ver | sed -n
's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'`

$ echo "GNU ld (GNU Binutils; openSUSE Tumbleweed) 2.34.0.20200216-385" | sed
-n
's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'
20021638

Obvious fix would be removal of the '[-]*' parts of the regex.
Is there any ld that uses 2020-02-28 datetime format? The code is there for at
least 16 years.

Reply via email to