m4-patches
[Top][All Lists]
Advanced

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

work around misguided Linux From Scratch advice


From: Eric Blake
Subject: work around misguided Linux From Scratch advice
Date: Mon, 16 Feb 2009 22:04:08 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

http://www.linuxfromscratch.org/lfs/view/6.4/chapter06/m4.html

gives the (stupid) advice to configure with --enable-threads.

This is pointless, since m4 is single-threaded, and configure.ac INTENTIONALLY 
calls gl_DISABLE_THREADS which should cause these tests to always be skipped.  
These tests are only present because of gnulib interdependencies.  However, LFS 
gave the advice because they were worried about the fact that test-lock and 
test-tls are skipped (apparently, they equate skipped tests with failure?).  
Using --enable-threads only serves to bloat or even slow down the final m4 
executable.

At any rate, altogether avoiding the two tests, rather than explaining why they 
are _expected_ to skip, should help LFS and others from perpetuating their bad 
advice.  In short, you DON'T need --enable-threads to get a fully-working m4.


From: Eric Blake <address@hidden>
Date: Mon, 16 Feb 2009 15:01:48 -0700
Subject: [PATCH] Avoid tests that make no sense, because m4 is single-threaded.

* m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.

Signed-off-by: Eric Blake <address@hidden>
---
 ChangeLog          |    5 +++++
 m4/gnulib-cache.m4 |    4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ChangeLog b/ChangeLog
index 3495018..e546cd6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-02-16  Eric Blake  <address@hidden>
+
+       Avoid tests that make no sense, because m4 is single-threaded.
+       * m4/gnulib-cache.m4: Avoid lock-tests and tls-tests.
+
 2009-02-12  Eric Blake  <address@hidden>

        Avoid quadratic code when walking definition stack.
diff --git a/m4/gnulib-cache.m4 b/m4/gnulib-cache.m4
index f20b6c9..b439e8a 100644
--- a/m4/gnulib-cache.m4
+++ b/m4/gnulib-cache.m4
@@ -15,7 +15,7 @@


 # Specification in the form of a command-line invocation:
-#   gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-
base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --
with-tests --no-libtool --macro-prefix=M4 announce-gen assert autobuild avltree-
oset binary-io c-stack clean-temp cloexec close-stream closein config-h dirname 
error fdl-1.3 fflush filenamecat fopen fopen-safer fseeko gendocs getopt git-
version-gen gnumakefile gnupload gpl-3.0 intprops mkstemp obstack progname 
regex sigaction stdbool stdint stdlib-safer strsignal strstr strtod strtol 
unlocked-io verror version-etc version-etc-fsf xalloc xprintf xvasprintf-posix
+#   gnulib-tool --import --dir=. --local-dir=local --lib=libm4 --source-
base=lib --m4-base=m4 --doc-base=doc --tests-base=tests --aux-dir=build-aux --
with-tests --avoid=lock-tests --avoid=tls-tests --no-libtool --macro-prefix=M4 
announce-gen assert autobuild avltree-oset binary-io c-stack clean-temp cloexec 
close-stream closein config-h dirname error fdl-1.3 fflush filenamecat fopen 
fopen-safer fseeko gendocs getopt git-version-gen gnumakefile gnupload gpl-3.0 
intprops mkstemp obstack progname regex sigaction stdbool stdint stdlib-safer 
strsignal strstr strtod strtol unlocked-io verror version-etc version-etc-fsf 
xalloc xprintf xvasprintf-posix

 # Specification in the form of a few gnulib-tool.m4 macro invocations:
 gl_LOCAL_DIR([local])
@@ -66,7 +66,7 @@ gl_MODULES([
   xprintf
   xvasprintf-posix
 ])
-gl_AVOID([])
+gl_AVOID([lock-tests tls-tests])
 gl_SOURCE_BASE([lib])
 gl_M4_BASE([m4])
 gl_PO_BASE([])
-- 
1.6.1.2







reply via email to

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