mailing list of musl libc
 help / color / mirror / code / Atom feed
* [musl] [PATCH] fix: Use $srcdir in configure test for add-cfi script
@ 2021-10-21 16:09 Wesley Wiser
  2022-01-07 18:02 ` [musl] " Wesley Wiser
  0 siblings, 1 reply; 3+ messages in thread
From: Wesley Wiser @ 2021-10-21 16:09 UTC (permalink / raw)
  To: musl

Hello,

I noticed while building musl with musl-cross-make[1] that adding --enable-debug to the MUSL_CONFIG variable did not enable CFI directives even though I was compiling for a supported platform (x86_64):

> checking whether assembler supports CFI directives... no

I believe the issue is that configure tests for "tools/add-cfi.$ARCH.awk" instead of "$srcdir/tools/add-cfi.$ARCH.awk". Changing configure as described resolves this and I've confirmed the debugging information is present in resulting binary.

> checking whether assembler supports CFI directives... yes

Below is a patch for this change. 

Regards,
Wesley Wiser

[1]: https://github.com/richfelker/musl-cross-make

---
 configure | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/configure b/configure
index e1aefed7..ca5cbc0b 100755
--- a/configure
+++ b/configure
@@ -409,7 +409,7 @@ test "$debug" = yes && CFLAGS_AUTO=-g
 #
 printf "checking whether we should preprocess assembly to add debugging information... "
 if fnmatch '-g*|*\ -g*' "$CFLAGS_AUTO $CFLAGS" &&
-   test -f "tools/add-cfi.$ARCH.awk" &&
+   test -f "$srcdir/tools/add-cfi.$ARCH.awk" &&
    printf ".file 1 \"srcfile.s\"\n.line 1\n.cfi_startproc\n.cfi_endproc" | $CC -g -x assembler -c -o /dev/null 2>/dev/null -
 then
   ADD_CFI=yes
--
2.30.2


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [musl] RE: [PATCH] fix: Use $srcdir in configure test for add-cfi script
  2021-10-21 16:09 [musl] [PATCH] fix: Use $srcdir in configure test for add-cfi script Wesley Wiser
@ 2022-01-07 18:02 ` Wesley Wiser
  2022-01-07 18:32   ` Rich Felker
  0 siblings, 1 reply; 3+ messages in thread
From: Wesley Wiser @ 2022-01-07 18:02 UTC (permalink / raw)
  To: musl

On Thu, Oct 21, 2021 at 04:09:30PM -0400, Wesley Wiser wrote:
> I noticed while building musl with musl-cross-make[1] that adding --enable-debug to the MUSL_CONFIG variable did not enable CFI directives even though I was compiling for a supported platform (x86_64):
> I believe the issue is that configure tests for "tools/add-cfi.$ARCH.awk" instead of "$srcdir/tools/add-cfi.$ARCH.awk". Changing configure as described resolves this and I've confirmed the debugging information is present in resulting binary.
> Below is a patch for this change. 

Hello all,

Just wanted to follow up and see if there was any feedback on this patch. I can confirm it does resolve the described issue.

Thanks!
Wesley

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [musl] RE: [PATCH] fix: Use $srcdir in configure test for add-cfi script
  2022-01-07 18:02 ` [musl] " Wesley Wiser
@ 2022-01-07 18:32   ` Rich Felker
  0 siblings, 0 replies; 3+ messages in thread
From: Rich Felker @ 2022-01-07 18:32 UTC (permalink / raw)
  To: Wesley Wiser; +Cc: musl

On Fri, Jan 07, 2022 at 06:02:57PM +0000, Wesley Wiser wrote:
> On Thu, Oct 21, 2021 at 04:09:30PM -0400, Wesley Wiser wrote:
> > I noticed while building musl with musl-cross-make[1] that adding --enable-debug to the MUSL_CONFIG variable did not enable CFI directives even though I was compiling for a supported platform (x86_64):
> > I believe the issue is that configure tests for "tools/add-cfi.$ARCH.awk" instead of "$srcdir/tools/add-cfi.$ARCH.awk". Changing configure as described resolves this and I've confirmed the debugging information is present in resulting binary.
> > Below is a patch for this change. 
> 
> Hello all,
> 
> Just wanted to follow up and see if there was any feedback on this
> patch. I can confirm it does resolve the described issue.

Thanks for the ping. It looks good; I'll merge it now.

Rich

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2022-01-07 18:32 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-21 16:09 [musl] [PATCH] fix: Use $srcdir in configure test for add-cfi script Wesley Wiser
2022-01-07 18:02 ` [musl] " Wesley Wiser
2022-01-07 18:32   ` Rich Felker

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/musl/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).