From ede368d849f455e12dd637f0e5138bc352ee4a73 Mon Sep 17 00:00:00 2001 From: Don Armstrong Date: Fri, 28 Dec 2012 11:24:26 -0800 Subject: [PATCH] * Fix noopt support to use --disable-optimising as ./configure does crazy things. * Make sure that the guile garbage collection does not collect s in font-metric.cc when it gets optimized away (closes: #684817) --- debian/changelog | 7 +++++-- debian/rules | 4 ++++ lily/font-metric.cc | 3 +++ 3 files changed, 12 insertions(+), 2 deletions(-) diff --git a/debian/changelog b/debian/changelog index 0679e99c70..c094903d76 100644 --- a/debian/changelog +++ b/debian/changelog @@ -3,9 +3,12 @@ lilypond (2.14.2-4) unstable; urgency=low * Fix "warnings from install-info" by splitting the direntry sections across the texinfo files (Closes: #648689). Thanks to Julian Gilbey for the patch. + * Fix noopt support to use --disable-optimising as ./configure does + crazy things. + * Make sure that the guile garbage collection does not collect s in + font-metric.cc when it gets optimized away (closes: #684817) - - -- + -- Don Armstrong Sun, 23 Dec 2012 13:25:44 -0800 lilypond (2.14.2-3) unstable; urgency=low diff --git a/debian/rules b/debian/rules index 3e87307aed..0d23ea49dc 100755 --- a/debian/rules +++ b/debian/rules @@ -55,9 +55,13 @@ ifneq (,$(filter $(DEB_HOST_ARCH), i386 kfreebsd-i386)) config_opt = --disable-optimising CFLAGS := $(filter-out -O%, $(CFLAGS)) CXXFLAGS := $(filter-out -O%, $(CXXFLAGS)) +else +ifneq (,$(filter $(DEB_BUILD_OPTIONS),noopt)) + config_opt = --disable-optimising else config_opt = --enable-optimising endif +endif build: build-stamp diff --git a/lily/font-metric.cc b/lily/font-metric.cc index 458528dd2e..4b4c2f802d 100644 --- a/lily/font-metric.cc +++ b/lily/font-metric.cc @@ -106,6 +106,9 @@ Font_metric::mark_smob (SCM s) { Font_metric *m = (Font_metric *) SCM_CELL_WORD_1 (s); m->derived_mark (); + // we must do this to avoid s being optimized out and garbage + // collected; leading to a segfault above. + scm_remember_upto_here_1(s); return m->description_; } -- 2.39.2