This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

problem with m68k-elf-gcc


Hi David & Paul,
Thanks for the reply. I' ve not modified crt0.o and linker script file bcc.ld and I also dont know how to modify, but in any case I thought with existing startup and linker files a simple program should work. But it is not so, can any of you tell me where to look for the information regarding these startup and linker files.


In between this is what I did to build the compiler from the cygwin on win2K

1. I downloaded binutils-2.11.2.tar.gz, gcc-2.95.3.tar.gz and newlib1.11.0.tar.gz into D:\crossgccsrc from one gnu ftp mirrors.

2. I untarred all the files into d:\crossgccsrc.

3. I made build directories as d:\crossgccsrc\binutils-2.11.2\bnobj ; d:\crossgccsrc\gcc-2.95.3\gccobj and d:\crossgccsrc\newlib-1.11.0\newobj.

4. I first build binutils as
cd d:\crossgccsrc\\binutils-2.11.2\bnobj
../configure --target=m68k-elf --prefix=/m68kelf
make 2>&1 | tee make.log
make install.

5. I close the cygwin window to set the path

6. I set the path d:\cygwin\m68kelf\bin from the system properties by right clicking on to "my computer" icon.

7. I again open cygwin window and checked for new m68k-elf-as and m68k-elf-ld by typing m68k-elf-as -v and m68k-elf-ld -v. On the screen it shows the respective versions.

8. Then I build boot strap compiler as follows:
cd d:/crossgccsrc/gcc-2.95.3/gccobj
../configure --target=m68k-elf --prefix=/m68kelf --with-gnu-as --with-gnu-ld --with-newlib \
--disable-shared --without-headers --enable-languages=c
make all-gcc 2>&1 | tee make.log
make install-gcc


9. After this I go to build newlib as follows
cd ../../newlib-1.11.0/newobj
../configure --target=m68k-elf --prefix=/m68kelf
make 2>&1 | tee make.log
make install

10. Finally I build the complete gcc compiler, at this point if I try to build C & C++ compiler make gives error hence I build only C compiler as follows:
cd ../../gcc-2.95.3/gccobj
rm -rf *
../configure --target=m68k-elf --prefix=/m68kelf --with-gnu-as --with-gnu-ld
make all 2>&1 | tee make.log


....the compiler is built but I see "configure: error: installation or configuration problem: C compiler cannot create executables" at the end of make.log, the last few lines are as below

checking how to run the C preprocessor... /cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/gcc/xgcc -B/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/gcc/ -B/m68kelf/m68k-elf/bin/ -E
checking for sys/file.h... yes
checking for sys/param.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for unistd.h... yes
checking for strings.h... no
checking for sys/time.h... yes
checking for sys/resource.h... yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking whether the C compiler (/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/gcc/xgcc -B/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/gcc/ -B/m68kelf/m68k-elf/bin/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
Configuring in m68k-elf/libstdc++
Configuring in m68k-elf/libf2c
creating cache ./config.cache
checking if compiler f771 has been built... no
Configuring in m68k-elf/libchill
creating cache ./config.cache
checking if compiler cc1chill has been built... no
Configuring in m68k-elf/libobjc
creating cache ./config.cache
checking if compiler cc1obj has been built... no


I thought that this could be and went on to install the compiler by

make install

10. Now when I test a small program with just main and return it gave the error as I told before.

I would like to know whether is there any problem in my build procedure are should I had to modify crt0.s and bcc.ld file.

I also checked config.log file at d:/crossgccsrc/gcc-2.95.3/gccobj/libberty

and it indicates somethings like "configure:failed program was" at few places. I am including few lines where I saw this type of statements:
.
.
.
configure:1798: checking for basename
configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccmyMX9c.o(.text+0x16): In function `main':
/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/libiberty/configure:1820: undefined reference to `_basename'
collect2: ld returned 1 exit status
configure: failed program was:
#line 1803 "configure"
#include "confdefs.h"
.
.
.
configure:1798: checking for insque
configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccOkzvYw.o(.text+0x16): In function `main':
/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/libiberty/configure:1820: undefined reference to `_insque'
collect2: ld returned 1 exit status
configure: failed program was:
#line 1803 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char insque(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char insque();
.
.
.
configure:1798: checking for mkstemps
configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccQzXHMo.o(.text+0x16): In function `main':
/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/libiberty/configure:1820: undefined reference to `_mkstemps'
collect2: ld returned 1 exit status
configure: failed program was:
#line 1803 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char mkstemps(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char mkstemps();
.
.
.
.
configure:1798: checking for sigsetmask
configure:1826: gcc -o conftest -g -O2 conftest.c 1>&5
/tmp/ccEsRJaA.o(.text+0x16): In function `main':
/cygdrive/d/crossgccsrc/gcc-2.95.3/gccobj/libiberty/configure:1820: undefined reference to `_sigsetmask'
collect2: ld returned 1 exit status
configure: failed program was:
#line 1803 "configure"
#include "confdefs.h"
/* System header to define __stub macros and hopefully few prototypes,
which can conflict with char sigsetmask(); below. */
#include <assert.h>
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
builtin and then its argument prototype would still apply. */
char sigsetmask();
.
.
.
.
configure:2212: checking for pid_t
configure:2246: checking for vfork.h
configure:2256: gcc -E conftest.c >/dev/null 2>conftest.out
configure:2252:19: vfork.h: No such file or directory
configure: failed program was:
#line 2251 "configure"
#include "confdefs.h"
#include <vfork.h>
configure:2281: checking for working vfork
configure:2432: gcc -o conftest -g -O2 conftest.c 1>&5
configure:2459: checking for sys_errlist
.
.
.



Whether all these are causing problems , if so how to overcome these.



Bye Amitivkram M. Deepti Electronics & Electro Optics Pvt. Ltd., Bangalore

_________________________________________________________________
Attention Taureans! See what's in store. http://server1.msn.co.in/features/taurus/index.asp Read on.



------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]