* PİSİ listesinde tartıştığımız debug infoları paketten ayır değişiklikleri.

Bu infolardan ayrı ayrı paket yapmak yerine (a-debug.pisi, b-debug.pisi v.s gibi)
    build-farm'de ya da isteyen geliştirici kendi makinasında /etc/pisi/pisi.conf içerisinde
    "debug = True " ile aktive edebilir. Paketlerin debug infoları /debug
    klasörü içine konuyor (klasörü yaratmak gerektiğini söylememe gerek yok sanırım :P)
This commit is contained in:
S.Çağlar Onur
2005-11-30 19:47:11 +00:00
parent 7716d64381
commit fb76a9cb0d
2 changed files with 19 additions and 0 deletions
+2
View File
@@ -23,6 +23,7 @@
#
#[build]
#host = i686-pc-linux-gnu
#debug = False
#jobs = "-j1"
#CFLAGS= -mtune=i686 -O2 -pipe -fomit-frame-pointer
#CXXFLAGS= -mtune=i686 -O2 -pipe -fomit-frame-pointer
@@ -62,6 +63,7 @@ class BuildDefaults:
"""Default values for [build] section"""
host = "i686-pc-linux-gnu"
jobs = "-j1"
debug = False
CFLAGS = "-mtune=i686 -O2 -pipe -fomit-frame-pointer"
CXXFLAGS = "-mtune=i686 -O2 -pipe -fomit-frame-pointer"
LDFLAGS = ""
+17
View File
@@ -466,15 +466,32 @@ def strip_file(filepath):
if ret:
ctx.ui.warning(_("strip command failed for file '%s'!") % f)
def save_elf_debug(f):
"""copy debug info into /debug/file.debug file"""
p = os.popen("objcopy --only-keep-debug %s /debug/%s.debug" % (f, os.path.basename(f)))
ret = p.close()
if ret:
ctx.ui.warning(_("objcopy (keep-debug) command failed for file '%s'!") % f)
"""mark binary/shared objects to use /debug/file.debug"""
p = os.popen("objcopy --add-gnu-debuglink=/debug/%s.debug %s" % (os.path.basename(f), f))
ret = p.close()
if ret:
ctx.ui.warning(_("objcopy (add-debuglink) command failed for file '%s'!") % f)
if "current ar archive" in o:
run_strip(filepath, "-g")
return True
elif "SB executable" in o:
if ctx.config.values.build.debug == "True":
save_elf_debug(filepath)
run_strip(filepath)
return True
elif "SB shared object" in o:
if ctx.config.values.build.debug == "True":
save_elf_debug(filepath)
run_strip(filepath, "--strip-unneeded")
# FIXME: warn for TEXTREL
return True