Sponsored Content
Operating Systems Linux GCC cross compiler for x86_64-elf Post 302272569 by Mandar123 on Wednesday 31st of December 2008 02:06:24 AM
Old 12-31-2008
GCC cross compiler for x86_64-elf

Hi,
I am building GCC cross compiler for x86_64-elf
for that a have followed steps,


1. mkdir build-gmp build-mpfr

2. cd build-gmp

3. ../gmp-4.2/configure --prefix=/usr/local

4. make all install

5. make check

6.cd ../build-mpfr

7. ../mpfr-2.3.2/configure --prefix=/usr/local/

8. make all install

9. export LD_LIBRARY_PATH= /usr/local/lib

----------------------------------------------------------------------

10. export PREFIX=/usr/cross

11. export TARGET=x86_64-elf

12. cd /usr/src

13. mkdir build-binutils build-gcc

14. cd ../build-binutils

15. ../binutils-2.18/configure --target=$TARGET --prefix=$PREFIX --disable-nls

16. make all

17. make install

18. export PATH=$PATH:$PREFIX/bin

19. cd ../build-gcc
../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --disable-nls
--enable-languages=c,c++ --without-headers --with-gmp=/usr/local --with-mpfr=/usr/local

20. make all-gcc install-gcc


------Porting new library------

21. cd build-newlib/

22. ../newlib-1.17.0/configure --prefix=$PREFIX --target=$TARGET

23. make all install


-------------Rebuild GCC with headers......
using the --with-headers option to tell GCC where to find the headers of new C library.

24. ../gcc-4.3.2/configure --target=$TARGET --prefix=$PREFIX --disable-nls
--enable-languages=c,c++ --with-headers=/usr/cross/x86_64-elf/include --with-gmp=
/usr/local --with-mpfr=/usr/local

25. make all-gcc

26. make install-gcc


It is successfuly installed. But when i am compiling simple helloworld program it is giving error as

[root@vm-centos12 build-gcc]#x86_64-elf-gcc hello.c
/usr/cross/lib/gcc/x86_64-elf/4.3.2/../../../../x86_64-elf/bin/ld: crt0.o: No such file: No such file or directory
collect2: ld returned 1 exit status

I have searched for crt0.o file but this file is not present in gcc installed folder.

Please tell me where is the problem and steps that i followed are correct or not.

I am very much thankful to you.

Regards Smilie
Mandar.
Mandar123
 

9 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

xl C/C++ compiler to GCC compiler

Hi, we are converting from IBM-AIX(xl c/c++ compiler) to Linux(GCC complier). As a part of this i need to change the CFLAGS. The xl c/c++ complier CFLAGS is CFLAGS := $(CDEBUG) $(PROJECT_INCLUDE_DIRS) $(COBJECT_MODE) -qcpluscmt -qmakedep -qcheck=all \ -qalign=bit_packed $(LINT_FLAGS)... (0 Replies)
Discussion started by: pbattu1
0 Replies

2. Linux

gcc compiled executable not working across x86_64 linux platforms

Hi I compiled a hello world program on two different 64-bit Linux machines, named quimby and node0331. When I compile on quimby and run on node0331 I get a "Floating exception (core dumped)" error. But if I do it in reverse, things work fine. Here's my compilation on quimby: $ uname -a... (3 Replies)
Discussion started by: same1290
3 Replies

3. Linux

GCC cross compiler for x86_64

Hi, I am tried to install GCC cross compiler for 64-bit machine. i want compile one application for 64 bit machine. I have followed steps form GCC Cross-Compile - OSDev Wiki . Please if anybody have installed cross compiler successfully, please tell me the steps followed by you. Thanking... (0 Replies)
Discussion started by: Mandar123
0 Replies

4. SuSE

cross gcc compiler on OpenSUSE

Hi All I want to create build machine for three architecture (i386, amd64 and ia64) on 32bit machine on OpenSUSE 10.0 I installed: cross-i386-gcc-icecream-backend-4.3.1_20080507-7.1 cross-i386-binutils-2.18.50.20080409-12.1 cross-x86_64-gcc-icecream-backend-4.3.1_20080507-7.1... (0 Replies)
Discussion started by: Kolesar
0 Replies

5. Red Hat

installing the gcc cross compiler

While i try to install the gcc cross compiler using following commands in fedora 6 commands cd /etc/yum.repos.d/ # wget http://fedora-arm.wantstofly.org/cross/cross.repo # yum install armv5tel-redhat-linux-gnueabi-gcc i got an error # cd yum.repos.d # wget... (3 Replies)
Discussion started by: sujith4u87
3 Replies

6. Red Hat

Building a ppc476 enabled GCC cross compiler and toolchain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (0 Replies)
Discussion started by: raghuhb
0 Replies

7. UNIX for Advanced & Expert Users

Building a ppc476 enabled GCC cross compiler and tool chain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (1 Reply)
Discussion started by: raghuhb
1 Replies

8. Linux

Building a ppc476 enabled GCC cross compiler and tool chain

Building a ppc476 enabled GCC cross compiler and tool chain Hello, I am trying to build a cross GCC compiler for PPC476. I applied all the relevant patches. Cross compiler build was successful. When i try to compile the source code using the cross compiler i am getting the below error... (1 Reply)
Discussion started by: raghuhb
1 Replies

9. Programming

what is a cross compiler

recently i was been to an interview to an automotive company, they have posed me a question that what section of compiler must be changed if the target is changed. ie,if ur compiler is meant for generating executable to a 8051 target what changes do you do to make it flexible to generate the... (2 Replies)
Discussion started by: shyam.sunder91
2 Replies
PYTHON-CONFIG(1)					      General Commands Manual						  PYTHON-CONFIG(1)

NAME
python-config - output build options for python C/C++ extensions or embedding SYNOPSIS
python-config [ --prefix ] [ --exec-prefix ] [ --includes ] [ --libs ] [ --cflags ] [ --ldflags ] [ --help ] DESCRIPTION
python-config helps compiling and linking programs, which embed the Python interpreter, or extension modules that can be loaded dynamically (at run time) into the interpreter. OPTIONS
--cflags print the C compiler flags. --ldflags print the flags that should be passed to the linker. --includes similar to --cflags but only with -I options (path to python header files). --libs similar to --ldflags but only with -l options (used libraries). --prefix prints the prefix (base directory) under which python can be found. --exec-prefix print the prefix used for executable program directories (such as bin, sbin, etc). --help print the usage message. EXAMPLES
To build the singe-file c program prog against the python library, use gcc $(python-config --cflags --ldflags) progr.cpp -o progr.cpp The same in a makefile: CFLAGS+=$(shell python-config --cflags) LDFLAGS+=$(shell python-config --ldflags) all: progr To build a dynamically loadable python module, use gcc $(python-config --cflags --ldflags) -shared -fPIC progr.cpp -o progr.so SEE ALSO
python (1) http://docs.python.org/extending/extending.html /usr/share/doc/python/faq/extending.html AUTHORS
This manual page was written by Johann Felix Soden <johfel@gmx.de> for the Debian project (and may be used by others). November 27, 2011 PYTHON-CONFIG(1)
All times are GMT -4. The time now is 05:06 PM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy