<short summary of the patch>
authorCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
committerCamm Maguire <camm@debian.org>
Sun, 13 Nov 2022 12:55:14 +0000 (12:55 +0000)
TODO: Put a short summary on the line above and replace this paragraph
with a longer explanation of this change. Complete the meta-information
with other relevant fields (see below for details). To make it easier, the
information below has been extracted from the changelog. Adjust it or drop
it.

gcl (2.6.12-60) unstable; urgency=medium

  * list_order.17

Gbp-Pq: Name list_order.18

cmpnew/gcl_cmpmain.lsp
o/makefile

index 5c41c2c14a9ae03e968c8baf85184950526432c7..d8205375fe21412897d5edfa820df1781cccef25 100755 (executable)
@@ -483,6 +483,12 @@ Cannot compile ~a.~%"
 
 (defvar *use-buggy* nil)
 
+(defun remove-flag (flag flags)
+  (let ((i (search flag flags)))
+    (if i
+       (concatenate 'string (subseq flags 0 i) (remove-flag flag (subseq flags (+ i (length flag)))))
+      flags)))
+
 (defun  compiler-command (&rest args &aux na )
   (declare (special *c-debug*))
   (let ((dirlist (pathname-directory (first args)))
@@ -493,7 +499,7 @@ Cannot compile ~a.~%"
     (setq na  (namestring
               (make-pathname :name name :type (pathname-type(first args)))))
    (format nil  "~a ~a -I~a ~a ~a -c ~a -o ~a ~a"
-          *cc*
+          (if *prof-p* (remove-flag "-fomit-frame-pointer" *cc*) *cc*)
           (if *prof-p* " -pg " "")
           (concatenate 'string si::*system-directory* "../h")
           (if (and (boundp '*c-debug*) *c-debug*) " -g " "")
index 1e5436b35df21ead4a4fe64d50da3b817baf3579..4a023a35817766c6a5fe8cf2cb6a7328968b92a9 100644 (file)
@@ -34,7 +34,7 @@ boot.o: boot.c $(DECL) boot.h
        $(CC) -c $(CFLAGS) $(DEFS) -fPIC $*.c $(AUX_INFO) 
 
 gprof.o: gprof.c $(DECL)
-       $(CC) -c $(CFLAGS) $(DEFS) -pg $*.c $(AUX_INFO)
+       $(CC) -c $(filter-out -fomit-frame-pointer,$(CFLAGS)) $(DEFS) -pg $*.c $(AUX_INFO)
 
 prelink.o: prelink.c $(DECL)
        $(CC) -c $(filter-out -pg,$(CFLAGS)) -fPIE $(DEFS) $*.c $(AUX_INFO)