+2010-04-04 Ulrich Drepper <drepper@redhat.com>
+
+ [BZ #11287]
+ * csu/Makefile ($(objpfx)version-info.h): Handle newer kernel headers
+ which don't define UTS_RELEASE.
+
2010-04-04 H.J. Lu <hongjiu.lu@intel.com>
Ulrich Drepper <drepper@redhat.com>
# Makefile for csu code for GNU C library.
-# Copyright (C) 1995-2004, 2005, 2006 Free Software Foundation, Inc.
+# Copyright (C) 1995-2004, 2005, 2006, 2010 Free Software Foundation, Inc.
# This file is part of the GNU C Library.
# The GNU C Library is free software; you can redistribute it and/or
linux*) version=`(printf '%s\n%s\n' \
'#include <linux/version.h>' \
UTS_RELEASE \
- | $(CC) $(CPPFLAGS) -E -P - -DNOT_IN_libc=1 | \
+ | $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 | \
sed -e 's/"\([^"]*\)".*/\1/p' -e d) 2>/dev/null`;\
if [ -z "$$version" ]; then \
+ version=`(printf '%s\n%s\n' \
+ '#include <linux/version.h>' \
+ LINUX_VERSION_CODE \
+ | $(CC) $(CPPFLAGS) -O -E -P - -DNOT_IN_libc=1 \
+ | sed -n -e '/^[123456789].*/p' \
+ | awk '{v=$$1; \
+ printf("%d.%d.%d\n", \
+ v/65535, v/256%256, v%256)}') \
+ 2>/dev/null`; \
+ fi; \
+ if [ -z "$$version" ]; then \
if [ -r /proc/version ]; then \
version=`sed 's/.*Linux version \([^ ]*\) .*/>>\1<</' \
< /proc/version`; \