From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by sourceware.org (Postfix) with ESMTP id 588753858D32 for ; Mon, 19 Feb 2024 16:20:05 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.2 sourceware.org 588753858D32 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=arm.com ARC-Filter: OpenARC Filter v1.0.0 sourceware.org 588753858D32 Authentication-Results: server2.sourceware.org; arc=none smtp.remote-ip=217.140.110.172 ARC-Seal: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708359606; cv=none; b=t7jNaYOKyookYpfaH9J3LgEruIG02mmvgUbr+oA6VVxkN7O91dh6+vwYFSIGoVKKlzQeMtlQBjeZ16du1DGtqcNBK3+YQJmiS8MTpL9J0USvXAgEFYr+RYLOCGYFxpRZmznX3GKFVXBhTbl+AkUzOOYes2dMkuuIk68vjBFGXxA= ARC-Message-Signature: i=1; a=rsa-sha256; d=sourceware.org; s=key; t=1708359606; c=relaxed/simple; bh=iuWTqFo4FaWsV/+rtWPVzI0PlrnYIQp/nIbDSlAkP68=; h=Message-ID:Date:MIME-Version:Subject:To:From; b=PE+9tiXazUhm1+hHVQRBLGdH+VW9W+lR1V335Waka2eQJ+jeBVUuvRIn3AfD0jYq83SAEXdA0mXCfVSSMH2CawiO4eowL3JNKCiSc4pN+oMPKz/ysVHiAkVoF4/SHGhbmw8dGFGVOHnFFViTKw3pY8jxBRWNqXdWsL3YD6zvXPo= ARC-Authentication-Results: i=1; server2.sourceware.org Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id D1C981007; Mon, 19 Feb 2024 08:20:44 -0800 (PST) Received: from [10.2.78.54] (e120077-lin.cambridge.arm.com [10.2.78.54]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPSA id 870BC3F762; Mon, 19 Feb 2024 08:20:04 -0800 (PST) Message-ID: Date: Mon, 19 Feb 2024 16:20:03 +0000 MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: undefined reference to __ssputws_r with --specs=nano.specs Content-Language: en-GB To: Torbjorn SVENSSON , Newlib References: <15f5e1aa-e9a7-4a67-8eaa-b42f17f5a158@foss.st.com> From: "Richard Earnshaw (lists)" In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Spam-Status: No, score=-3491.7 required=5.0 tests=BAYES_00,KAM_DMARC_NONE,KAM_DMARC_STATUS,KAM_LAZY_DOMAIN_SECURITY,SPF_HELO_NONE,SPF_NONE,TXREP,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on server2.sourceware.org List-Id: On 15/02/2024 15:19, Torbjorn SVENSSON wrote: > Hi again, > > Anyone having some insights on the below question? > > Kind regards, > Torbjörn > > On 2024-02-06 18:40, Torbjorn SVENSSON wrote: >> Hi, >> >> I noticed that a lot of testcases fails when running the GCC testsuite with --specs=nano.specs. >> Below is an example that fails with --specs=nano.specs: >> >> $ /build/13-head-bin/bin/arm-none-eabi-g++ /build/gcc13_src/gcc/testsuite/g++.dg/coroutines/pr100611.C -std=c++20 --specs=nosys.specs -o /dev/null --specs=nano.specs >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc_nano.a(libc_a-svfwprintf.o): in function `_svfwprintf_r': >> (.text._svfwprintf_r+0xd8): undefined reference to `__ssputws_r' >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x834): undefined reference to `__ssputws_r' >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x85c): undefined reference to `__ssputws_r' >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x8a8): undefined reference to `__ssputws_r' >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: (.text._svfwprintf_r+0x8dc): undefined reference to `__ssputws_r' >> /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/bin/ld: /build/13-head-bin/bin/../lib/gcc/arm-none-eabi/13.2.1/../../../../arm-none-eabi/lib/libc_nano.a(libc_a-svfwprintf.o):(.text._svfwprintf_r+0x900): more undefined references to `__ssputws_r' follow >> collect2: error: ld returned 1 exit status >> >> >> The newlib nano is configured with: >> >> --disable-newlib-supplied-syscalls >> --enable-newlib-reent-check-verify >> --enable-newlib-reent-small >> --enable-newlib-retargetable-locking >> --disable-newlib-fvwrite-in-streamio >> --disable-newlib-fseek-optimization >> --disable-newlib-wide-orient >> --enable-newlib-nano-malloc >> --disable-newlib-unbuf-stream-opt >> --enable-lite-exit >> --enable-newlib-global-atexit >> --enable-newlib-nano-formatted-io >> --disable-nls >> >> >> Is it expected that the symbol __ssputws_r is referenced but not provided when (I presume this is the reason) --enable-newlib-nano-formatted-io and --disable-newlib-wide-orient is used? >> >> Kind regards, >> Torbjörn newlib/Makefile.in contains: @HAVE_STDIO_DIR_TRUE@@NEWLIB_NANO_FORMATTED_IO_FALSE@ libc/stdio/ssputws_r.c \ But: @HAVE_STDIO_DIR_TRUE@ libc/stdio/svfwprintf.c \ So I'm guessing the latter should be similarly guarded. There may be other wprint/wscan functions that should be similarly guarded.