Add options.conf ability to not strip binaries

The hhvm binary in particular has extra elf sections added to it to
store php code, and these are removed by the generic build macros that
create the debug information.

Other packages which need this are bazil, docker, go, linux-*.

Signed-off-by: Icarus Sparry <icarus.w.sparry@intel.com>
This commit is contained in:
Icarus Sparry
2017-01-26 14:23:53 -08:00
committed by Matthew Johnson
parent 9ab54653ac
commit ceca012d0c
2 changed files with 8 additions and 0 deletions
+1
View File
@@ -87,6 +87,7 @@ config_options = {
"pgo": "set profile for pgo",
"use_clang": "add clang flags",
"32bit" : "build 32 bit libraries",
"nostrip" : "disable stripping binaries",
"verify_required": "require package verification for build"}
def create_conf():
+7
View File
@@ -101,6 +101,7 @@ class Specfile(object):
self.write_main_subpackage_requires()
self.write_buildreq()
self.write_strip_command()
self.write_patch_header()
# main package extra content
@@ -200,6 +201,12 @@ class Specfile(object):
for req in sorted(self.buildreqs):
self._write("BuildRequires : {}\n".format(req))
def write_strip_command(self):
""" Write commands to prevent stripping binary if requested """
if config.config_opts['nostrip']:
self._write("# Suppress stripping binaries\n")
self._write("%define __strip /bin/true\n%define debug_package %{nil}\n")
def write_patch_header(self):
"""
Write patch list header