From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Fabrice Fontaine <fontaine.fabrice@gmail.com>
Cc: Steve Kenton <skenton@ou.edu>, buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH 1/1] package/memtest86: pass TARGET_CC
Date: Sat, 9 Dec 2023 10:28:13 +0100 [thread overview]
Message-ID: <ZXQzLeF6j3U1TOjU@landeda> (raw)
In-Reply-To: <CAPi7W81SxGKzj7feR4i6TtwJZNjBYsADqMw-2ZriWb2oLc+bTQ@mail.gmail.com>
Fabrice, All,
On 2023-12-09 00:20 +0100, Fabrice Fontaine spake thusly:
> Le sam. 9 déc. 2023 à 00:12, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
> > On 2023-12-09 00:04 +0100, Fabrice Fontaine spake thusly:
> > > Le ven. 8 déc. 2023 à 23:54, Yann E. MORIN <yann.morin.1998@free.fr> a écrit :
> > > > On 2023-12-07 23:09 +0100, Fabrice Fontaine spake thusly:
> > > > > Pass CC=$(TARGET_CC) to make to avoid the following build failure raised
> > > > > since bump to version 6.20 in commit
> > > > > a743087593a5fd5b33e2650591cada09929c27a6:
> > [--SNIP--]
> > > > > define MEMTEST86_BUILD_CMDS
> > > > > - $(TARGET_CONFIGURE_OPTS) $(MAKE) -C $(@D)/$(MEMTEST86_BUILD_DIR)
> > > > > + $(TARGET_CONFIGURE_OPTS) $(MAKE) CC=$(TARGET_CC) \
> > > > CC=$(TARGET_CC) is already present in TARGET_CONFIGURE_OPTS, so why is
> > > > it not accounted for?
> > > Because "CC=$(TARGET_CC) make" is not the same as "make
> > > CC=$(TARGET_CC)"
> >
> > Yeah, I know that pretty well (even if I never remember the rules of
> > precedence for the environment, argument, and Makefile variables)...
> >
> > > as build{32,64}/Makefile is setting CC to gcc.
> >
> > But that was not the case previously, I guess, as you said it appeared
> > with the bump to 6.20. So maybe we should now move the whole of
> > $(TARGET_CONFIGURE_OPTS) to be arguments rather than environment
> > variables, instead of just moving CC there.
>
> I already tried that but it raises a build failure because the
> following CFLAGS will be overridden:
>
> CFLAGS = -std=c11 -Wall -Wextra -Wshadow -m32 -march=i586 -fpic -fno-builtin \
> -ffreestanding -fomit-frame-pointer -fno-stack-protector
OK, but then it means we also have to forcibly override a few other
variables, as the Makefile defines them:
AS = as -64
CC = gcc
OBJCOPY = objcopy
Both AS and OBJCOPY are equally wrong in cross-compilation as CC is.
But for LD, it does iuse the one from the environment.
Also, arguably, letting the packag define its own CFLAGS is not nice,
because it is missing all the ones we are setting, like the _FORTIFY,
the optimisations, or the debug levels...
But in fact, memtest86+ is a free-standing project (it runs as a kernel
or a bootloader in fact), so that's OK to let it override those CFLAGS.
Also, I know why that did not happen in previous versions: we simply
were not building memtes86+ and were just copying the pre-built files.
Can you please respin to account for AS and OBJDUMP, and add a blurb
that CFLAGS is overriden but that's OK?
Regards,
Yann E. MORIN.
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2023-12-09 9:28 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-12-07 22:09 [Buildroot] [PATCH 1/1] package/memtest86: pass TARGET_CC Fabrice Fontaine
2023-12-08 22:53 ` Yann E. MORIN
2023-12-08 23:04 ` Fabrice Fontaine
2023-12-08 23:12 ` Yann E. MORIN
2023-12-08 23:20 ` Fabrice Fontaine
2023-12-09 9:28 ` Yann E. MORIN [this message]
2023-12-23 20:10 ` Thomas Petazzoni via buildroot
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=ZXQzLeF6j3U1TOjU@landeda \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=fontaine.fabrice@gmail.com \
--cc=skenton@ou.edu \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.