From: Julien Letessier <julien.letessier@technosens.fr>
To: buildroot@busybox.net
Subject: [Buildroot] $(TARGET_CONFIGURE_OPTS) $(MAKE) vs $(MAKE) $(TARGET_CONFIGURE_OPTS)
Date: Mon, 9 Jul 2007 15:41:35 +0200 [thread overview]
Message-ID: <f0528b5b0707090641j2bd8c39ap101012d7716ba67b@mail.gmail.com> (raw)
In-Reply-To: <20070709122041.GA30238@real.realitydiluted.com>
I'm following the discussion and would like to make a point:
all of this is irrelevant for packages that use the GNU auto* tools properly
(i.e. a whole lot of packages).
Their configure script uses the TARGET_CONFIGURE_OPTS to generate correct
makefiles, and no flags should thereafter be passed to $(MAKE) directly (or
they'll break).
So IMO,
$(MAKE) -C $(FOO_DIR) $(TARGET_CONFIGURE_OPTS)
will almost always break such a package. Even packages that just
$(MAKE) -C $(FOO_DIR) CC=$(TARGET_CC)
break more often than not.
The whole discussion is only relevant for packages (like openssh) that do
*not* use the GNU build system.
Again, IMHO, such packages should be fixed using patches instead of trying
to coerce buildroot into building them with a common method, e.g. by
changing
CC = gcc
CFLAGS = -g -O2 -I./whatever
in such packages into
CC = $(TARGET_CC)
CFLAGS = $(TARGET_CFLAGS) -I./whatever
using a patch, on a case-by-case basis. Again, I feel that packages that
require this are scarse.
My 2/100 euros.
-- ju
2007/7/9, Steven J. Hill <sjhill@realitydiluted.com>:
>
> > This hunk of yours is really broken:
> > TARGET_CONFIGURE_OPTS=... \
> > CC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
> > GCC="$(TARGET_CROSS)gcc $(TARGET_CFLAGS)" \
> > CXX="$(TARGET_CROSS)g++ $(TARGET_CFLAGS)" \
> > CPP="$(TARGET_CROSS)cpp $(TARGET_CFLAGS)" \
> >
> > 1) These are the compilers and not compiler plus flags.
> >
> See comment below about packages breaking.
>
> > 2) CFLAGS are wrong as CXXFLAGS
> >
> So when compiling C++ code, and if I want the -Os and other options,
> how do you suggest we pass them.
>
> > 3) since your change we end up using the default flags from the
> > packages, which more often than not default to -O2. Let me refer you to
> > options.c of gcc (or the respective docs for the gory details).
> >
> Thanks, I am able to read code.
>
> > I am going to revert this change for now. What were you trying to
> > do/solve?
> >
> A number of packages break unless the above is done. By overriding
> CFLAGS in the top-level makefile, CFLAGS in packages themselves get
> overridden and fail to build. Essentially if you do not like the
> method above, then a bunch of packages will need to be changed in
> order to work properly with CFLAGS be specified at the very top.
>
> -Steve
> _______________________________________________
> buildroot mailing list
> buildroot at uclibc.org
> http://busybox.net/mailman/listinfo/buildroot
>
--
Julien Letessier
<julien.letessier@technosens.fr>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://busybox.net/lists/buildroot/attachments/20070709/16e56ae1/attachment.htm
next prev parent reply other threads:[~2007-07-09 13:41 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-07-06 12:35 [Buildroot] What is the proper procedure to commit a patch? Ulf Samuelsson
2007-07-06 15:26 ` Bernhard Fischer
2007-07-06 15:36 ` Ulf Samuelsson
2007-07-07 10:12 ` Bernhard Fischer
2007-07-07 11:16 ` Ulf Samuelsson
2007-07-07 12:35 ` Bernhard Fischer
2007-07-07 13:46 ` Ulf Samuelsson
2007-07-06 15:55 ` Steven J. Hill
2007-07-06 21:10 ` Ulf Samuelsson
2007-07-07 10:06 ` [Buildroot] $(TARGET_CONFIGURE_OPTS) $(MAKE) vs $(MAKE) $(TARGET_CONFIGURE_OPTS) Ulf Samuelsson
2007-07-07 13:01 ` Bernhard Fischer
2007-07-07 16:06 ` Ulf Samuelsson
2007-07-07 17:29 ` Bernhard Fischer
2007-07-07 19:37 ` Ulf Samuelsson
2007-07-07 21:16 ` Bernhard Fischer
2007-07-07 22:49 ` Ulf Samuelsson
2007-07-09 8:25 ` Bernhard Fischer
2007-07-09 9:21 ` Bernhard Fischer
2007-07-09 12:20 ` Steven J. Hill
2007-07-09 13:41 ` Julien Letessier [this message]
2007-07-09 13:08 ` Ulf Samuelsson
2007-07-09 16:33 ` Bernhard Fischer
2007-07-10 11:51 ` Julien Letessier
2007-07-10 18:24 ` Bernhard Fischer
2007-07-07 10:21 ` [Buildroot] What is the proper procedure to commit a patch? Bernhard Fischer
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=f0528b5b0707090641j2bd8c39ap101012d7716ba67b@mail.gmail.com \
--to=julien.letessier@technosens.fr \
--cc=buildroot@busybox.net \
/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