Gitweb links:
...log
http://git.netsurf-browser.org/buildsystem.git/shortlog/067a5105a76e51eebcdf7e7786d1f91040442d47
...commit
http://git.netsurf-browser.org/buildsystem.git/commit/067a5105a76e51eebcdf7e7786d1f91040442d47
...tree
http://git.netsurf-browser.org/buildsystem.git/tree/067a5105a76e51eebcdf7e7786d1f91040442d47
The branch, master has been updated
via 067a5105a76e51eebcdf7e7786d1f91040442d47 (commit)
from 4cd825b00bd8298d3616d3b1b08fd1fbeea8d8dc (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commitdiff
http://git.netsurf-browser.org/buildsystem.git/commit/?id=067a5105a76e51eebcdf7e7786d1f91040442d47
commit 067a5105a76e51eebcdf7e7786d1f91040442d47
Author: Michael Orlitzky <[email protected]>
Commit: John-Mark Bell <[email protected]>
makefiles/Makefile.top: dependencies for PRE_ and POST_TARGETS
The PRE_TARGETS and POST_TARGETS are supposed to be built before and
after $(OBJECTS), respectively -- at least according to the comments
in Makefile.top:
# List of targets to run before building $(OBJECT)
PRE_TARGETS :=
# List of targets to run after building $(OBJECT)
POST_TARGETS :=
The default target however builds them at the same time as $(OUTPUT),
# Default target
all: $(PRE_TARGETS) $(OUTPUT) $(POST_TARGETS)
where $(OUTPUT) basically just builds $(OBJECTS):
$(OUTPUT): $(BUILDDIR)/stamp $(OBJECTS)
...
As a result, there is a race condition when $(OBJECTS) truly requires
$(PRE_TARGETS), because they may be built at the same time. The same
problem arises the other way around with $(POST_TARGETS). As a
demonstration, one can try to build the libsvgtiny shared library
directly (note: the details are platform-dependent),
$ BD=build-x86_64-pc-linux-gnu-x86_64-pc-linux-gnu-release-lib-shared
$ make COMPONENT_TYPE=lib-shared "${BD}/libsvgtiny.so.0.1.7"
COMPILE: src/svgtiny.c
...
src/svgtiny.c:24:10: fatal error: autogenerated_colors.c: No such file
or directory
24 | #include "autogenerated_colors.c"
| ^~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
This is because $(PRE_TARGETS) is not satisfied. In practice, this
condition seems hard to hit unintentionally, but it can happen if you
are building in parallel and extemely unlucky. A user discovered it in
Gentoo bug 711200.
The fix simply adds the stated dependencies on $(OBJECTS) and
$(POST_TARGETS) to guarantee the correct order.
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index 0b0fe22..2a41697 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -422,6 +422,16 @@ else
endif
endif
+ifneq ($(PRE_TARGETS),)
+# Ensure that PRE_TARGETS are built before OBJECTS.
+$(OBJECTS): $(PRE_TARGETS)
+endif
+
+ifneq ($(POST_TARGETS),)
+# Ensure that POST_TARGETS are built after OBJECTS.
+$(POST_TARGETS): $(OBJECTS)
+endif
+
###############################################################################
# Autogenerated, implied rules
###############################################################################
-----------------------------------------------------------------------
Summary of changes:
makefiles/Makefile.top | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/makefiles/Makefile.top b/makefiles/Makefile.top
index 0b0fe22..2a41697 100644
--- a/makefiles/Makefile.top
+++ b/makefiles/Makefile.top
@@ -422,6 +422,16 @@ else
endif
endif
+ifneq ($(PRE_TARGETS),)
+# Ensure that PRE_TARGETS are built before OBJECTS.
+$(OBJECTS): $(PRE_TARGETS)
+endif
+
+ifneq ($(POST_TARGETS),)
+# Ensure that POST_TARGETS are built after OBJECTS.
+$(POST_TARGETS): $(OBJECTS)
+endif
+
###############################################################################
# Autogenerated, implied rules
###############################################################################
--
NetSurf Project build system
_______________________________________________
netsurf-commits mailing list -- [email protected]
To unsubscribe send an email to [email protected]