Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
correct way for arm cflags vs useflag
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM
View previous topic :: View next topic  
Author Message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1306
Location: sweden

PostPosted: Sun Apr 03, 2022 3:51 pm    Post subject: correct way for arm cflags vs useflag Reply with quote

hi all

what is the correct way to use cflags vs useflags for arm ? . ATM i have it like this :

Code:


CFLAGS="-O2 -pipe -march=armv7-a -mfpu=neon -mfloat-abi=hard"
CXXFLAGS="${CFLAGS}"

USE="cpu_flags_arm_neon"



regards hedmo
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54391
Location: 56N 3W

PostPosted: Sun Apr 03, 2022 4:21 pm    Post subject: Reply with quote

hedmo,

app-portage/cpuid2cpuflags works on ARM.
Code:
#From a Raspberry Pi4
CPU_FLAGS_ARM="edsp neon thumb vfp vfpv3 vfpv4 vfp-d32 crc32 v4 v5 v6 v7 v8 thumb2"


Code:
USE="cpu_flags_arm_neon"
is OK, just a bit cluttered.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
ElRay70K70H
n00b
n00b


Joined: 12 Apr 2022
Posts: 17

PostPosted: Tue Apr 12, 2022 2:59 am    Post subject: Re: correct way for arm cflags vs useflag Reply with quote

Are you getting errors with:
hedmo wrote:
Code:
... -mfpu=neon -mfloat-abi=hard"
I tried those with the regular Raspberry PI OS on an 64-bit 8GB Pi4. As best as I can tell, those options are not supported in 64-bit mode.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54391
Location: 56N 3W

PostPosted: Tue Apr 12, 2022 10:25 am    Post subject: Reply with quote

ElRay70K70H,

Welcome to Gentoo.

Both 32 and 64 bit arm have neon but they are different, non interchangeable options.
-mfloat-abi=hard does not make sense on arm64 as the hardware FPU is not optional.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
hedmo
Veteran
Veteran


Joined: 29 Aug 2009
Posts: 1306
Location: sweden

PostPosted: Mon Apr 18, 2022 12:22 pm    Post subject: Reply with quote

sorry for a late reply ...

the more important answer is if i need :

Code:

-mfpu=neon


in CFLAGS= ?


regards hedmo
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Gentoo on ARM All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum