Date: Tue, 22 Jan 2013 22:11:28 +0100 From: Dimitry Andric <dim@FreeBSD.org> To: Jan Beich <jbeich@tormail.org>, bug-followup@freebsd.org Cc: freebsd-toolchain@freebsd.org Subject: Re: ports/170256: audio/mpg123: SIGNAL 10 (SIGBUS) error Message-ID: <50FF0080.5090303@FreeBSD.org> In-Reply-To: <1TxhPU-000Hnu-3N@internal.tormail.org> References: <201207291139.q6TBdKt2011447@red.freebsd.org> <1TxhPU-000Hnu-3N@internal.tormail.org>
index | next in thread | previous in thread | raw e-mail
On 2013-01-22 18:13, Jan Beich wrote:
> The bug probably happens with every .mp3 file.
...
> And this is caused by a broken .align check in configure.ac:
>
> $ echo '.align 3' | clang -c -o /dev/null -x assembler -
> $ echo '.align 3' | gcc47 -c -o /dev/null -x assembler -
> {standard input}: Assembler messages:
> {standard input}:1: Error: alignment not a power of 2
> Exit 1
> $ echo '.align 3' | as -o /dev/null
> {standard input}: Assembler messages:
> {standard input}:1: Error: alignment not a power of 2
> Exit 1
>
> No clue whose bug is this but here's a workaround.
I'm inclined to say this is a bug in mpg123's configure script, or even
simpler, in their code. They shouldn't use .align, but .balign or
.p2align, if they want to be sure of the correct alignment.
That said, the difference is that gas (depending on arch) errors out
when it finds the argument to .align is not a power of 2, while clang
accepts such weird alignments. (That is, if you are crazy enough to
want to align to 3 bytes, why shouldn't the assembler oblige? :-)
> --- configure.ac~
> +++ configure.ac
> @@ -838,21 +838,21 @@
>
> dnl ############## Assembler, compiler properties
>
> # based on posting from John Dalgliesh <johnd@defyne.org> on ffmpeg (LGPL) mailing list
> # find if .align arg is power-of-two or not
> asmalign_exp="unknown"
> if test x"$asmalign_exp" = xunknown; then
> AC_MSG_CHECKING([if .align takes 2-exponent])
> asmalign_exp="no"
> echo '.align 3' > conftest.s
> - if $CCAS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then
> + if $AS -c -o conftest.o conftest.s 1>/dev/null 2>&1; then
Well, either this, or just patching src/libmpg123/mangle.h to use the
more predictable .balign or .p2align directives.
home |
help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?50FF0080.5090303>
