All of lore.kernel.org
 help / color / mirror / Atom feed
From: Johan Hedberg <johan.hedberg@gmail.com>
To: Siarhei Siamashka <siarhei.siamashka@gmail.com>
Cc: Bastien Nocera <hadess@hadess.net>, linux-bluetooth@vger.kernel.org
Subject: Re: 4.98 fails to build with newer gcc
Date: Mon, 23 Jan 2012 13:54:56 +0200	[thread overview]
Message-ID: <20120123115456.GA19251@x220> (raw)
In-Reply-To: <CACY+gR0GRKzPWiLwfaoY0Gp1hEEpL-nSAV95KSVDjcetzexmdg@mail.gmail.com>

Hi,

On Fri, Jan 13, 2012, Siarhei Siamashka wrote:
> On Fri, Jan 13, 2012 at 3:10 PM, Bastien Nocera <hadess@hadess.net> wrote:
> > A few warnings:
> >
> > sbc/sbc.c:766:34: warning: always_inline function might not be inlinable [-Wattributes]
> > sbc/sbc.c:558:34: warning: always_inline function might not be inlinable [-Wattributes]
> > sbc/sbc.c:163:31: warning: always_inline function might not be inlinable [-Wattributes]
> 
> Looks like the new version of gcc requires both "inline" and
> "__attribute__((always_inline))" to be used in SBC_ALWAYS_INLINE
> according to [1].
> 
> > and an error
> >
> > sbc/sbc_primitives_mmx.c: In function 'sbc_calc_scalefactors_mmx':
> > sbc/sbc_primitives_mmx.c:294:4: warning: asm operand 2 probably doesn't match constraints [enabled by default]
> > sbc/sbc_primitives_mmx.c:294:4: error: impossible constraint in 'asm'
> 
> Here gcc 4.7 thinks that
> 				"i" ((char *) &sb_sample_f[1][0][0] -
> 					(char *) &sb_sample_f[0][0][0]),
> is an impossible constraint. According to [2], "i" means "An immediate
> integer operand (one with constant value) is allowed. This includes
> symbolic constants whose values will be known only at assembly time or
> later".
> Earlier versions of gcc could see that this expression is a compile
> time constant, but gcc 4.7 can't. As a workaround, "i" can be changed
> to "r" here. The downside is that this needs one more register for
> inline assembly and the number of available registers is really
> limited for 32-bit x86 systems. As a test, it is possible to try "gcc
> -O2 -mmmx -c -m32 -fno-omit-frame-pointer -fPIC sbc_primitives_mmx.c".
> Both "-fno-omit-frame-pointer" and "-fPIC" options reduce the number
> of available registers.

So is someone going to send a patch for this? I think we should try to
have it fixed before doing the next BlueZ release.

Johan

  reply	other threads:[~2012-01-23 11:54 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-13 13:10 4.98 fails to build with newer gcc Bastien Nocera
2012-01-13 16:26 ` Siarhei Siamashka
2012-01-23 11:54   ` Johan Hedberg [this message]
2012-01-23 12:05     ` Bastien Nocera
2012-02-24 12:16     ` Siarhei Siamashka

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=20120123115456.GA19251@x220 \
    --to=johan.hedberg@gmail.com \
    --cc=hadess@hadess.net \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=siarhei.siamashka@gmail.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.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.