[prev in list] [next in list] [prev in thread] [next in thread]
List: botan-devel
Subject: [botan-devel] Build failure on MIPS64 n32 architecture
From: Vicente Olivert Riera <Vincent.Riera () imgtec ! com>
Date: 2014-10-21 12:54:51
Message-ID: 5446579B.6000201 () imgtec ! com
[Download RAW message or body]
Hello,
I'm having this compilation failure when building Botan for MIPS64 n32
architecture:
--------------------------------------------------------
>>> botan 1.10.8 Building
/usr/bin/make -j1 -C /br/output/build/botan-1.10.8
AR="/br/output/host/usr/bin/mips64el-ctng_n32-linux-gnu-ar crs"
make[1]: Entering directory `/br/output/build/botan-1.10.8'
/br/output/host/usr/bin/mips64el-ctng_n32-linux-gnu-g++ -mabi=64
-Ibuild/include -O3 -finline-functions -D_REENTRANT -Wno-long-long -W
-Wall -fPIC -fvisibility=hidden -c src/algo_base/symkey.cpp -o
build/lib/algo_base_symkey.o
In file included from
/br/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/include/features.h:388:0,
from
/br/output/host/opt/ext-toolchain/mips64el-ctng_n32-linux-gnu/include/c++/4.8.2/mips64el-ctng_n32-linux-gnu/bits/os_defines.h:39,
from
/br/output/host/opt/ext-toolchain/mips64el-ctng_n32-linux-gnu/include/c++/4.8.2/mips64el-ctng_n32-linux-gnu/bits/c++config.h:426,
from
/br/output/host/opt/ext-toolchain/mips64el-ctng_n32-linux-gnu/include/c++/4.8.2/string:38,
from build/include/botan/allocate.h:12,
from build/include/botan/secmem.h:11,
from build/include/botan/symkey.h:11,
from src/algo_base/symkey.cpp:8:
/br/output/host/usr/mips64el-buildroot-linux-gnu/sysroot/usr/include/gnu/stubs.h:20:33: \
fatal error: gnu/stubs-n64_soft.h: No such file or directory
# include <gnu/stubs-n64_soft.h>
^
compilation terminated.
--------------------------------------------------------
The problem is that Botan is passing the option "-mabi=64" which is not
correct for MIPS64 n32. It should be "-mabi=n32" instead according to
the gcc manual: https://gcc.gnu.org/onlinedocs/gcc/MIPS-Options.html
Basically, in MIPS, we have three variants regarding the ABI:
mips32 o32 -> -mabi=32
mips64 n32 -> -mabi=n32
mips64 n64 -> -mabi=64
But Botan doesn't take into account the two MIPS64 ABIs and always uses
the one for n64, which fails when building for MIPS64 n32.
The "-mabi=64" option comes from this file: src/build-data/cc/gcc.txt
In that file there is a line to set the "-mabi=64" option for the mips64
architecture, but is not taking into account that MIPS64 can be n32 or n64.
I have fixed my problem just removing that file from that file, so the
"-mabi=64" option is not recorded in the Makefile. Is that an acceptable
fix for upstream?
Also, the file for clang has the same problem: src/build-data/cc/clang.txt
And also, this file (which I don't know what is used for), has the same
problem as well: src/build-data/cc/mipspro.txt
Best regards,
--
Vicente Olivert Riera
Graduate Software Engineer, MIPS Processor IP
Imagination Technologies Limited
t: +44 (0)113 2429814
www.imgtec.com
_______________________________________________
botan-devel mailing list
botan-devel@randombit.net
http://lists.randombit.net/mailman/listinfo/botan-devel
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic