unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Master branch broken for MinGW by recent Gnulib update
@ 2024-05-20 12:28 Eli Zaretskii
  2024-05-20 15:30 ` Paul Eggert
  0 siblings, 1 reply; 3+ messages in thread
From: Eli Zaretskii @ 2024-05-20 12:28 UTC (permalink / raw)
  To: Paul Eggert; +Cc: emacs-devel

Paul,

The current master is broken for me, it fails to link:

  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: ../lib/libgnu.a(sha512.o): in function `sha512_process_block':
  d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x81b): undefined reference to `u64rol'
  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x841): undefined reference to `u64rol'
  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x85f): undefined reference to `u64rol'
  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x953): undefined reference to `u64rol'
  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: d:\gnu\git\emacs\trunk\lib/sha512.c:378:(.text+0x979): undefined reference to `u64rol'
  d:/usr/bin/../lib/gcc/mingw32/9.2.0/../../../../mingw32/bin/ld.exe: ../lib/libgnu.a(sha512.o):d:\gnu\git\emacs\trunk\lib/sha512.c:378: more undefined references to `u64rol' follow
  collect2.exe: error: ld returned 1 exit status

I don't understand these linker errors, because u64rol is definitely
defined in u64.h, which is included by sha512.c.  The preprocessed
source of u64rol looks like this:

  typedef uint64_t u64;
  inline u64
  u64rol (u64 x, int n)
  {
    return ((((x) << (n))) | (((x) >> (64 - n))));
  }

Which looks fine to me.

I've succeeded to build by removing the "inline" qualifier:

  /* Return X rotated left by N bits, where 0 < N < 64.  */
  u64
  u64rol (u64 x, int n)
  {
    return u64or (u64shl (x, n), u64shr (x, 64 - n));
  }

Can you please fix this ASAP?

Thanks.



^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2024-05-20 15:56 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-20 12:28 Master branch broken for MinGW by recent Gnulib update Eli Zaretskii
2024-05-20 15:30 ` Paul Eggert
2024-05-20 15:56   ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).