View previous topic :: View next topic |
Author |
Message |
necktwi Apprentice
Joined: 24 Aug 2018 Posts: 171
|
Posted: Sat Nov 03, 2018 4:48 pm Post subject: How to rice RPi's ARM1176JZF-S |
|
|
How to rice Broadcom BCM2835 @700MHz ARM11 ARM1176JZF-S
currently I've set CFLAGS="-O2 -pipe -march=armv6j -mfpu=vfp -mfloat-abi=hard" |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Sun Nov 04, 2018 10:43 pm Post subject: |
|
|
You can try
to see the CPU features
and, since you have a recent gcc,
Code: | gcc -march=native -Q --help=target -v - </dev/null |
Code: | gcc -mcpu=native -Q --help=target -v - </dev/null |
to see what options are detected by gcc and maybe improve them, detection still isn't perfect on arm.
Usually using -mcpu is more powerful than using -march _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
Etal Veteran
Joined: 15 Jul 2005 Posts: 1932
|
Posted: Mon Nov 05, 2018 1:00 am Post subject: |
|
|
You can do: _________________ “And even in authoritarian countries, information networks are helping people discover new facts and making governments more accountable.”– Hillary Clinton, Jan. 21, 2010 |
|
Back to top |
|
|
necktwi Apprentice
Joined: 24 Aug 2018 Posts: 171
|
Posted: Wed Nov 07, 2018 12:52 pm Post subject: |
|
|
If i stick in -mcpu=arm1176jzf-s in CFLAGS then emerge says
-mcpu=arm1176jzf-s conflicts with -march=armv6j
Code: | gcc -march=native -Q --help=target -v - </dev/null |
says -march=armv6zk
to rice, should I set -mcpu=arm1176jz-s and -march=armv6zk? or is it same as setting -march=native -mcpu=native or not mentioning -march and -mcpu defaults to native or rpi?
I understand that -mcpu and -march are necessary on crossdev to rice. |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Wed Nov 07, 2018 8:06 pm Post subject: |
|
|
necktwi wrote: | If i stick in -mcpu=arm1176jzf-s in CFLAGS then emerge says
-mcpu=arm1176jzf-s conflicts with -march=armv6j
Code: | gcc -march=native -Q --help=target -v - </dev/null |
says -march=armv6zk
to rice, should I set -mcpu=arm1176jz-s and -march=armv6zk? or is it same as setting -march=native -mcpu=native or not mentioning -march and -mcpu defaults to native or rpi?
I understand that -mcpu and -march are necessary on crossdev to rice. |
try setting all 3, it shouldn't hurt
-mcpu=arm1176jz-s -march=armv6zk -mtune=arm1176jz-s
Hopefully gcc's native autodetection works for your cpu ... _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
necktwi Apprentice
Joined: 24 Aug 2018 Posts: 171
|
Posted: Thu Nov 08, 2018 3:31 am Post subject: |
|
|
But my cpu is arm1176jzf-s, not arm1176jz-s. but Code: | gcc -mcpu=native -Q --help=target -v - </dev/null | says -mcpu=arm1176jz-s.
what should i use? arm1176jzf-s or arm1176jz-s? |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Thu Nov 08, 2018 1:21 pm Post subject: |
|
|
Apparently the 'f' means the CPU has a math coprocessor (FPU), what is the output of
cat /proc/cpuinfo?
If fp or vfp are listed as feautures than probaly gcc is right. _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
necktwi Apprentice
Joined: 24 Aug 2018 Posts: 171
|
Posted: Thu Nov 08, 2018 1:25 pm Post subject: |
|
|
Code: |
(RPi1B2):~ # cat /proc/cpuinfo
processor : 0
model name : ARMv6-compatible processor rev 7 (v6l)
BogoMIPS : 697.95
Features : half thumb fastmult vfp edsp java tls
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xb76
CPU revision : 7
Hardware : BCM2835
Revision : 000e
Serial : 00000000a674e968
|
so i should use -mcpu=arm1176jz-s as gcc mis-derived? though my processor is arm1176jzf-s? |
|
Back to top |
|
|
erm67 l33t
Joined: 01 Nov 2005 Posts: 653 Location: EU
|
Posted: Thu Nov 08, 2018 2:51 pm Post subject: |
|
|
I told you -march native isn't working correctly on ARM
Use the right one, unless of course -mcpu=arm1176jz-s+fp exists and is the same as arm1176jzf-s, gcc turns on most features by default _________________ Ok boomer
True ignorance is not the absence of knowledge, but the refusal to acquire it.
Ab esse ad posse valet, a posse ad esse non valet consequentia
My fediverse account: @erm67@erm67.dynu.net |
|
Back to top |
|
|
|