KDevelop and cross plateforme
abdeslam BENZEGHIOUA
abbe at teamlog.com
Thu Jul 25 15:08:54 BST 2002
I use KDevelop 2.1. in SuSE Linux 8.0 to compile my program for The
crossed platform arm-uclinux,
I positioned well the flags of compilation in KDevelop (see below) :
In Menu options ...
+- KDevloper Setup
+- Compiler
This computer is : i386
OS : linux (I use linux 8.0)
----------------------------------
Archtecture : arm
Plate-forme : linux
Commands system of the preprocessor C : arm-uclinux-gcc
Commands system of the compiler C : arm-uclinux-gcc
Commands system of the compiler C++ : arm-uclinux-gcc
In menu Project ...
+- Options ...
Options of compiler :
In the tab Flags and warnings
Flags of compiler C (CFLAGS) : -g -O -Wall
-mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base -mno-got -msoft-float
-D__uclinux__
Flags of compiler C++ (CFLAGS) : -g -O -Wall -mapcs-32
-mcpu=arm7tdmi -fpic -msingle-pic-base -mno-got -msoft-float
-D__uclinux__
In the tab Flags for the publishing(edition) of
the links
(LDFLAGS)
Anothers flags : -T
/usr/local/NETLx/userapps/glibc_apps/rt_init/user.ld
In menu Build...
+- Configure ...
Arguments : --build=i386-linux --host=i386-linux
--target=arm-uclinux
When I build my program I obtain a binary work in plateforme linux but
not work in : arm-uclinux
P.S : when I go to menu Build ... Configure ... Arguments .... ans I
presse OK button I abtain :
checking build system type... i386-pc-linux-gnu
checking host system type... i386-pc-linux-gnu
checking target system type... arm-unknown-uclinux
checking for a BSD compatible install... /usr/bin/install -c
checking for -p flag to install... yes
checking whether build environment is sane... yes
checking for mawk... no
checking for gawk... gawk
checking whether make sets ${MAKE}... yes
checking for style of include used by make... GNU
checking for i386-linux-g++... arm-uclinux-gcc
checking whether we are using the GNU C++ compiler... no
checking whether arm-uclinux-gcc accepts -g... no
checking dependency style of arm-uclinux-gcc... gcc
checking for i386-linux-gcc... arm-uclinux-gcc
checking for C compiler default output... a.out
checking whether the C compiler works... configure: error: cannot run C
compiled programs.
If you meant to cross compile, use `--host'.
*** échec ***
The result of build :
cd . \
&& CONFIG_FILES= CONFIG_HEADERS=config.h \
/bin/sh ./config.status
config.status: creating config.h
config.status: config.h is unchanged
gmake all-recursive
gmake[1]: Entre dans le répertoire `/home/abbe/mytest'
cd . && \
/bin/sh /home/abbe/mytest/admin/missing --run automake --foreign ./Makefile
cd . && perl admin/am_edit Makefile.in
cd . && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=Makefile /bin/sh ./config.status
fast creating Makefile
gmake[1]: Quitte le répertoire `/home/abbe/mytest'
gmake[1]: Entre dans le répertoire `/home/abbe/mytest'
Making all in mytest
gmake[2]: Entre dans le répertoire `/home/abbe/mytest/mytest'
cd .. && \
/bin/sh /home/abbe/mytest/admin/missing --run automake --gnu
mytest/Makefile
cd .. && perl admin/am_edit mytest/Makefile.in
cd .. && \
CONFIG_HEADERS= CONFIG_LINKS= \
CONFIG_FILES=mytest/Makefile /bin/sh ./config.status
fast creating mytest/Makefile
gmake[2]: Quitte le répertoire `/home/abbe/mytest/mytest'
gmake[2]: Entre dans le répertoire `/home/abbe/mytest/mytest'
source='main.c' object='main.o' libtool=no \
depfile='.deps/main.Po' tmpdepfile='.deps/main.TPo' \
depmode=gcc /bin/sh ../admin/depcomp \
gcc -DHAVE_CONFIG_H -I. -I. -I.. -O2 -O0 -g3 -Wall -c `test -f main.c ||
echo './'`main.c
/bin/sh ../libtool --mode=link gcc -O2 -O0 -g3 -Wall -o mytest main.o
mkdir .libs
gcc -O2 -O0 -g3 -Wall -o mytest main.o
gmake[2]: Quitte le répertoire `/home/abbe/mytest/mytest'
gmake[2]: Entre dans le répertoire `/home/abbe/mytest'
gmake[2]: Quitte le répertoire `/home/abbe/mytest'
gmake[1]: Quitte le répertoire `/home/abbe/mytest'
*** succès ***
---------------------------
I does not understand why KDevelop does not consider my options of
compilation .
But when I visualize the mytest.kdevprj file I obtain :
[AUTHORS]
dist=true
install=false
install_location=
type=DATA
[COPYING]
dist=true
install=false
install_location=
type=DATA
[ChangeLog]
dist=true
install=false
install_location=
type=DATA
[Config for BinMakefileAm]
addcxxflags=-g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base
-mno-got -msoft-float -D__uclinux__
bin_program=mytest
cflags=-g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base
-mno-got -msoft-float -D__uclinux__
cppflags=-g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic -msingle-pic-base
-mno-got -msoft-float -D__uclinux__
cxxflags=\s-O0 -g3 -Wall
ldadd=
ldflags=\s -T /usr/local/NETLx/userapps/glibc_apps/rt_init/user.ld
[General]
AMChanged=false
author=Abdeslam
configure_args=\s--build=i386-linux --host=i386-linux --target=i386-linux\s
email=abbe at teamlog.com
kdevprj_version=1.3
make_options=\s-j1
makefiles=Makefile.am,mytest/Makefile.am,mytest/docs/Makefile.am,mytest/docs/en/Makefile.am
modifyMakefiles=true
project_name=MyTest
project_type=normal_c
short_info=
sub_dir=mytest/
version=0.1
version_control=None
[INSTALL]
dist=true
install=false
install_location=
type=DATA
[LFV Groups]
Autres=*
En-têtes=*.h,*.hh,*.hxx,*.hpp,*.H
GNU=AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO,NEWS
Sources=*.cpp,*.c,*.cc,*.C,*.cxx,*.ec,*.ecpp,*.lxx,*.l++,*.ll,*.l
groups=En-têtes,Sources,GNU,Autres
[Makefile.am]
files=mytest.kdevprj,admin,AUTHORS,COPYING,ChangeLog,INSTALL,README,TODO
sub_dirs=mytest
type=normal
[README]
dist=true
install=false
install_location=
type=DATA
[TODO]
dist=true
install=false
install_location=
type=DATA
[admin]
dist=true
install=false
install_location=
type=DATA
[mytest.kdevprj]
dist=true
install=false
install_location=
type=DATA
[mytest/Makefile.am]
files=mytest/main.c
sub_dirs=
type=prog_main
[mytest/docs/Makefile.am]
sub_dirs=
type=normal
[mytest/docs/en/Makefile.am]
sub_dirs=
type=normal
[mytest/main.c]
dist=true
install=false
install_location=
type=SOURCE
P.S . When I delete all options sets, and I remplace the Kdevelop
Makefile by my Makefile (see bellow):
OBJFMT = elf
OBJFMTD = elfdebug
OBJFMT2FLT = ldelf2flt
LDFLAGS = -T $(NETARMROOT)/userapps/glibc_apps/rt_init/user.ld
LD = arm-uclinux-ld
CFLAGS = -g -O -Wall -mapcs-32 -mcpu=arm7tdmi -fpic
-msingle-pic-base -mno-got -msoft-float -D__uclinux__
CC = arm-uclinux-gcc
SRC = main.c
OBJ = $(SRC:.c=.o)
all: hello_glibc hello_glibc.elfdebug
hello_glibc.elf: $(OBJ)
$(CC) $(CFLAGS) $(LDFLAGS) -o $@ $(OBJ) $(LIBS) $(NETLIBS)
hello_glibc: hello_glibc.elf
$(OBJFMT2FLT) -s 40960 -o $@ $<
hello_glibc.elfdebug: hello_glibc.elf
$(LD) $(LDFLAGS) -o $@ $<
clean:
rm -f $(OBJ) hello_glibc *.elf *.elfdebug *.map
The result : I obtain the good binary : work in arm-uclinux plate-forme.
But this solution it is of the deceit ( the cheating),
Please can you help me.
Regards.
Abdeslam.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kdevelop/attachments/20020725/012ce433/attachment.html>
More information about the KDevelop
mailing list