mercredi 22 avril 2020

GCC with -march : invalid switch

OS: Ubuntu 16.04 s390x
Gcc: Build from source v7.3.0 using steps mentioned below:

mkdir gcc
cd gcc
wget https://ftpmirror.gnu.org/gcc/gcc-7.3.0/gcc-7.3.0.tar.xz
tar -xf gcc-7.3.0.tar.xz
cd gcc-7.3.0
./contrib/download_prerequisites
mkdir objdir
cd objdir
../configure --prefix=/opt/gcc --enable-languages=c,c++ --enable-shared --with-system-zlib --enable-threads=posix --enable-__cxa_atexit --enable-checking --enable-gnu-indirect-function  --disable-bootstrap --disable-multilib
make
make install
ln -sf /opt/gcc/bin/gcc /usr/bin/gcc
ln -sf /opt/gcc/bin/g++ /usr/bin/g++
ln -sf /opt/gcc/bin/g++ /usr/bin/c++
export PATH=/opt/gcc/bin:"$PATH"
export LD_LIBRARY_PATH=/opt/gcc/lib64:"$LD_LIBRARY_PATH"
export C_INCLUDE_PATH=/opt/gcc/lib/gcc/s390x-linux-gnu/7.3.0/include
export CPLUS_INCLUDE_PATH=/opt/gcc/lib/gcc/s390x-linux-gnu/7.3.0/include
sudo ln -sf /opt/gcc/lib64/libstdc++.so.6.0.24 /usr/lib/s390x-linux-gnu/libstdc++.so.6

gcc --version

gcc (GCC) 7.3.0
Copyright (C) 2017 Free Software Foundation, Inc.

Then on compiling code for cockroachDB using make. Build fails with an error:

Error: invalid switch -march=z14
Error: unrecognized option -march=z14

Is there any flag which needs to enable here?
(No such error was observed if gcc is installed from repo using apt-get install g++-7 on Ubuntu 18.04)

Aucun commentaire:

Enregistrer un commentaire