⛏️ index : buildtools.git

author Franck LeCodeur <cassisian@gmail.com> 2021-09-03 12:43:49.0 +02:00:00
committer Jérôme Duval <jerome.duval@gmail.com> 2021-09-13 6:10:36.0 +00:00:00
commit
4b7b6c63e80d30d5f465c9187b970b749490595a [patch]
tree
f9df1ae3e0b200642d5780efbc9c66c25b068f34
parent
0ff4d6adaff6995c6f369ba36233e518f4dd752a
download
4b7b6c63e80d30d5f465c9187b970b749490595a.tar.gz

jam: Remove ignored archiver flag modifier

The call of make in buildtools/jam produces the following output:

LINKLIBS= ./jam0
...patience...
...found 271 target(s)...
...updating 33 target(s)...
MkDir1 bin.linuxx86
Cc bin.linuxx86/builtins.o
< reduced output >
Cc bin.linuxx86/variable.o
Archive bin.linuxx86/libjam.a
ar: `u' modifier ignored since `D' is the default (see `U')
ar: creating bin.linuxx86/libjam.a
...

'make' bootstraps 'jam0' which calls 'ar' to create the static library 'libjam.a'.
The call looks like this:

ar ru bin.linuxx86/libjam.a bin.linuxx86/builtins.o <reduced output> bin.linuxx86/variable.o

The modifier 'u' gets ignored.

The underlying cause is that the build was done in deterministic mode ('D'), a.o. NOT using timestamps, which is completely fine.
But because of this the archiver tool (ar) can never update files in the archive based on timestamps.
"ru" means replace files (flag 'r') only if they are updated (flag suffix 'u') based on timestamps.
This patch removes the flag suffix 'u'.

Change-Id: I57fa2d50c2081ee66d1b71648714e773ecb7cd59
Reviewed-on: https://review.haiku-os.org/c/buildtools/+/4419
Reviewed-by: Adrien Destugues <pulkomandy@gmail.com>

Diff

 jam/Jambase   | 2 +-
 jam/jambase.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/jam/Jambase b/jam/Jambase
index 002acab..fc68e27 100644
--- a/jam/Jambase
+++ a/jam/Jambase
@@ -316,7 +316,7 @@
#

AR		?= ar ;
ARFLAGS		?= ru ;
ARFLAGS		?= r ;
AS		?= as ;
ASFLAGS		?= ;
AWK		?= awk ;
diff --git a/jam/jambase.c b/jam/jambase.c
index 51ae060..cabff27 100644
--- a/jam/jambase.c
+++ a/jam/jambase.c
@@ -152,7 +152,7 @@
"YACCFILES	?= y.tab ;\n",
"YACCFLAGS	?= -d ;\n",
"}\n",
"AR		?= ar ru ;\n",
"AR		?= ar r ;\n",
"AS		?= as ;\n",
"ASFLAGS		?= ;\n",
"AWK		?= awk ;\n",