From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] Build process uses script to add CFI directives to x86 asm
Date: Mon, 18 May 2015 11:52:58 -0400 [thread overview]
Message-ID: <20150518155258.GV17573@brightrain.aerifal.cx> (raw)
In-Reply-To: <1431784471-24517-1-git-send-email-alexinbeijing@gmail.com>
On Sat, May 16, 2015 at 03:54:31PM +0200, Alex Dowad wrote:
> diff --git a/configure b/configure
> index 143dc92..72349a2 100755
> --- a/configure
> +++ b/configure
> @@ -317,6 +317,18 @@ tryflag CFLAGS_MEMOPS -fno-tree-loop-distribute-patterns
> test "$debug" = yes && CFLAGS_AUTO=-g
>
> #
> +# Preprocess asm files to add extra debugging information if debug is
> +# enabled, our assembler supports the needed directives, and the
> +# preprocessing script has been written for our architecture.
> +#
> +if (test "$debug" = yes) &&
> + (test -f "tools/add-cfi.awk.$ARCH") &&
> + (echo ".cfi_startproc\n.cfi_endproc" | $CC -x assembler -c -o /dev/null -)
> +then
> + ADD_CFI=yes
> +fi
> +
I think CFLAGS should be checked for -g rather than using $debug here.
I'm not really a fan of --enable-debug despite having been the one who
added it, and I usually just put -g in CFLAGS.
Also, minor nit: it's best to avoid () in shell scripts when not
needed, since it usually leads to forking. {} can be used for grouping
but it's not needed here either as far as I can tell.
> +END {
> + if (in_function)
> + print ".cfi_endproc"
> +}
> \ No newline at end of file
Note that you still have a missing newline at the end of the awk
script.
Rich
next prev parent reply other threads:[~2015-05-18 15:52 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-05-16 13:54 Alex Dowad
2015-05-18 13:34 ` Szabolcs Nagy
2015-05-18 15:52 ` Rich Felker [this message]
2015-05-19 9:31 Alex Dowad
2015-05-19 11:16 ` u-wsnj
2015-05-19 11:43 ` Szabolcs Nagy
2015-05-19 16:22 Alex Dowad
2015-05-20 17:08 Alex Dowad
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20150518155258.GV17573@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).