summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorP. J. McDermott <pjm@nac.net>2012-11-10 00:06:38 (EST)
committer P. J. McDermott <pjm@nac.net>2012-11-10 00:06:38 (EST)
commitccfa2c17cd966dc44380748af87afd796bcb7237 (patch)
tree890212684e4ac99916fdf7d1370a5dbc85110773
parent52aed2593981aca181e83dc929603ee31d877c8c (diff)
Add patch to pass some dir paths to child makes.
-rw-r--r--README34
-rw-r--r--patches/01_pass-some-dirs-to-child-makes.patch24
2 files changed, 58 insertions, 0 deletions
diff --git a/README b/README
index 7833acc..9cde205 100644
--- a/README
+++ b/README
@@ -24,5 +24,39 @@ commands before building:
$ ./config clean
$ ./config
+Binutils Build System Mangling
+------------------------------
+
+[See `patches/01_pass-some-dirs-to-child-makes.patch` for some background
+information.]
+
+An alternative to `patches/01_pass-some-dirs-to-child-makes.patch` is to run
+make in each subdirectory ourselves instead of letting the top-level makefile do
+it for us. This way, we can leave the build system untouched and directly give
+each child make process the required macro settings.
+
+There are ten subdirectories in which we would need to run make (though of
+course we don't currently enable some of them, e.g. `gold`):
+
+ * `bfd`
+ * `opcodes`
+ * `binutils`
+ * `etc`
+ * `gas`
+ * `gold`
+ * `gprof`
+ * `intl`
+ * `ld`
+ * `libiberty`
+
+The disadvantage to this is a higher maintenance cost: we need to keep track of
+the subdirectories in which we need to run make. We need to watch out for
+changes to the dependencies of `install-host` and `install-target` in Binutils's
+Makefile.in (unlikely) and changes in the features (e.g. gold) we enable
+(likely).
+
+The trivial patch (which adds just three lines) should apply cleanly across
+Binutils releases, so it seems best to just stick with that.
+
[debian-ld-ma-patch]: http://patch-tracker.debian.org/patch/series/view/binutils/2.22-7.1/129_ld_mulitarch_dirs.patch
diff --git a/patches/01_pass-some-dirs-to-child-makes.patch b/patches/01_pass-some-dirs-to-child-makes.patch
new file mode 100644
index 0000000..58637da
--- /dev/null
+++ b/patches/01_pass-some-dirs-to-child-makes.patch
@@ -0,0 +1,24 @@
+Description: Pass some dir paths to child makes
+ Some paths that we want to change (for FHS sanity and/or multiarch hackery) are
+ hardcoded in the configure scripts and makefiles.
+ .
+ If we just get the top-level makefile to pass them to the child make processes,
+ we can simply set these path macros and call make once.
+ .
+ See `README` for a possible alternative solution.
+From: "P. J. McDermott" <pjm@nac.net>
+
+diff -Naur src.orig/Makefile.in src/Makefile.in
+--- src.orig/Makefile.in 2011-11-21 06:56:20.000000000 -0500
++++ src/Makefile.in 2012-11-09 23:21:01.494841050 -0500
+@@ -710,7 +710,10 @@
+ "sharedstatedir=$(sharedstatedir)" \
+ "sysconfdir=$(sysconfdir)" \
+ "tooldir=$(tooldir)" \
++ "scriptdir=$(scriptdir)" \
+ "build_tooldir=$(build_tooldir)" \
++ "bfdlibdir=$(bfdlibdir)" \
++ "bfdincludedir=$(bfdincludedir)" \
+ "target_alias=$(target_alias)" \
+ "AWK=$(AWK)" \
+ "BISON=$(BISON)" \