xen: detect compiler version with '--version' rather than '-v'
authorTim Deegan <tim@xen.org>
Thu, 2 Aug 2012 11:04:31 +0000 (12:04 +0100)
committerTim Deegan <tim@xen.org>
Thu, 2 Aug 2012 11:04:31 +0000 (12:04 +0100)
This allows us to get rid of the 'grep version', which doesn't
work with localized compilers.

Signed-off-by: Tim Deegan <tim@xen.org>
Acked-by: Keir Fraser <keir@xen.org>
Committed-by: Tim Deegan <tim@xen.org>
xen/Makefile

index b97a26df21a9b34f997189277dccbb58b82e41af..f6cbb9a5834318baa85b62c30856c94080401c19 100644 (file)
@@ -103,7 +103,7 @@ include/xen/compile.h: include/xen/compile.h.in .banner
            -e 's/@@whoami@@/$(XEN_WHOAMI)/g' \
            -e 's/@@domain@@/$(XEN_DOMAIN)/g' \
            -e 's/@@hostname@@/$(shell hostname)/g' \
-           -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) -v 2>&1 | grep version | tail -1)!g' \
+           -e 's!@@compiler@@!$(shell $(CC) $(CFLAGS) --version 2>&1 | head -1)!g' \
            -e 's/@@version@@/$(XEN_VERSION)/g' \
            -e 's/@@subversion@@/$(XEN_SUBVERSION)/g' \
            -e 's/@@extraversion@@/$(XEN_EXTRAVERSION)/g' \