GCC Spec file for ARMv8/Aarch64?

Jonathan Wakely jwakely.gcc@gmail.com
Sat May 21 22:31:00 GMT 2016


On 19 May 2016 at 10:33, Jeffrey Walton wrote:
> I have a LeMaker HiKey dev board
> (http://www.lemaker.org/product-hikey-index.html). Its ARMv8/Aarch64
> with an 8-core A-53 processor.
>
> The problem I have is each time I SSH into the device I usually need
> to do the following to get the Crypto extensions that are available
> natively (GCC fails to consume `-march=native`):
>
>     export CXXFLAGS="-DNDEBUG -g3 -O3 -march=armv8-a+crypto -mcpu=cortex-a53"
>
> I have to do similar when testing CRC32 extensions, and often need to
> `-march=armv8-a+crc` or `-march=armv8-a+crc+crypto`.
>
> I'd like to add `-march=armv8-a+crc+crypto -mcpu=cortex-a53` to a GCC
> spec file so its always available for various programs, without the
> need for source'ing .bash_profile.

You could create a wrapper script called gcc which invokes the real
gcc with those options and put it earlier in your $PATH.


> However, I don't see a GCC spec
> file that seems to cover it:
>
>     $ find /usr/lib -name '*.spec*'
>     /usr/lib/gcc/aarch64-linux-gnu/4.9/libgomp.spec
>     /usr/lib/gcc/aarch64-linux-gnu/4.9/libitm.spec
>
> I also know GCC is using something, but it does not tell me what it is:
>
>    $ gcc -v
>    Using built-in specs.
>    ...
>
> My questions are:
>
>     * What is the name of the built-in GCC spec file?

There is no file, the default specs are built in to the compiler. Use
-dumpspecs to dump them to a file that you can modify and feed back to
the compiler.



More information about the Gcc-help mailing list