From 008d3704691e804bf8906d9792710cfa32e694ed Mon Sep 17 00:00:00 2001 From: jca Date: Tue, 7 Apr 2026 16:41:33 +0000 Subject: [PATCH] Respect DEBUG so we can build perl with debug symbols Adding -DEBUGGING in CONFIGURE_ARGS activates debug code, -DEBUGGING=-g passes -g in CFLAGS (only -g is supported), and -DEBUGGING=both does... both. This is a bit confusing. IMO DEBUG=-g should only add -g and disable executable stripping, but not change the code that is built. So use -Doptimize which lets us pass arbitrary compiler flags (eg -g3), just like DEBUG does in our system Makefiles. Hints and ok afresh1@ --- gnu/usr.bin/perl/Makefile.bsd-wrapper | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/gnu/usr.bin/perl/Makefile.bsd-wrapper b/gnu/usr.bin/perl/Makefile.bsd-wrapper index 4fdf6f15853..7d9d9f4406b 100644 --- a/gnu/usr.bin/perl/Makefile.bsd-wrapper +++ b/gnu/usr.bin/perl/Makefile.bsd-wrapper @@ -1,10 +1,14 @@ -# $OpenBSD: Makefile.bsd-wrapper,v 1.114 2023/09/03 01:43:09 afresh1 Exp $ +# $OpenBSD: Makefile.bsd-wrapper,v 1.115 2026/04/07 16:41:33 jca Exp $ # # Build wrapper for Perl # CONFIGURE_ARGS= -dse -Dopenbsd_distribution=defined +.if defined(DEBUG) +CONFIGURE_ARGS+= -Doptimize="${DEBUG}" +.endif + .if !exists(${.OBJDIR}/config.over) CONFIGURE_ARGS+= -Dmksymlinks .endif