Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 393425 - x11-libs/qt-gui needs neon USE-flag
Summary: x11-libs/qt-gui needs neon USE-flag
Status: RESOLVED DUPLICATE of bug 336618
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Qt Bug Alias
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-12-06 18:07 UTC by Raúl Porcel (RETIRED)
Modified: 2012-02-10 19:39 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Raúl Porcel (RETIRED) gentoo-dev 2011-12-06 18:07:32 UTC
Hi,

qt-gui needs neon use-flag because it ignores CFLAGS during configure but not during make. Let me explain:

configure adds -mfpu=neon to compile some neon-only code, ignoring my CFLAGS. It succeeds, so then when doing make it will compile neon-only source files, and it will fail because i don't have -mfpu=neon on my CFLAGS.

The workaround(i'm pretty sure upstream is happy as it is...) would be using the neon USE-flag(maybe its time to make it global...), to control the -no-neon parameter to configure.

Thanks
Comment 1 Davide Pesavento (RETIRED) gentoo-dev 2011-12-07 14:46:37 UTC
The build failure doesn't need this workaround, I think it can be properly solved by fixing bug #336618.

On the other hand, would a "neon" USE flag be useful anyway, e.g. to avoid autodetection of cpu features for cross-compilation?
If there's a -mno-neon gcc switch, similar to -mno-sse and friends, it shouldn't be necessary because you can add that switch to your C(XX)FLAGS and, assuming bug #336618 fixed, autodetection will fail and qt-gui will build without neon support.

Are there any other cases I'm unaware of?
Comment 2 Davide Pesavento (RETIRED) gentoo-dev 2011-12-31 13:11:33 UTC
Bug #336618 has been fixed. Is a "neon" USE flag still needed?
Comment 3 Raúl Porcel (RETIRED) gentoo-dev 2012-01-14 18:16:08 UTC
I'll let you know once i can try it out
Comment 4 Gavin Pryke 2012-02-10 01:25:45 UTC
Was just emerging x11-libs/qt-gui-4.8.0-r2 and noticed this.

Timestamp of tree: Thu, 09 Feb 2012 01:45:01 +0000

CXXFLAGS="-O2 -ggdb -march=armv7-a -mfpu=vfpv3 -mfloat-abi=softfp -pipe"

----8<----
neon auto-detection... ()
armv7a-unknown-linux-gnueabi-g++ -c -pipe -mfpu=neon -O2 -ggdb -march=armv7-a -mfpu=vfpv3 -mfloat-abi=softfp -pipe -O2 -Wall -W  -I../../../mkspecs/linux-g++ -I. -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -o neon.o neon.cpp
In file included from neon.cpp:42:0:
/usr/lib/gcc/armv7a-unknown-linux-gnueabi/4.5.3/include/arm_neon.h:32:2: error: #error You must enable NEON instructions (e.g. -mfloat-abi=softfp -mfpu=neon) to use arm_neon.h
neon.cpp: In function 'int main(int, char**)':
neon.cpp:46:5: error: 'int32x4_t' was not declared in this scope
neon.cpp:46:15: error: expected ';' before 'null'
neon.cpp:49:29: error: 'null' was not declared in this scope
neon.cpp:49:36: error: 'vst1q_lane_s32' was not declared in this scope
gmake: *** [neon.o] Error 1
neon disabled.
----8<----

seems that the -mfpu=vfpv3 after the -mfpu=neon causes neon test to fail
Comment 5 Davide Pesavento (RETIRED) gentoo-dev 2012-02-10 10:33:55 UTC
(In reply to comment #4)
> seems that the -mfpu=vfpv3 after the -mfpu=neon causes neon test to fail

Sure, because the last -mfpu option takes precedence over earlier ones. Isn't that expected?
Comment 6 Davide Pesavento (RETIRED) gentoo-dev 2012-02-10 10:36:22 UTC
(Please CC yourself when commenting on a bug)
Comment 7 Gavin Pryke 2012-02-10 15:31:40 UTC
Sorry, thought I added CC.

Was not clear that I actually wanted neon optimisation, not sure if -mfpu=neon is good in make.conf.
I have a pandaboard and that supports vfpv3 and neon, could add -mfpu=neon in flags at /etc/portage/env/x11-libs/qt-gui so it's no bother just thought I add that info here after seeing the tests fail. Thanks.
Comment 8 Davide Pesavento (RETIRED) gentoo-dev 2012-02-10 18:11:01 UTC
(In reply to comment #7)
> Sorry, thought I added CC.
> 
> Was not clear that I actually wanted neon optimisation, not sure if -mfpu=neon
> is good in make.conf.
> I have a pandaboard and that supports vfpv3 and neon, could add -mfpu=neon in
> flags at /etc/portage/env/x11-libs/qt-gui so it's no bother just thought I add
> that info here after seeing the tests fail. Thanks.

As far as I understand, -mfpu=neon implies -mfpu=vfpv3, so you could just put the former in your make.conf
Comment 9 Raúl Porcel (RETIRED) gentoo-dev 2012-02-10 19:39:37 UTC
Okay, with the fix from bug #336618 this is fixed as well, so i'm marking it as a duplicate.

Gavin, Davide is right, neon implies vfpv3, in fact neon is an implementation of vfpv3.

Although i don't know of a SoC with vfpv3 that doesn't have neon(tegra has vfpv3-d16)

*** This bug has been marked as a duplicate of bug 336618 ***