ruby-changes:27821
From: nobu <ko1@a...>
Date: Fri, 22 Mar 2013 16:57:21 +0900 (JST)
Subject: [ruby-changes:27821] nobu:r39873 (trunk): compiler version
nobu 2013-03-22 16:57:09 +0900 (Fri, 22 Mar 2013) New Revision: 39873 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=39873 Log: compiler version * common.mk (showflags): show the compiler version. * configure.in (CC_VERSION): compiler with version option. Modified files: trunk/Makefile.in trunk/common.mk trunk/configure.in Index: configure.in =================================================================== --- configure.in (revision 39872) +++ configure.in (revision 39873) @@ -422,6 +422,13 @@ RUBY_CPPOUTFILE https://github.com/ruby/ruby/blob/trunk/configure.in#L422 AC_SUBST(OUTFLAG) AC_SUBST(COUTFLAG) +cc_version_option= +for option in --version -v -V -qversion; do + $CC $option > /dev/null 2>&1 || continue + cc_version='$(CC) '$option +done +AC_SUBST(CC_VERSION, $cc_version) + RUBY_UNIVERSAL_ARCH if test "$target_cpu" != "$host_cpu" -a "$GCC" = yes -a "$cross_compiling" = no -a "$universal_binary" = no; then RUBY_DEFAULT_ARCH("$target_cpu") Index: common.mk =================================================================== --- common.mk (revision 39872) +++ common.mk (revision 39873) @@ -159,6 +159,7 @@ showflags: https://github.com/ruby/ruby/blob/trunk/common.mk#L159 " DLDFLAGS = $(DLDFLAGS)" \ " SOLIBS = $(SOLIBS)" \ $(MESSAGE_END) + -@$(CC_VERSION) .PHONY: showconfig showconfig: Index: Makefile.in =================================================================== --- Makefile.in (revision 39872) +++ Makefile.in (revision 39873) @@ -53,6 +53,7 @@ arch_hdrdir = $(EXTOUT)/include/$(arch) https://github.com/ruby/ruby/blob/trunk/Makefile.in#L53 VPATH = $(arch_hdrdir)/ruby:$(hdrdir)/ruby:$(srcdir):$(srcdir)/enc:$(srcdir)/missing empty = +CC_VERSION = @CC_VERSION@ OUTFLAG = @OUTFLAG@$(empty) COUTFLAG = @COUTFLAG@$(empty) ARCH_FLAG = @ARCH_FLAG@ -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/