Error compiling gcc-4.9.2 when -arch=native

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi
I am not well versed with the various stages involved building gcc so
apologise if I use incorrect terminology.

I am running CentOS 6.6 and trying to compile and use gcc-4.9.2. I am
able to compile gcc-4.9.2 when using the systems gcc (4.4.7). However
when my CFLAG and CXXFLAG are set to "-march=native" the build fails.
Error pasted below.

After compiling gcc-4.9.2 with CFLAGS  and CXXFLAGS unset, I tried
compiling gcc-4.9.2 with the newly compiled gcc-4.9.2. It appears that
during the bootstrap stage "-march=native" is always used as I had not
explicitly set it. The build process fails with the same error as the
one using gcc-4.4.7 with -march=native. I am unable to build gcc-4.9.2
with gcc-4.9.2 no matter what I try.

Interested to know why this is the case or if I am doing something
incorrectly. It not a major issue as the gcc-4.9.2 compiled with
system gcc without -march=native appears to be working fine.

My CPU arch is a Intel Xeon E5-2630v3 (haswell).

The error is:

make[3]: Entering directory `/home/makerpm/Modules/gcc/BUILD/libiberty'
if [ x"-fpic" != x ] && [ ! -d pic ]; then \
      mkdir pic; \
    else true; fi
touch stamp-picdir
if [ x"-fpic" != x ]; then \
      x86_64-redhat-linux-gnu-gcc -c -DHAVE_CONFIG_H -g
-I/opt/Modules/gcc/4.9.2/include -march=native -I.
-I../../gcc-4.9.2/libiberty/../include  -W -Wall -Wwrite-strings
-Wc++-compat -Wstrict-prototypes -pedantic  -fpic
../../gcc-4.9.2/libiberty/regex.c -o pic/regex.o; \
    else true; fi
/tmp/ccOG3JJ9.s: Assembler messages:
/tmp/ccOG3JJ9.s:1874: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:2462: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:2541: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:2622: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:2674: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:2895: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:3107: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:3172: Error: no such instruction: `shlx %eax,%esi,%eax'
/tmp/ccOG3JJ9.s:7111: Error: no such instruction: `shlx %eax,%ecx,%eax'
/tmp/ccOG3JJ9.s:7119: Error: no such instruction: `shlx %eax,%ecx,%eax'
/tmp/ccOG3JJ9.s:7377: Error: no such instruction: `sarx %eax,%ecx,%eax'
/tmp/ccOG3JJ9.s:7443: Error: no such instruction: `sarx %eax,%ecx,%eax'
/tmp/ccOG3JJ9.s:9693: Error: no such instruction: `sarx %eax,%edx,%eax'
/tmp/ccOG3JJ9.s:11405: Error: no such instruction: `sarx %eax,%edx,%eax'
/tmp/ccOG3JJ9.s:11468: Error: no such instruction: `sarx %eax,%edx,%eax'
make[3]: *** [regex.o] Error 1
make[3]: Leaving directory `/home/makerpm/Modules/gcc/BUILD/libiberty'

For the above pasted error text was generated when using:
[makerpm@wutu ~]$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/opt/Modules/gcc/4.9.2/libexec/gcc/x86_64-redhat-linux-gnu/4.9.2/lto-wrapper
Target: x86_64-redhat-linux-gnu
Configured with: ../configure --build=x86_64-redhat-linux-gnu
--host=x86_64-redhat-linux-gnu --target=x86_64-redhat-linux-gnu
--prefix=/opt/Modules/gcc/4.9.2
--enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-shared
--enable-threads=posix --with-system-zlib --enable-cloog-backend=isl
--enable-lto --enable-plugin --with-linker-hash-style=gnu
--disable-multilib --disable-werror --enable-checking=release
--with-mpc=/opt/Modules/MPC/1.0.1 --with-mpfr=/opt/Modules/MPFR/3.1.2
--with-gmp==/opt/Modules/GMP/5.1.3
Thread model: posix
gcc version 4.9.2 (GCC)

Kind Regards

Nish




[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux