Hello Omar.

Omar Polo wrote in
 <3G6K68XUPG6J2.2639ZNZN90LGM@venera>:
 |Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |> Omar Polo wrote in
 |>  <28P1AX08SNCS0.30TJDZ4GTJ8IJ@venera>:
 |>|Steffen Nurpmeso <stef...@sdaoden.eu> wrote:
 |>|> Stuart Henderson wrote in
 |>|>  <yn2oicg+bo0dc...@bamboo.spacehopper.org>:
 |>|>|On 2022/05/13 00:22, Steffen Nurpmeso wrote:
 ...
 |>|well, I can't speak for crux nor alpine, but as a general rule we want
 |>|to be in control of the CFLAGS the port uses when building.  Sometimes
 |>|one port slips, but that's the policy.
 ...
 |> OK i understand the desire to add additional flags per se.
 |
 |(i forgot to add that this mechanisms is also used to generated debug
 |packages -- see bsd.port.mk for "THE DEBUG_PACKAGES INFRASTRUCTURE --
 |and possibly other things I haven't thought yet.  Oh, and from the POV
 |of a project, it's better to *append*, not prepend, the CFLAGS passed,
 |so users and packagers can effectively control the build process from
 |the outside)

Append is much better yes; the EXTRA_CFLAGS thing will place at
the end.  Reading this, DEBUG_CONFIGURE_ARGS will be needed for
s-nail and later s-postgray, and placing debug symbols in an
external file i had implemented in s-nail, this will be
interesting how it fits into OpenBSD port system then, it does

+         if [ -n "${DEBUG_IN_EXTERNAL_FILE}" ]; then
+            ${objcopy} --only-keep-debug "${_dst}" "${_dst}".debug
+            ${strip} -g "${_dst}"
+            ${objcopy} --add-gnu-debuglink="${_dst}".debug "${_dst}"
+
+            ${chown} ${_ident} "${_dst}".debug || true
+            ${chmod} 0644 "${_dst}".debug

But i surely will figure it out, some months to come anyhow.
Thanks for the info, Omar.

  ...
 |> If you would be so kind to add at least -DNDEBUG i would be fine.
 ...
 |imported, thanks!  (and audio/s-cdda-to-db too)

Thank you!

 |I didn't add -fPIE because on OpenBSD clang generates PIE code by
 |default (see clang-local(1) for the OpenBSD-specific behavior of llvm)

Oh, i did not know!
(I wonder where the backing for "See the documentation for the
-fsanitize-minimal-runtime flag" is.)

 |and I didn't add -DNDEBUG because I don't see any calls to assert(3).

That is ok for cdda with its freestanding code base.
(In general i also depend some sorts of inlining upon NDEBUG
because OPTIMIZE is not standardized.  But not yet used.  Well.)

 |if I've missed something please don't hesitate to point it out so that
 |we can fix it!
 |
 |regarding the other port, s-cdda-to-db, I've added NO_BUILD and PKG_ARCH
 |and tweaked a bit pkg/DESCR to avoid the post scriptum and to fix a typo
 |in "informations".

Thank you.

Ciao!

--steffen
|
|Der Kragenbaer,                The moon bear,
|der holt sich munter           he cheerfully and one by one
|einen nach dem anderen runter  wa.ks himself off
|(By Robert Gernhardt)

Reply via email to