Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 432474 - sys-devel/gcc-4.5.4: gcc warns when using "-march=armv7-a -mcpu=cortex-a9" together
Summary: sys-devel/gcc-4.5.4: gcc warns when using "-march=armv7-a -mcpu=cortex-a9" to...
Status: RESOLVED WONTFIX
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Development (show other bugs)
Hardware: ARM Linux
: Normal normal
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2012-08-23 17:01 UTC by Anthony Basile
Modified: 2015-10-22 14:23 UTC (History)
1 user (show)

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


Attachments
Log for failed build. (build.log,16.83 KB, text/plain)
2012-08-23 17:01 UTC, Anthony Basile
Details
config log (config.log,38.61 KB, text/plain)
2012-08-23 17:39 UTC, Anthony Basile
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Anthony Basile gentoo-dev 2012-08-23 17:01:08 UTC
Created attachment 322030 [details]
Log for failed build.

The failure is during configure when checking for tls_model.  build.log is attached for completeness.
Comment 1 SpanKY gentoo-dev 2012-08-23 17:08:01 UTC
need the config.log ...
Comment 2 Anthony Basile gentoo-dev 2012-08-23 17:39:17 UTC
Created attachment 322032 [details]
config log

Yeah that would help.  The following line worries me:

conftest.c:1:0: error: switch -mcpu=cortex-a9 conflicts with -march= switch

I'm testing on a shared board and someone else removed the original -march=armv7-a and added -mcpu=cortex-a9 to the CFLAGS in make.conf.  So rather than waste your time, let me test again on board which I use exclusively (but unfortunately slower) and I'll get back to you.  Sorry about that, I just didn't expect the CFLAGS to changed.

The original had

   CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"


and now I see

   CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
Comment 3 Anthony Basile gentoo-dev 2012-08-23 17:40:55 UTC
(In reply to comment #2)
> Created attachment 322032 [details]
> config log

> 
> The original had
> 
>    CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"
> 
> 
> and now I see
> 
>    CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"

Wow I'm really out of it today:

The original had:

   CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"

and now

   CFLAGS="-O2 -pipe -march=armv7-a -mcpu=cortex-a9 -mfpu=vfpv3 -mfloat-abi=hard"
Comment 4 Steev Klimaszewski (RETIRED) gentoo-dev 2012-08-23 23:02:22 UTC
According to the ARM options page for gcc, the warning seems to be wrong?

http://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html says 

-march=name
This specifies the name of the target ARM architecture. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. This option can be used in conjunction with or instead of the -mcpu= option. Permissible names are: `armv2', `armv2a', `armv3', `armv3m', `armv4', `armv4t', `armv5', `armv5t', `armv5e', `armv5te', `armv6', `armv6j', `armv6t2', `armv6z', `armv6zk', `armv6-m', `armv7', `armv7-a', `armv7-r', `armv7-m', `iwmmxt', `iwmmxt2', `ep9312'.
-march=native causes the compiler to auto-detect the architecture of the build computer. At present, this feature is only supported on Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect. 

-mcpu=name
This specifies the name of the target ARM processor. GCC uses this name to determine what kind of instructions it can emit when generating assembly code. Permissible names are: `arm2', `arm250', `arm3', `arm6', `arm60', `arm600', `arm610', `arm620', `arm7', `arm7m', `arm7d', `arm7dm', `arm7di', `arm7dmi', `arm70', `arm700', `arm700i', `arm710', `arm710c', `arm7100', `arm720', `arm7500', `arm7500fe', `arm7tdmi', `arm7tdmi-s', `arm710t', `arm720t', `arm740t', `strongarm', `strongarm110', `strongarm1100', `strongarm1110', `arm8', `arm810', `arm9', `arm9e', `arm920', `arm920t', `arm922t', `arm946e-s', `arm966e-s', `arm968e-s', `arm926ej-s', `arm940t', `arm9tdmi', `arm10tdmi', `arm1020t', `arm1026ej-s', `arm10e', `arm1020e', `arm1022e', `arm1136j-s', `arm1136jf-s', `mpcore', `mpcorenovfp', `arm1156t2-s', `arm1156t2f-s', `arm1176jz-s', `arm1176jzf-s', `cortex-a5', `cortex-a7', `cortex-a8', `cortex-a9', `cortex-a15', `cortex-r4', `cortex-r4f', `cortex-r5', `cortex-m4', `cortex-m3', `cortex-m1', `cortex-m0', `cortex-m0plus', `xscale', `iwmmxt', `iwmmxt2', `ep9312', `fa526', `fa626', `fa606te', `fa626te', `fmp626', `fa726te'.
-mcpu=generic-arch is also permissible, and is equivalent to -march=arch -mtune=generic-arch. See -mtune for more information.

-mcpu=native causes the compiler to auto-detect the CPU of the build computer. At present, this feature is only supported on Linux, and not all architectures are recognized. If the auto-detect is unsuccessful the option has no effect.
Comment 5 Anthony Basile gentoo-dev 2012-08-25 08:54:58 UTC
The original concern was with glibc. Setting the CFLAGS to

    CFLAGS="-O2 -pipe -march=armv7-a -mfpu=vfpv3-d16 -mfloat-abi=hard"

(ie removing -mcpu=cortex-a9) and glibc-2.15-r2 builds fine on arm.
Comment 6 SpanKY gentoo-dev 2015-10-22 14:23:19 UTC
seems to work w/gcc-4.9.3 which is stable now.  no plans on backporting.