From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) by sourceware.org (Postfix) with ESMTPS id 1CE963858D37 for ; Wed, 6 Apr 2022 16:26:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 1CE963858D37 Authentication-Results: sourceware.org; dmarc=pass (p=none dis=none) header.from=redhat.com Authentication-Results: sourceware.org; spf=pass smtp.mailfrom=redhat.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1649262372; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=jtHmN/FLBho/JIMD/3MpHXjzll2s8hPyPCCgeGv1hYQ=; b=hbvTeRTPM6+ue6nuUpkg5QVvt/gnQHJd6/JFjKpaMwDslZO1L+TE16JoRfoAErQ+zAbq+4 Y0by+FhZiTsdbNdK71mjmpYPr7VDJUu8JgAdc902r+x9j1IhECzRVUaGTUT3o0KUC/BBO4 igj6LgEuM+U+oNfJev+QUDouKM51Mq0= Received: from mail-yw1-f199.google.com (mail-yw1-f199.google.com [209.85.128.199]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-47-0fered2mNZu4nH4R7jnJlA-1; Wed, 06 Apr 2022 12:26:11 -0400 X-MC-Unique: 0fered2mNZu4nH4R7jnJlA-1 Received: by mail-yw1-f199.google.com with SMTP id 00721157ae682-2e5db04460cso25098737b3.17 for ; Wed, 06 Apr 2022 09:26:11 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jtHmN/FLBho/JIMD/3MpHXjzll2s8hPyPCCgeGv1hYQ=; b=excNiYm7o5ChmLy4TBJVtlZFsDYMFinZKFSeoC1Rybv6AkdEIUbS/RUAGFrVnPw8Nu mTdWTDPmd5lxUhTZsg0MivdsUsbVg87kn/Kt7W+PTFFpxMCPxrezVdTV9LL0s8HpsSdL 2yfoTpdkP6et2vUjFLG8U3Ob5zzoONJ/x0XAxat78KY7Eqxbgr60PFPmDTFywiy39t2G xPLTBNBZDP3SSYQqmaQyKdYXE4PhChFFS4pN4Pi8N0ig1XQtXHig5k5NrEW26SK0dPaP FJ0Pw4M2FI52Y6Zf/9/3wcou4AZuP97L4eKUCyHjCT6dJCSCQFnN0w55o95L3yQxY8EU P0dw== X-Gm-Message-State: AOAM532TCKCRdf3EvOeULNEzZxGkfreahifhzVQ/zYvQZEq26F7PlZbL O7etAjsIuuprAXPGL30JYWWrUNtiXQebzTnCXdZzGz7oi66cUZJQlMb8SapGeh6rmaYIFi+lIbY j/9fpf7VcSG9rH8luNDE23PxylchTTM0= X-Received: by 2002:a81:9852:0:b0:2eb:9b44:37fc with SMTP id p79-20020a819852000000b002eb9b4437fcmr7809668ywg.263.1649262370810; Wed, 06 Apr 2022 09:26:10 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxvjmu5D3DuqkMX00npyRUVqRi9uMxp9EpuxA74OA2Kbwl5jiZetpPpgVNnsJ7vkzCOY7amA/jCDHdAUUickRc= X-Received: by 2002:a81:9852:0:b0:2eb:9b44:37fc with SMTP id p79-20020a819852000000b002eb9b4437fcmr7809649ywg.263.1649262370599; Wed, 06 Apr 2022 09:26:10 -0700 (PDT) MIME-Version: 1.0 References: <0e04b11a-1b6d-c70a-c0fe-4ece59996461@codesourcery.com> <974300f4-f4cc-2645-ae6e-75514a93a8b4@codesourcery.com> In-Reply-To: From: Jeff Johnston Date: Wed, 6 Apr 2022 12:25:59 -0400 Message-ID: Subject: Re: *ping* [Patch] (2/n) newlib: Move vasniprintf.c to ELIX 1 (was: Build-dependency issues with ELIX_LEVEL) To: Tobias Burnus Cc: Newlib Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=jjohnstn@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com X-Spam-Status: No, score=-4.8 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, HTML_MESSAGE, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H4, RCVD_IN_MSPIKE_WL, SPF_HELO_NONE, SPF_NONE, TXREP, T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.4 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on server2.sourceware.org Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.29 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: Wed, 06 Apr 2022 16:26:14 -0000 Tobias, Looking at the standard: https://www.sourceware.org/elix/api/current/api.html vasnprintf and vasniprintf should not be made lower than vasprintf and aprintf which are specifically mentioned in the standard as 2. Regardless, vdprintf and vdiprintf should never have been Level 1. I think that moving vdprintf/vdiprintf to level 4 is the correct solution as part of the EL/IX level benefit is to reduce unused/unneeded functionality in the lower levels. As no one has found this before, vdprintf or vdiprintf are clearly not basic Level 1 functions and moving to 4 won't affect current users as it wouldn't work unless the level is 4 or unspecified. -- Jeff J. On Wed, Apr 6, 2022 at 1:12 AM Tobias Burnus wrote: > *ping* > > On 30.03.22 12:56, Tobias Burnus wrote: > > Attached is a revised version of the patch in the first email in the > > thread. > > Found when looking for referenced but not provided functions > > with nvptx, which sets ELIX Level to 1. > > > > > > libc/stdio/vdiprintf.c's _vdiprintf_r calls _vasniprintf_r > > The file is compiled with ELIX Level 1. > > > > The function _vasniprintf_r is provided either via > > * libc/stdio/vasniprintf.c which calls _svfiprintf_r > > * libc/stdio/vasnprintf.c (only '#ifdef _NANO_FORMATTED_IO') > > which calls _svfprintf_r > > > > We can ignore the second file as no NANO function calls > > it. Thus, only the first file (vasniprintf.c) remains. > > > > The _svfiprintf_r / _svfiprintf_r are provided by > > libc/stdio/(nano-)vfprintf.c > > Those files are also available with ELIX Level 1. > > > > > > Solution: Also build vasniprintf.c with ELIX Level 1 > > instead of building it with ELIX Level 4. > > > > The change should be save as the only library call I see > > in that file (vasniprintf.c) is to vfprintf.c. And on the > > caller side, the call to _vasniprintf_r is not guarded by > > any #if. Thus, no new dependencies should get introduced > > by this change. > > > > > > OK? Comments? > > > > Tobias > > (Makefile.inc patch + regenerated Makefile.in as separate patch) > ----------------- > Siemens Electronic Design Automation GmbH; Anschrift: Arnulfstra=C3=9Fe 2= 01, > 80634 M=C3=BCnchen; Gesellschaft mit beschr=C3=A4nkter Haftung; Gesch=C3= =A4ftsf=C3=BChrer: > Thomas Heurung, Frank Th=C3=BCrauf; Sitz der Gesellschaft: M=C3=BCnchen; > Registergericht M=C3=BCnchen, HRB 106955 > >