public inbox for newlib@sourceware.org
 help / color / mirror / Atom feed
* amdgcn build failure
@ 2022-03-18 11:43 Andrew Stubbs
  2022-03-20  1:20 ` Mike Frysinger
  0 siblings, 1 reply; 4+ messages in thread
From: Andrew Stubbs @ 2022-03-18 11:43 UTC (permalink / raw)
  To: Newlib, Mike Frysinger

Hi Mike, all,

Following your commit 96bc16f, merged yesterday, my amdgcn toolchain 
fails to build. The Newlib built itself completes successfully, but 
subsequent use of the library is broken.

The problem seems to be related to the __malloc_lock function, but I 
can't quite work out why. Here's the error message:

ld: error: duplicate symbol: __malloc_lock
 >>> defined at mlock.c:42 (..../newlib/libc/stdlib/mlock.c:42)
 >>>            libc_a-mlock.o:(__malloc_lock) in archive 
..../amdgcn-amdhsa/lib/libc.a
 >>> defined at malloc_support.c:69 
(..../newlib/libc/machine/amdgcn/malloc_support.c:69)
 >>>            libc_a-malloc_support.o:(.text+0x1F8) in archive 
..../install/amdgcn-amdhsa/lib/libc.a

ld: error: duplicate symbol: __malloc_unlock
 >>> defined at malloc.h:138 (..../newlib/libc/include/malloc.h:138)
 >>>            libc_a-mlock.o:(__malloc_unlock) in archive 
..../amdgcn-amdhsa/lib/libc.a
 >>> defined at malloc_support.c:96 
(..../newlib/libc/machine/amdgcn/malloc_support.c:96)
 >>>            libc_a-malloc_support.o:(.text+0x438) in archive 
..../install/amdgcn-amdhsa/lib/libc.a
collect2: error: ld returned 1 exit status

(I should mention that the amdgcn port uses the LLVM binary utilities, 
so the error messages look a little different to GNU ld. I've also 
elided the long pathnames with "....".)

Previously only the machine-specific __malloc_lock was used, which is of 
course the one I want.

Should those functions be added differently now?

Thanks

Andrew

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

end of thread, other threads:[~2022-03-23  1:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-03-18 11:43 amdgcn build failure Andrew Stubbs
2022-03-20  1:20 ` Mike Frysinger
2022-03-21 14:25   ` Andrew Stubbs
2022-03-23  1:45     ` Mike Frysinger

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).