From: Corinna Vinschen <vinschen@redhat.com>
To: newlib@sourceware.org
Subject: Re: [PATCH 3/6] newlib: xstormy16: fix mallopt definition & mstats handling
Date: Wed, 2 Mar 2022 10:46:29 +0100 [thread overview]
Message-ID: <Yh889TnAdskLj/HK@calimero.vinschen.de> (raw)
In-Reply-To: <20220302013623.368-4-vapier@gentoo.org>
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
next prev parent reply other threads:[~2022-03-02 9:46 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-03-02 1:36 [PATCH 0/6] rework malloc logic from build rules to source files Mike Frysinger
2022-03-02 1:36 ` [PATCH 1/6] newlib: move nano-malloc logic from build " Mike Frysinger
2022-03-02 1:36 ` [PATCH 2/6] newlib: rename mallocr.c to _mallocr.c Mike Frysinger
2022-03-02 1:36 ` [PATCH 3/6] newlib: xstormy16: fix mallopt definition & mstats handling Mike Frysinger
2022-03-02 9:46 ` Corinna Vinschen [this message]
2022-03-09 9:23 ` Mike Frysinger
2022-03-10 8:12 ` Corinna Vinschen
2022-03-10 8:00 ` Sebastian Huber
2022-03-02 1:36 ` [PATCH 4/6] newlib: xstormy16: break up mallocr stubs Mike Frysinger
2022-03-02 1:36 ` [PATCH 5/6] newlib: xstormy16: move malloc multiplex logic from build to source files Mike Frysinger
2022-03-02 1:36 ` [PATCH 6/6] newlib: libc: move stdlib " Mike Frysinger
2022-03-02 9:47 ` [PATCH 0/6] rework malloc logic from build rules " Corinna Vinschen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=Yh889TnAdskLj/HK@calimero.vinschen.de \
--to=vinschen@redhat.com \
--cc=newlib@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).