osmith submitted this change.
OBS: asan: build osmocom-bb host tools with asan
Fix that osmocom-bb host tools like trxcon do not get built with
--sanitize. Because of this they cannot be started when installed from
the osmocom:nightly:asan repository:
==642==ASan runtime does not come first in initial library list; you should either link runtime to your application or manually preload it with LD_PRELOAD.
Change-Id: I370f1a7dfd3815d75fca9e447b80a581bf3e2c7d
---
M scripts/obs/lib/debian.py
1 file changed, 24 insertions(+), 2 deletions(-)
diff --git a/scripts/obs/lib/debian.py b/scripts/obs/lib/debian.py
index f3b18ec..5b12cb4 100644
--- a/scripts/obs/lib/debian.py
+++ b/scripts/obs/lib/debian.py
@@ -111,11 +111,11 @@
changelog_add_entry(project, version)
-def configure_append(project, parameters):
+def configure_append_debian_rules(project, parameters):
"""Add one or more configure parameters like --enable-sanitize to the
dh_auto_configure line, also add the override_dh_auto_configure block
if missing."""
- print(f"{project}: adding configure parameters: {parameters}")
+ print(f"{project}: adding configure parameters to debian/rules: {parameters}")
rules = f"{lib.git.get_repo_path(project)}/debian/rules"
override_found = False
with open(rules, "r") as f:
@@ -143,6 +143,28 @@
f.writelines(lines)
+def configure_append_src_makefile(project, parameters):
+ """For osmocom-bb we need to adjust places where HOST_CONFARGS is used in
+ src/Makefile."""
+ makefile = f"{lib.git.get_repo_path(project)}/src/Makefile"
+ if not os.path.exists(makefile):
+ return
+ print(f"{project}: adding configure parameters to src/Makefile: {parameters}")
+ lib.run_cmd(
+ [
+ "sed",
+ "-i",
+ f"s/$(HOST_CONFARGS)/$(HOST_CONFARGS) {parameters}/g",
+ makefile,
+ ]
+ )
+
+
+def configure_append(project, parameters):
+ configure_append_debian_rules(project, parameters)
+ configure_append_src_makefile(project, parameters)
+
+
def disable_manuals(project):
"""Disabling manuals speeds up the build time significantly, we don't
need them for e.g. the asan repository."""
To view, visit change 43704. To unsubscribe, or for help writing mail filters, visit settings.