[email protected] (Timo Myyrä) writes:

> Stuart Henderson <[email protected]> writes:
>
>> On 2018/11/28 13:38, Antoine Jacoutot wrote:
>>
>>> On Mon, Nov 26, 2018 at 03:35:30PM -0700, Juan Francisco Cantero Hurtado 
>>> wrote:
>>> > CVSROOT:  /cvs
>>> > Module name:      ports
>>> > Changes by:       [email protected] 2018/11/26 15:35:30
>>> > 
>>> > Log message:
>>> >     From Timo Myyra. Help from sthen@ to a previous version. OK benoit@.
>>> >     
>>> >     Comment:
>>> >     dialect of Scheme designed for systems programming
>>> 
>>> Doesn't build for me.
>>
>> Builds here, but the build output is pretty much useless for debugging build
>> problems with all the hidden compiler lines..
>
> Well, here's quick patch to enable warnings and verbose messages.
>
> Timo
>
>
> Index: patches/patch-src_build_build0_scm
> ===================================================================
> RCS file: patches/patch-src_build_build0_scm
> diff -N patches/patch-src_build_build0_scm
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_build_build0_scm        28 Nov 2018 18:08:22 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/build/build0.scm
> +--- src/build/build0.scm.orig
> ++++ src/build/build0.scm
> +@@ -10,7 +10,7 @@
> +   (displayln "... compile " modf)
> +   (let ((proc (open-process
> +                (list path: "gsc"
> +-                     arguments: (list "-cc-options" "--param 
> max-gcse-memory=300000000" modf)
> ++                     arguments: (list "-warnings" "-verbose" modf)
> +                      stdout-redirection: #f))))
> +     (if (not (zero? (process-status proc)))
> +       (error "Compilation error; gsc exit with nonzero status" modf))))
> Index: patches/patch-src_build_build1_ss
> ===================================================================
> RCS file: patches/patch-src_build_build1_ss
> diff -N patches/patch-src_build_build1_ss
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_build_build1_ss 28 Nov 2018 18:08:22 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/build/build1.ss
> +--- src/build/build1.ss.orig
> ++++ src/build/build1.ss
> +@@ -55,7 +55,7 @@
> +   (displayln "... compile " modf)
> +   (compile-file modf [output-dir: gerbil-libdir invoke-gsc: #t
> +                       debug: debug optimize: optimize? generate-ssxi: 
> gen-ssxi? static: static?
> +-                      gsc-options: ["-cc-options" "--param 
> max-gcse-memory=300000000"]]))
> ++                      gsc-options: ["-warnings" "-verbose"]]))
> + 
> + (def debug-none #f)  ; no bloat
> + (def debug-src 'src) ; full introspection -- sadly, it adds bloat and 
> increases load time
> Index: patches/patch-src_gerbil_runtime_build_scm
> ===================================================================
> RCS file: patches/patch-src_gerbil_runtime_build_scm
> diff -N patches/patch-src_gerbil_runtime_build_scm
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_gerbil_runtime_build_scm        28 Nov 2018 18:08:22 
> -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/gerbil/runtime/build.scm
> +--- src/gerbil/runtime/build.scm.orig
> ++++ src/gerbil/runtime/build.scm
> +@@ -22,7 +22,7 @@
> +   (let ((proc (open-process
> +                `(path: ,(getenv "GERBIL_GSC" "gsc")
> +                        arguments: ("-o" ,*libdir*
> +-                                   "-cc-options" "--param 
> max-gcse-memory=300000000"
> ++                                   "-warnings" "-verbose"
> +                                    ,@(if (runtime-smp?)
> +                                        '("-e" 
> "(define-cond-expand-feature|enable-smp|)")
> +                                        '())
> Index: patches/patch-src_misc_http-perf_build_ss
> ===================================================================
> RCS file: patches/patch-src_misc_http-perf_build_ss
> diff -N patches/patch-src_misc_http-perf_build_ss
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_misc_http-perf_build_ss 28 Nov 2018 18:08:22 -0000
> @@ -0,0 +1,14 @@
> +$OpenBSD$
> +
> +Index: src/misc/http-perf/build.ss
> +--- src/misc/http-perf/build.ss.orig
> ++++ src/misc/http-perf/build.ss
> +@@ -9,7 +9,7 @@
> + 
> + (def build-spec-static
> +   '((static-exe: "hellod"
> +-                 "-cc-options" "--param max-gcse-memory=300000000"
> ++                 "-warnings" "-verbose"
> +                  "-prelude" "(declare (not safe))")
> +     (static-exe: "baseline"
> +                  "-prelude" "(declare (not safe))")))
> Index: patches/patch-src_std_build-spec_ss
> ===================================================================
> RCS file: patches/patch-src_std_build-spec_ss
> diff -N patches/patch-src_std_build-spec_ss
> --- /dev/null 1 Jan 1970 00:00:00 -0000
> +++ patches/patch-src_std_build-spec_ss       28 Nov 2018 18:08:22 -0000
> @@ -0,0 +1,47 @@
> +$OpenBSD$
> +
> +Index: src/std/build-spec.ss
> +--- src/std/build-spec.ss.orig
> ++++ src/std/build-spec.ss
> +@@ -31,10 +31,10 @@
> +     "srfi/8"
> +     "srfi/9"
> +     "srfi/14"
> +-    (gxc: "srfi/13" "-cc-options" "--param max-gcse-memory=300000000")
> ++    (gxc: "srfi/13" "-warnings" "-verbose")
> +     "srfi/19"
> +     "srfi/41"
> +-    (gxc: "srfi/42" "-cc-options" "--param max-gcse-memory=300000000")
> ++    (gxc: "srfi/42" "-warnings" "-verbose")
> +     "srfi/43"
> +     "srfi/78"
> +     "srfi/95"
> +@@ -43,8 +43,8 @@
> +     "parser/base"
> +     (gxc: "parser/stream" ,@(include-gambit-sharp))
> +     "parser/lexer"
> +-    (gxc: "parser/defparser" "-cc-options" "--param 
> max-gcse-memory=300000000")
> +-    (gxc: "parser/rx-parser" "-cc-options" "--param 
> max-gcse-memory=300000000")
> ++    (gxc: "parser/defparser" "-warnings" "-verbose")
> ++    (gxc: "parser/rx-parser" "-warnings" "-verbose")
> +     "parser/deflexer"
> +     "parser/grammar-reader"
> +     "parser/grammar"
> +@@ -141,7 +141,7 @@
> +           (ssi: "xml/_libxml")
> +           "xml/libxml")
> +         '())
> +-    (gxc: "xml/ssax" "-cc-options" "--param max-gcse-memory=300000000")
> ++    (gxc: "xml/ssax" "-warnings" "-verbose")
> +     "xml/sxpath"
> +     "xml/sxml"
> +     (gsc: "xml/sxml-to-xml")
> +@@ -189,7 +189,7 @@
> +     ;; :std/actor
> +     (gxc: "actor/message" ,@(include-gambit-sharp))
> +     (gxc: "actor/xdr"  ,@(include-gambit-sharp))
> +-    (gxc: "actor/proto" "-cc-options" "--param max-gcse-memory=300000000")
> ++    (gxc: "actor/proto" "-warnings" "-verbose")
> +     "actor/rpc/base"
> +     "actor/rpc/proto/message"
> +     "actor/rpc/proto/null"

That was a bit excessive, found env variable to enable verbose output from
Gambit manual so here's a better diff. Need to figure out should something be
done to the max-gcse-memory param. Its used to increase the memory size to cope,
I think the use of '--enable-single-host' option in Gambit (our port doesn't
enable it) and is gcc specific. Seems it only prints the annoying warning on
clang.

Timo

Index: Makefile
===================================================================
RCS file: /cvs/ports/lang/gerbil/Makefile,v
retrieving revision 1.2
diff -u -p -u -p -r1.2 Makefile
--- Makefile    26 Nov 2018 22:39:03 -0000      1.2
+++ Makefile    28 Nov 2018 18:36:56 -0000
@@ -28,7 +28,8 @@ RUN_DEPENDS = devel/git \
 
 MAKE_ENV +=    CPPFLAGS=-I${LOCALBASE}/include \
                LDFLAGS=-L${LOCALBASE}/lib \
-               GERBIL_PATH=${LOCALBASE}/gerbil
+               GERBIL_PATH=${LOCALBASE}/gerbil \
+               GAMBCOMP_VERBOSE=1
 
 NO_TEST =      Yes
 

Reply via email to