qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: deprecation of in-tree builds


From: Gerd Hoffmann
Subject: Re: deprecation of in-tree builds
Date: Fri, 21 Aug 2020 11:55:55 +0200

  Hi,

> If it's a matter of "I don't want my workflow to change too much", I'm
> not familiar with everybody's setups and requirements and it's not a
> precise-enough requirement for me to write the code (and block the
> inclusion of the pull request).

It's almost zero change to my workflow.  I only had to fix modular
builds (patch below).

I'm doing out-of-tree builds for ages.  First, because I consider it
good practice.  Second, because it allows me to easily test multiple
different configurations (modular vs. non-module, with/without spice,
...) without "make distclean; ./configure $otheropts", by simply having
multiple build trees.  Third, because I can just "rm -rf $builddir" and
start over in case I trap into one of the bugs our Makefiles have (not
rebuilding objects on cflags changes for example).

> What you're asking is not the final 0.1%; it's a completely different
> thing, because it _must_ be by definition half-baked.  For example here
> are all the tradeoffs that come to mind:

[ list snipped ]

> I'm rather happier to spend my time explaining details of the conversion
> if they have to hack on the build system in the near future, than to
> gather a detailed answer to these questions and any other that didn't
> come to mind.

Fully agree.

My personal take on this is we should just have configure catch in-tree
builds, print instructions for out-of-tree builds and throw an error.
Switching from in-tree to out-of-tree builds isn't that much of an issue
after all, and given that our current build system supports it too even
"git bisect" should be painless.

> (as long as you don't touch the build system of course).

And *this* should be easier once the series landed.
Also I'm looking forward to have less build system bugs.

take care,
  Gerd

-------------------------------------------------------------------
diff --git a/util/module.c b/util/module.c
index c956ef096b3b..6e63006a8fb2 100644
--- a/util/module.c
+++ b/util/module.c
@@ -113,7 +113,7 @@ static int module_load_file(const char *fname)
 {
     GModule *g_module;
     void (*sym)(void);
-    const char *dsosuf = HOST_DSOSUF;
+    const char *dsosuf = CONFIG_HOST_DSOSUF;
     int len = strlen(fname);
     int suf_len = strlen(dsosuf);
     ModuleEntry *e, *next;
@@ -221,7 +221,7 @@ bool module_load_one(const char *prefix, const char 
*lib_name)
 
     for (i = 0; i < n_dirs; i++) {
         fname = g_strdup_printf("%s/%s%s",
-                dirs[i], module_name, HOST_DSOSUF);
+                dirs[i], module_name, CONFIG_HOST_DSOSUF);
         ret = module_load_file(fname);
         g_free(fname);
         fname = NULL;




reply via email to

[Prev in Thread] Current Thread [Next in Thread]