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.133.124]) by sourceware.org (Postfix) with ESMTPS id 4BAF23858420 for ; Wed, 2 Mar 2022 09:46:34 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.4.1 sourceware.org 4BAF23858420 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=1646214394; h=from:from:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references; bh=mIgNBA2LvL1PMeMFDx3ebjwUwQnWfjA5g/aqxfGErVI=; b=CxjH9aSFSOaJizBABo/5f2Cm0RWXaApM8hH4zbbQOvkStPM5z/Dxx43xpvvz9EJo5n0UNb Rl+1jxW3h+BiwAHVPRhXYDmrbLcQlDh+v3wD8nAAvWf6aavSxpbt7Z6YHbYjwbvb4SnwgZ k8fCumcgbOt+t8Gy0yAa05kZXAGzn0E= Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id us-mta-32-iVfK-hZUOQSMaOxw_pN3nA-1; Wed, 02 Mar 2022 04:46:32 -0500 X-MC-Unique: iVfK-hZUOQSMaOxw_pN3nA-1 Received: from smtp.corp.redhat.com (int-mx07.intmail.prod.int.phx2.redhat.com [10.5.11.22]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id 5CB89801AAD for ; Wed, 2 Mar 2022 09:46:31 +0000 (UTC) Received: from calimero.vinschen.de (unknown [10.36.112.5]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 2BAB21038AC6 for ; Wed, 2 Mar 2022 09:46:31 +0000 (UTC) Received: by calimero.vinschen.de (Postfix, from userid 500) id 9171AA80772; Wed, 2 Mar 2022 10:46:29 +0100 (CET) Date: Wed, 2 Mar 2022 10:46:29 +0100 From: Corinna Vinschen To: newlib@sourceware.org Subject: Re: [PATCH 3/6] newlib: xstormy16: fix mallopt definition & mstats handling Message-ID: Reply-To: newlib@sourceware.org Mail-Followup-To: newlib@sourceware.org References: <20220302013623.368-1-vapier@gentoo.org> <20220302013623.368-4-vapier@gentoo.org> MIME-Version: 1.0 In-Reply-To: <20220302013623.368-4-vapier@gentoo.org> X-Scanned-By: MIMEDefang 2.84 on 10.5.11.22 Authentication-Results: relay.mimecast.com; auth=pass smtp.auth=CUSA124A263 smtp.mailfrom=vinschen@redhat.com X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain; charset=utf-8 Content-Disposition: inline X-Spam-Status: No, score=-12.4 required=5.0 tests=BAYES_00, DKIMWL_WL_HIGH, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, DKIM_VALID_EF, GIT_PATCH_0, RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5, 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 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, 02 Mar 2022 09:46:35 -0000 On Mar 1 20:36, Mike Frysinger wrote: > The mallopt symbol is defined in tiny-malloc.c, not mallocr.c, but > the Makefile in here tries to compile it out of the latter. This > leads to mallopt never being defined. > > The build also creates mallinfo.o & mallopt.o & mallstats.o objects > to override common ones, but the common dir doesn't use these names. > Instead, it places these all in mstats.o. > > So move the build define logic to a dedicated file and compile it > directly to make things a bit simpler while fixing the missing func > and aligning objects with the cmomon code. > --- > newlib/libc/machine/xstormy16/Makefile.am | 15 ++-------- > newlib/libc/machine/xstormy16/Makefile.in | 36 +++++++++++++---------- > newlib/libc/machine/xstormy16/mstats.c | 6 ++++ > 3 files changed, 29 insertions(+), 28 deletions(-) > create mode 100644 newlib/libc/machine/xstormy16/mstats.c > [...] > diff --git a/newlib/libc/machine/xstormy16/mstats.c b/newlib/libc/machine/xstormy16/mstats.c > new file mode 100644 > index 000000000000..1bd24da555f1 > --- /dev/null > +++ b/newlib/libc/machine/xstormy16/mstats.c > @@ -0,0 +1,6 @@ > +/* stdlib/mstats.c defines all these symbols in this file. > + TODO: Missing mstats function. */ > +#define DEFINE_MALLINFO > +#define DEFINE_MALLOC_STATS > +#define DEFINE_MALLOPT > +#include "tiny-malloc.c" XStormy16 is such a small target, it would be better to split these into three files. Corinna