This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [cft] configure tests for .hidden


> Question: do other packagings of binutils strip out the date?  I'm
> aware that the date string generally wasn't present prior to 2.12,
> but that's sort of irrelevant.

FYI, FreeBSD (and perhaps other packagers) wraps the GNU Makefile
structure with one that manually sets VERSION and VERSION_DATE (and is
kept in close sync with actual imports from the FSF tree).  It is a
documented step to doing an import.  It does this because it has its
own bootstrapping mechanism in which it wants to build FSF tools.

It sets VERSION_DATE identically to how it would be by the binutils
Makefile structure.  However, it currently sets VERSION as follows:

; on-ref4 /usr/bin/ld --version >[2]/dev/null|head -1
GNU ld 2.11.2 20010719 [FreeBSD]

; on-ref5 /usr/bin/ld --version >[2]/dev/null|head -1
GNU ld version 2.12.0 [FreeBSD] 2002-03-20

Built from binutils CVS, 2.12.X branch:

; /usr/local/beta-gcc/bin/ld --version >[2]/dev/null|head -1
GNU ld version 2.12.1 20020412

Built from binutils CVS, release tag 2.12:

; /usr/local/bin/ld --version >[2]/dev/null|head -1
GNU ld version 2.12

This command works for all these cases (and should cover anyone that
stuck a plain VERSION_DATE anywhere into VERSION):

ld --version | head -1 | sed -n 's,^.*\([2-9][0-9][0-9][0-9]\)[-]*\([01][0-9]\)[-]*\([0-3][0-9]\).*$,\1\2\3,p'

GNU ld version 2.12
GNU ld 2.11.2 20010719 [FreeBSD]
20010719
GNU ld version 2.12.0 [FreeBSD] 2002-03-20
20020320
GNU ld version 2.12.1 20020412
20020412


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]