]> git.ipfire.org Git - thirdparty/glibc.git/blame - csu/version.c
Avoid parallel GCC install in build-many-glibcs.py.
[thirdparty/glibc.git] / csu / version.c
CommitLineData
bfff8b1b 1/* Copyright (C) 1992-2017 Free Software Foundation, Inc.
df4ef2ab 2 This file is part of the GNU C Library.
28f540f4 3
df4ef2ab 4 The GNU C Library is free software; you can redistribute it and/or
41bdb6e2
AJ
5 modify it under the terms of the GNU Lesser General Public
6 License as published by the Free Software Foundation; either
7 version 2.1 of the License, or (at your option) any later version.
28f540f4 8
df4ef2ab
UD
9 The GNU C Library is distributed in the hope that it will be useful,
10 but WITHOUT ANY WARRANTY; without even the implied warranty of
11 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
41bdb6e2 12 Lesser General Public License for more details.
28f540f4 13
41bdb6e2 14 You should have received a copy of the GNU Lesser General Public
59ba27a6
PE
15 License along with the GNU C Library; if not, see
16 <http://www.gnu.org/licenses/>. */
28f540f4 17
ce563359 18#include "version.h"
013aafb7 19#include <tls.h>
92ad15a8 20#include <libc-abis.h>
dc30f461
UD
21#include <gnu/libc-version.h>
22
23static const char __libc_release[] = RELEASE;
24static const char __libc_version[] = VERSION;
28f540f4 25
f332db02 26static const char banner[] =
8b748aed 27"GNU C Library "PKGVERSION RELEASE" release version "VERSION", by Roland McGrath et al.\n\
58b587c1 28Copyright (C) 2017 Free Software Foundation, Inc.\n\
28f540f4
RM
29This is free software; see the source for copying conditions.\n\
30There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A\n\
41df5ed4
RH
31PARTICULAR PURPOSE.\n\
32Compiled by GNU CC version "__VERSION__".\n"
499e7464 33#include "version-info.h"
92ad15a8
UD
34#ifdef LIBC_ABIS_STRING
35LIBC_ABIS_STRING
36#endif
d40eb37a 37"For bug reporting instructions, please see:\n\
8b748aed 38"REPORT_BUGS_TO".\n";
f332db02
RM
39
40#include <unistd.h>
41
17427edd 42extern void __libc_print_version (void);
f332db02
RM
43void
44__libc_print_version (void)
45{
46 __write (STDOUT_FILENO, banner, sizeof banner - 1);
28f540f4 47}
463e148b 48
844b79a6 49extern const char *__gnu_get_libc_release (void);
dc30f461
UD
50const char *
51__gnu_get_libc_release (void)
52{
53 return __libc_release;
54}
55weak_alias (__gnu_get_libc_release, gnu_get_libc_release)
56
844b79a6 57extern const char *__gnu_get_libc_version (void);
dc30f461
UD
58const char *
59__gnu_get_libc_version (void)
60{
61 return __libc_version;
62}
63weak_alias (__gnu_get_libc_version, gnu_get_libc_version)
64
463e148b
RM
65/* This function is the entry point for the shared object.
66 Running the library as a program will get here. */
67
17427edd 68extern void __libc_main (void) __attribute__ ((noreturn));
463e148b
RM
69void
70__libc_main (void)
71{
72 __libc_print_version ();
f332db02 73 _exit (0);
463e148b 74}