Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile error #430

Open
yixuan0719 opened this issue Mar 26, 2020 · 1 comment
Open

Compile error #430

yixuan0719 opened this issue Mar 26, 2020 · 1 comment

Comments

@yixuan0719
Copy link

Hello,
I want to cross-compilation the openswan, an i have updated the CROSSCOMPILE.sh as below:
**#!/bin/bash

cross compile example

#export PREFIX=/volquad/arm-4.0.2
export PREFIX=/opt/iproc/buildroot/host/usr
export DESTDIR=/tmp/openswan.arm
echo $PREFIX

export ARCH=arm
export CC=$PREFIX/bin/arm-linux-gcc
export GCC=$PREFIX/bin/arm-linux-gcc
export LD=$PREFIX/bin/arm-linux-ld
export RANLIB=$PREFIX/bin/arm-linux-ranlib
export AR=$PREFIX/bin/arm-linux-ar
export AS=$PREFIX/bin/arm-linux-as
export STRIP=$PREFIX/bin/arm-linux-strip
export LD_LIBRARY_PATH=$PREFIX/lib/
export PATH=$PATH:$PREFIX/bin
export USERCOMPILE="-Wl,-elf2flt -DCOMPILER_HAS_NO_PRINTF_LIKE -O3 -g ${PORTDEFINE} -I$PREFIX/arm-elf/inc -L$PREFIX/lib/gcc-lib -DGCC_LINT -DLEAK_DETECTIVE -Dlinux -D__linux__"
export WERROR=' '**

but when i run the command: make programs, still using the CC instead of arm-linux-gcc, build log:
root@ubuntu:/home/jli/code_test/trunk/apps/Openswan-2.6.52# make programs
OBJDIR: OBJ.linux.i386
(cd /home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386 && OBJDIRTOP=/home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386 OBJDIR=/home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386 make programs )
make[1]: Entering directory /home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386' make[2]: Entering directory /home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386/lib'
make[3]: Entering directory `/home/jli/code_test/trunk/apps/Openswan-2.6.52/OBJ.linux.i386/lib/libopenswan'
CC addrtoa.c
CC addrtot.c
CC addrtypeof.c
CC alg_info.c
CC anyaddr.c
CC atoaddr.c
CC atoasr.c
CC atosubnet.c
CC atoul.c
CC constants.c
CC copyright.c
CC datatot.c
CC alloc.c
..........

Could you tell me the detail steps of cross compilation? thanks in advance.

@shussain
Copy link
Collaborator

Hello @yixuan0719 . Have you updated the the variables in the CROSS COMPILE to the palform and tools that you are using?

If so, are you getting any errors when you run make programs?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants