From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from esa3.mentor.iphmx.com (esa3.mentor.iphmx.com [68.232.137.180]) by sourceware.org (Postfix) with ESMTPS id 6E9E73858C2C for ; Fri, 18 Mar 2022 11:43:57 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 6E9E73858C2C Authentication-Results: sourceware.org; dmarc=none (p=none dis=none) header.from=codesourcery.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=mentor.com X-IronPort-AV: E=Sophos;i="5.90,192,1643702400"; d="scan'208";a="73156270" Received: from orw-gwy-01-in.mentorg.com ([192.94.38.165]) by esa3.mentor.iphmx.com with ESMTP; 18 Mar 2022 03:43:57 -0800 IronPort-SDR: +zykWJ7OmYFMjaMFIs/SlZTQPhEzGYL+9ZU/fnYLWWKldBGQwEPOgb+dbKjJ9gF7vUUEIitxJB /BN7E/A9zEjy11gCEynZ4I164unr8ZRodUs9DfykZTQ9Q7aoPtOHI/v0tKqDn4gRP9pGSeRSkz nILsAkfiZrlZhAKWB9dE4YY/fl/qtqTkkPS3D3gA5mrBEFgPV6ZAPNfbBYIl6TMTz7gdAjIpb/ +aJfBWGjamauTydpdFJXhvveVp6J4neakRZS3gqimskihc1XQ+W2Z5tvbSTOPFfEgkitE80GEi 6Fc= Message-ID: Date: Fri, 18 Mar 2022 11:43:51 +0000 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Thunderbird/91.7.0 X-Mozilla-News-Host: news://news.gmane.org:119 Content-Language: en-GB To: Newlib , Mike Frysinger From: Andrew Stubbs Subject: amdgcn build failure Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: 7bit X-Originating-IP: [137.202.0.90] X-ClientProxiedBy: svr-ies-mbx-06.mgc.mentorg.com (139.181.222.6) To svr-ies-mbx-01.mgc.mentorg.com (139.181.222.1) X-Spam-Status: No, score=-5.5 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS, KAM_DMARC_STATUS, SPF_HELO_PASS, SPF_PASS, TXREP, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org X-BeenThere: newlib@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Newlib mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 18 Mar 2022 11:43:59 -0000 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