]> git.sesse.net Git - stockfish/commitdiff
Merge remote-tracking branch 'upstream/master'
authorSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 26 Dec 2022 08:41:43 +0000 (09:41 +0100)
committerSteinar H. Gunderson <sgunderson@bigfoot.com>
Mon, 26 Dec 2022 08:41:43 +0000 (09:41 +0100)
1  2 
src/Makefile
src/misc.cpp
src/position.cpp

diff --cc src/Makefile
index 23c19bfb43c7253faafa30621fcf72892d06fe56,500c100675d0e8436355606f53e0b6cea38d1800..171f966cc2473b53a7c7ac531b3ba42778edb618
@@@ -365,9 -366,9 +369,9 @@@ endi
  ifeq ($(COMP),gcc)
        comp=gcc
        CXX=g++
 -      CXXFLAGS += -pedantic -Wextra -Wshadow
 +      CXXFLAGS += -pedantic -Wextra
  
-       ifeq ($(arch),$(filter $(arch),armv7 armv8))
+       ifeq ($(arch),$(filter $(arch),armv7 armv8 riscv64))
                ifeq ($(OS),Android)
                        CXXFLAGS += -m$(bits)
                        LDFLAGS += -m$(bits)
diff --cc src/misc.cpp
index 9cfd63047606555db23fb81f35ba781337e5701b,c7fa0e9ae104927867675cf4dbc2698df6cb2bd3..3c336c3014c7b5a4524df40c7b03c04dd560f866
@@@ -138,24 -137,41 +137,35 @@@ public
  } // namespace
  
  
- /// engine_info() returns the full name of the current Stockfish version. This
- /// will be either "Stockfish <Tag> DD-MM-YY" (where DD-MM-YY is the date when
- /// the program was compiled) or "Stockfish <Version>", depending on whether
- /// Version is empty.
+ /// engine_info() returns the full name of the current Stockfish version.
+ /// For local dev compiles we try to append the commit sha and commit date
+ /// from git if that fails only the local compilation date is set and "nogit" is specified:
+ /// Stockfish dev-YYYYMMDD-SHA
+ /// or
+ /// Stockfish dev-YYYYMMDD-nogit
+ ///
+ /// For releases (non dev builds) we only include the version number:
+ /// Stockfish version
  
  string engine_info(bool to_uci) {
+   stringstream ss;
+   ss << "Stockfish " << version << setfill('0');
  
-   const string months("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec");
-   string month, day, year;
-   stringstream ss, date(__DATE__); // From compiler, format is "Sep 21 2008"
-   ss << "Stockfish " << Version << setfill('0');
-   if (Version.empty())
+   if (version == "dev")
    {
+       ss << "-";
+       #ifdef GIT_DATE
+       ss << GIT_DATE;
+       #else
+       const string months("Jan Feb Mar Apr May Jun Jul Aug Sep Oct Nov Dec");
+       string month, day, year;
+       stringstream date(__DATE__); // From compiler, format is "Sep 21 2008"
        date >> month >> day >> year;
-       ss << setw(2) << day << setw(2) << (1 + months.find(month) / 4) << year.substr(2);
+       ss << year << setw(2) << setfill('0') << (1 + months.find(month) / 4) << setw(2) << setfill('0') << day;
+       #endif
 -      ss << "-";
 -
 -      #ifdef GIT_SHA
 -      ss << GIT_SHA;
 -      #else
 -      ss << "nogit";
 -      #endif
 +      ss << "-asn";
    }
  
    ss << (to_uci  ? "\nid author ": " by ")
Simple merge