qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Juan Quintela <quintela@redhat.com>
To: Paul Brook <paul@codesourcery.com>
Cc: Paolo Bonzini <bonzini@gnu.org>, qemu-devel@nongnu.org
Subject: [Qemu-devel] Re: [PATCH 00/37] Generate a proper LIBS variable
Date: Thu, 23 Jul 2009 17:45:57 +0200	[thread overview]
Message-ID: <m3skgn4d3e.fsf@neno.mitica> (raw)
In-Reply-To: <200907231036.29505.paul@codesourcery.com> (Paul Brook's message of "Thu\, 23 Jul 2009 10\:36\:28 +0100")

Paul Brook <paul@codesourcery.com> wrote:
>> I tend to think that using the same libraries for all binaries is a good
>> idea, but I think we shouldn't confuse the isues.
>
> Usermode and full system emulation are completely different applications. It 
> makes no sense to use the same set of libraries.

Ok, switching to:

libs : for everything
libs_softmmu
libs_linux
libs_bsd
libs_darwin

ldflags <- similar, not a big problem

CFLAGS/CPPFLAGS, this is a whole different can of worms

As of know, we have:
- OS_FLAGS
- ARCH_FLAGS
- CFLAGS
- CPPFLAGS
- CFLAGS for specific files (KVM_CFLAGS and similars)
- CFLAGS for some libs that got compiled all files with
- HELPER_CFLAGS
- SP_FLAGS (already killed on my patches, it is know part of ARCH_FLAGS)
- EXTRA_CFLAGS

Starting in configure, which flags are used for each test: random mix of
CFLAGS + EXTRA_CFLAGS + OS_FLAGS + ARCH_FLAGS

Clearly, not an ideal solution.

What we want to be able to do:
a- let the user add CFLAGS to all the tests and build
b- let the user overwrote CFLAGS generated by ./configure + Makefile
c- the several files be compiled with diffrent CFLAGS
d- let the user change the CFLAGS for a specific file from command line
   make; rm foo.o; make CFLAGS=""

Solution so far:

CPPFLAGS is for stuff that you "really" need, i.e. include paths and
         Defines
CFLAGS is for the rest of options, that can be "removed"

My proposal:

To fix the issues:

a: CFLAGS="-Dfoo -Ivar" ./configure
   Do what you expect, basically be carefull in configure to allways do
   CFLAGS="<something> $CFLAGS" for things that used to go in OS_FLAGS +
   CFLAGS + ARCH_CFLAGS
   Be careful about what we put into CFLAGS/CPPFLAGS

b: is solved with previous approach,if you do
   CFLAGS="<somethnig $CFLAGS", EXTRA_CFLAGS is not needed, you can
   remove it.
c: use one of the current approach,
     foo.o: CFLAGS := $(CFLAGS) $(FOO_CFLAGS) (only one case of this one)
     foo.o: CFLAGS += $(FOO_FLAGS)


d: if we do the FOO_FLAGS in CPPFLAGS, now
   make CFLAGS="-O0"
   or other changes work as expected.

WHat do you think?

Later, Juan.

  reply	other threads:[~2009-07-23 15:48 UTC|newest]

Thread overview: 59+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-17 19:20 [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 01/37] change HOST_SOLARIS to CONFIG_SOLARIS{_VERSION} quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 02/37] Remove SP_CFLAGS and SP_LDFLAGS quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 03/37] target_arch2 is redefined unconditionally later quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 04/37] remove CONFIG_ from VNC_TLS_{LIBS, FLAGS} quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 05/37] use same algorithm for testing and quintela
2009-07-17 19:20 ` [Qemu-devel] [PATCH 06/37] remove CONFIG_ from VNC_SASL_{LIBS, FLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 07/37] remove CONFIG_ from BLUEZ_{LIBS,FLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 08/37] make fmod also use FMOD_{LIBS,CFLAGS} quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 09/37] make oss use OSS_LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 10/37] move printing of config-host.mak variables to end of generation quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 11/37] more specific config.mak can overwrote more general config.mak quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 12/37] generate CPPFLAGS and LIBS on ./configure quintela
2009-07-17 20:43   ` Blue Swirl
2009-07-17 19:21 ` [Qemu-devel] [PATCH 13/37] fold PTHREADLIBS and CLOCKLIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 14/37] CONFIG_SOLARIS always want -lsockt -lnsl -lresolv quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 15/37] Add -static in configure if needed quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 16/37] generate CONFIG_WIN32 libraries in configure quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 17/37] fold VDE_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 18/37] fold CURL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 19/37] fold BRLAPI_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 20/37] fold CURSES_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 21/37] fold XEN_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 22/37] fold BLUEZ_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 23/37] fold VNC_TLS_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 24/37] fold VNC_SASL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 25/37] Rename HAVE_FDT to CONFIG_FDT and define it also in Makefile quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 26/37] Refactor code to remove one #ifdef CONFIG_FDT quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 27/37] fold FDT_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 28/37] fold NEEDS_LIBSUNMATH on generic variables quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 29/37] fold FMOD_LIBS on generic LIBS quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 30/37] fold OSS_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 31/37] fold ALSA libs " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 32/37] fold DSOUND " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 33/37] fold Pulse Audio " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 34/37] fold ESD " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 35/37] fold COCOA_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 36/37] fold SDL_LIBS " quintela
2009-07-17 19:21 ` [Qemu-devel] [PATCH 37/37] remove rt variable, we can assign directly LIBS quintela
2009-07-17 19:35 ` [Qemu-devel] [PATCH 00/37] Generate a proper LIBS variable Blue Swirl
2009-07-17 19:41   ` [Qemu-devel] " Juan Quintela
2009-07-22 12:57 ` [Qemu-devel] " Anthony Liguori
2009-07-22 16:38   ` [Qemu-devel] " Paolo Bonzini
2009-07-22 16:59     ` Juan Quintela
2009-07-22 18:09       ` Anthony Liguori
2009-07-22 18:19         ` Juan Quintela
2009-07-22 18:24           ` Anthony Liguori
2009-07-22 22:33             ` Paul Brook
2009-07-22 22:57               ` Anthony Liguori
2009-07-23  3:19               ` Juan Quintela
2009-07-23  3:28                 ` malc
2009-07-23  6:10                   ` Juan Quintela
2009-07-23  9:36                     ` Paul Brook
2009-07-23 15:45                       ` Juan Quintela [this message]
2009-07-23 16:54                         ` Markus Armbruster
2009-07-23 17:04                           ` Anthony Liguori
2009-07-22 16:35 ` Paolo Bonzini
2009-07-22 16:51   ` Juan Quintela
2009-07-22 18:08     ` Paolo Bonzini

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=m3skgn4d3e.fsf@neno.mitica \
    --to=quintela@redhat.com \
    --cc=bonzini@gnu.org \
    --cc=paul@codesourcery.com \
    --cc=qemu-devel@nongnu.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 NNTP newsgroup(s).