public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Add new architechture in gcc build error
@ 2009-09-21  9:50 daniel tian
  2009-09-21  9:56 ` Andrew Haley
  2009-09-21 18:49 ` Ian Lance Taylor
  0 siblings, 2 replies; 9+ messages in thread
From: daniel tian @ 2009-09-21  9:50 UTC (permalink / raw)
  To: gcc; +Cc: Ian Lance Taylor

[-- Attachment #1: Type: text/plain, Size: 4041 bytes --]

Hi,
   I have already finished CPU port named RICE.  The previous version
I did is on gcc 4.0.2. it can be compiled.  Now I wanna move it to
v4.3.0.  I added the config script just as the CRX architechture.
   But when run the configure,

export TARGET=rice-elf
export PREFIX=/usr/local/cross/$TARGET
export PATH=$PATH:$PREFIX/bin

rm -fr build-gcc
mkdir build-gcc

cd build-gcc
../rice-gcc-4.3.0/configure --target=$TARGET --prefix=$PREFIX
--enable-languages=c  --without-headers --with-newlib --with-gnu-as
--with-gnu-ld --disable-multilib --disable-libssp

make all 2>&1 | tee build.log



but the error occurred like the following:

checking build system type... i686-pc-linux-gnu
checking host system type... rice-mavrix-elf
checking for rice-elf-ar... /usr/local/cross/rice-elf/rice-elf/bin/ar
checking for rice-elf-lipo... rice-elf-lipo
checking for rice-elf-nm...
/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/nm
checking for rice-elf-ranlib... /usr/local/cross/rice-elf/rice-elf/bin/ranlib
checking for rice-elf-strip... /usr/local/cross/rice-elf/rice-elf/bin/strip
checking whether ln -s works... yes
checking for rice-elf-gcc...
/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc
-B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/
-B/usr/local/cross/rice-elf/rice-elf/bin/
-B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem
/usr/local/cross/rice-elf/rice-elf/include -isystem
/usr/local/cross/rice-elf/rice-elf/sys-include
checking for suffix of object files... configure: error: cannot
compute suffix of object files: cannot compile
See `config.log' for more details.
make[1]: *** [configure-target-libgcc] Error 1
make[1]: Leaving directory
`/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug'
make: *** [all] Error 2

I add the script in those files just like the CRX architechture:

I check the config.log, here is error:

configure:2379: $? = 1
configure:2398:
/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc
-B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/
-B/usr/local/cross/rice-elf/rice-elf/bin/
-B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem
/usr/local/cross/rice-elf/rice-elf/include -isystem
/usr/local/cross/rice-elf/rice-elf/sys-include -o conftest -O2 -g
-gdwarf-2 -g3     conftest.c  >&5
conftest.c: In function 'main':
conftest.c:16: internal compiler error: in
compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2401: $? = 1
configure:2567: checking for suffix of object files
configure:2588:
/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc
-B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/
-B/usr/local/cross/rice-elf/rice-elf/bin/
-B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem
/usr/local/cross/rice-elf/rice-elf/include -isystem
/usr/local/cross/rice-elf/rice-elf/sys-include -c -O2 -g -gdwarf-2 -g3
   conftest.c >&5
conftest.c: In function 'main':
conftest.c:16: internal compiler error: in
compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2591: $? = 1
configure: failed program was:
| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }
configure:2605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

the config.log file is attached in the mail.

Binutils is installed into the computer(Of course it has ported onto RICE).


I search the gcc maillist, but I can't find some useful information.
Can anybody give me some advice.

Thank you very much!

[-- Attachment #2: config.log --]
[-- Type: application/octet-stream, Size: 11481 bytes --]

This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.

It was created by GNU C Runtime Library configure 1.0, which was
generated by GNU Autoconf 2.59.  Invocation command line was

  $ /home/daniel.tian/gcc_rice_dev/rice-binutils/rice-gcc-4.3.0/libgcc/configure --cache-file=./config.cache --with-cross-host=i686-pc-linux-gnu --prefix=/usr/local/cross/rice-elf --with-dwarf2 --without-headers --with-newlib --with-gnu-as --with-gnu-ld --disable-multilib --disable-libssp --enable-languages=c --program-transform-name=s,^,rice-elf-, --with-target-subdir=rice-elf --build=i686-pc-linux-gnu --host=rice-elf --target=rice-elf --srcdir=../../../rice-gcc-4.3.0/libgcc

## --------- ##
## Platform. ##
## --------- ##

hostname = gnashe
uname -m = i686
uname -r = 2.6.30-rc7-git4
uname -s = Linux
uname -v = #1 SMP Sat Jun 6 11:41:21 CST 2009

/usr/bin/uname -p = Intel(R) Pentium(R) Dual CPU E2140 @ 1.60GHz
/bin/uname -X     = unknown

/bin/arch              = unknown
/usr/bin/arch -k       = unknown
/usr/convex/getsysinfo = unknown
hostinfo               = unknown
/bin/machine           = unknown
/usr/bin/oslevel       = unknown
/bin/universe          = unknown

PATH: /opt/sde606/bin
PATH: /usr/local/bin
PATH: /usr/bin
PATH: /bin
PATH: /opt/bin
PATH: /usr/i586-pc-linux-gnu/gcc-bin/4.2.3
PATH: /usr/i686-pc-linux-gnu/gcc-bin/4.3.3
PATH: /usr/i686-pc-linux-gnu/mipsel-softfloat-linux-gnu/gcc-bin/4.3.4
PATH: /opt/blackdown-jdk-1.4.2.03/bin
PATH: /opt/blackdown-jdk-1.4.2.03/jre/bin
PATH: /usr/kde/4.2/bin
PATH: /usr/kde/3.5/bin
PATH: /usr/qt/3/bin
PATH: /usr/games/bin
PATH: /opt/bin
PATH: /opt/mips-4.3/bin
PATH: /home/daniel.tian/bin
PATH: /home/daniel.tian/monotone/bin
PATH: /home/daniel.tian/quilt/bin
PATH: /home/daniel.tian/gcc_rice_dev/gcc-rice-bin
PATH: /home/daniel.tian/bin
PATH: /usr/local/texi2html/bin
PATH: /usr/local/cross/rice-elf/bin


## ----------- ##
## Core tests. ##
## ----------- ##

configure:1198: creating cache ./config.cache
configure:1373: checking for --enable-version-specific-runtime-libs
configure:1388: result: no
configure:1420: checking for a BSD-compatible install
configure:1475: result: /usr/bin/install -c
configure:1491: checking for gawk
configure:1507: found /usr/bin/gawk
configure:1517: result: gawk
configure:1540: checking build system type
configure:1558: result: i686-pc-linux-gnu
configure:1566: checking host system type
configure:1580: result: rice-mavrix-elf
configure:1639: checking for rice-elf-ar
configure:1665: result: /usr/local/cross/rice-elf/rice-elf/bin/ar
configure:1718: checking for rice-elf-lipo
configure:1744: result: rice-elf-lipo
configure:1798: checking for rice-elf-nm
configure:1824: result: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/nm
configure:1877: checking for rice-elf-ranlib
configure:1903: result: /usr/local/cross/rice-elf/rice-elf/bin/ranlib
configure:1957: checking for rice-elf-strip
configure:1983: result: /usr/local/cross/rice-elf/rice-elf/bin/strip
configure:2034: checking whether ln -s works
configure:2038: result: yes
configure:2055: checking for rice-elf-gcc
configure:2081: result: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include
configure:2363: checking for C compiler version
configure:2366: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include --version </dev/null >&5
xgcc (GCC) 4.3.0
Copyright (C) 2008 Free Software Foundation, Inc.
This is free software; see the source for copying conditions.  There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

configure:2369: $? = 0
configure:2371: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -v </dev/null >&5
Reading specs from /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/specs
Target: rice-elf
Configured with: ../rice-gcc-4.3.0/configure --target=rice-elf --prefix=/usr/local/cross/rice-elf --enable-languages=c --with-dwarf2 --without-headers --with-newlib --with-gnu-as --with-gnu-ld --disable-multilib --disable-libssp
Thread model: single
gcc version 4.3.0 (GCC) 
configure:2374: $? = 0
configure:2376: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -V </dev/null >&5
xgcc: '-V' must come at the start of the command line
configure:2379: $? = 1
configure:2398: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -o conftest -O2 -g -gdwarf-2 -g3     conftest.c  >&5
conftest.c: In function 'main':
conftest.c:16: internal compiler error: in compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2401: $? = 1
configure:2567: checking for suffix of object files
configure:2588: /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include -c -O2 -g -gdwarf-2 -g3    conftest.c >&5
conftest.c: In function 'main':
conftest.c:16: internal compiler error: in compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984
Please submit a full bug report,
with preprocessed source if appropriate.
See <http://gcc.gnu.org/bugs.html> for instructions.
configure:2591: $? = 1
configure: failed program was:
| /* confdefs.h.  */
| 
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
| 
| int
| main ()
| {
| 
|   ;
|   return 0;
| }
configure:2605: error: cannot compute suffix of object files: cannot compile
See `config.log' for more details.

## ---------------- ##
## Cache variables. ##
## ---------------- ##

ac_cv_build=i686-pc-linux-gnu
ac_cv_build_alias=i686-pc-linux-gnu
ac_cv_env_CC_set=set
ac_cv_env_CC_value='/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include'
ac_cv_env_CFLAGS_set=set
ac_cv_env_CFLAGS_value='-O2 -g -gdwarf-2 -g3  '
ac_cv_env_CPPFLAGS_set=set
ac_cv_env_CPPFLAGS_value=
ac_cv_env_CPP_set=
ac_cv_env_CPP_value=
ac_cv_env_LDFLAGS_set=set
ac_cv_env_LDFLAGS_value=
ac_cv_env_build_alias_set=set
ac_cv_env_build_alias_value=i686-pc-linux-gnu
ac_cv_env_host_alias_set=set
ac_cv_env_host_alias_value=rice-elf
ac_cv_env_target_alias_set=set
ac_cv_env_target_alias_value=rice-elf
ac_cv_host=rice-mavrix-elf
ac_cv_host_alias=rice-elf
ac_cv_prog_AR=/usr/local/cross/rice-elf/rice-elf/bin/ar
ac_cv_prog_AWK=gawk
ac_cv_prog_CC='/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include'
ac_cv_prog_LIPO=rice-elf-lipo
ac_cv_prog_NM=/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/nm
ac_cv_prog_RANLIB=/usr/local/cross/rice-elf/rice-elf/bin/ranlib
ac_cv_prog_STRIP=/usr/local/cross/rice-elf/rice-elf/bin/strip

## ----------------- ##
## Output variables. ##
## ----------------- ##

AR='/usr/local/cross/rice-elf/rice-elf/bin/ar'
AWK='gawk'
CC='/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/ -B/usr/local/cross/rice-elf/rice-elf/bin/ -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem /usr/local/cross/rice-elf/rice-elf/include -isystem /usr/local/cross/rice-elf/rice-elf/sys-include'
CFLAGS='-O2 -g -gdwarf-2 -g3  '
CPP=''
CPPFLAGS=''
DEFS=''
ECHO_C=''
ECHO_N='-n'
ECHO_T=''
EXEEXT=''
INSTALL_DATA='/usr/bin/install -c -m 644'
INSTALL_PROGRAM='/usr/bin/install -c'
INSTALL_SCRIPT='/usr/bin/install -c'
LDFLAGS=''
LIBOBJS=''
LIBS=''
LIPO='rice-elf-lipo'
LN_S='ln -s'
LTLIBOBJS=''
NM='/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/nm'
OBJEXT=''
PACKAGE_BUGREPORT=''
PACKAGE_NAME='GNU C Runtime Library'
PACKAGE_STRING='GNU C Runtime Library 1.0'
PACKAGE_TARNAME='libgcc'
PACKAGE_VERSION='1.0'
PATH_SEPARATOR=':'
RANLIB='/usr/local/cross/rice-elf/rice-elf/bin/ranlib'
SHELL='/bin/sh'
STRIP='/usr/local/cross/rice-elf/rice-elf/bin/strip'
ac_ct_AR=''
ac_ct_CC=''
ac_ct_LIPO=''
ac_ct_NM=''
ac_ct_RANLIB=''
ac_ct_STRIP=''
asm_hidden_op=''
bindir='${exec_prefix}/bin'
build='i686-pc-linux-gnu'
build_alias='i686-pc-linux-gnu'
build_cpu='i686'
build_libsubdir='build-i686-pc-linux-gnu'
build_os='linux-gnu'
build_subdir='build-i686-pc-linux-gnu'
build_vendor='pc'
datadir='${prefix}/share'
decimal_float=''
enable_decimal_float=''
enable_shared='yes'
exec_prefix='NONE'
extra_parts=''
fixed_point=''
host='rice-mavrix-elf'
host_alias='rice-elf'
host_cpu='rice'
host_noncanonical='rice-elf'
host_os='elf'
host_subdir='.'
host_vendor='mavrix'
includedir='${prefix}/include'
infodir='${prefix}/info'
libdir='${exec_prefix}/lib'
libexecdir='${exec_prefix}/libexec'
libgcc_topdir='../../../rice-gcc-4.3.0/libgcc/..'
localstatedir='${prefix}/var'
mandir='${prefix}/man'
oldincludedir='/usr/include'
prefix='/usr/local/cross/rice-elf'
program_transform_name='s,^,rice-elf-,'
sbindir='${exec_prefix}/sbin'
set_have_cc_tls=''
sharedstatedir='${prefix}/com'
slibdir='$(exec_prefix)/$(host_noncanonical)/lib'
sysconfdir='${prefix}/etc'
target_alias='rice-elf'
target_subdir='rice-elf'
tmake_file=''
vis_hide=''

## ----------- ##
## confdefs.h. ##
## ----------- ##

#define PACKAGE_BUGREPORT ""
#define PACKAGE_NAME "GNU C Runtime Library"
#define PACKAGE_STRING "GNU C Runtime Library 1.0"
#define PACKAGE_TARNAME "libgcc"
#define PACKAGE_VERSION "1.0"

configure: exit 1

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21  9:50 Add new architechture in gcc build error daniel tian
@ 2009-09-21  9:56 ` Andrew Haley
  2009-09-21 12:07   ` daniel tian
  2009-09-21 18:49 ` Ian Lance Taylor
  1 sibling, 1 reply; 9+ messages in thread
From: Andrew Haley @ 2009-09-21  9:56 UTC (permalink / raw)
  To: daniel tian; +Cc: gcc

daniel tian wrote:

> /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc
> -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/
> -B/usr/local/cross/rice-elf/rice-elf/bin/
> -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem
> /usr/local/cross/rice-elf/rice-elf/include -isystem
> /usr/local/cross/rice-elf/rice-elf/sys-include -c -O2 -g -gdwarf-2 -g3
>    conftest.c >&5
> conftest.c: In function 'main':
> conftest.c:16: internal compiler error: in
> compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984

> 
> I search the gcc maillist, but I can't find some useful information.
> Can anybody give me some advice.

You've got to get in there with gdb and find out why compute_frame_pointer_to_fb_displacement()
is erroring.  There's no way to avoid this.

Andrew.


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21  9:56 ` Andrew Haley
@ 2009-09-21 12:07   ` daniel tian
  2009-09-21 12:59     ` sumanth
  0 siblings, 1 reply; 9+ messages in thread
From: daniel tian @ 2009-09-21 12:07 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc

>
> You've got to get in there with gdb and find out why compute_frame_pointer_to_fb_displacement()
> is erroring.  There's no way to avoid this.
>

Thank you.
But I don't know how. I mean which execute file, even I can't find the
"conftest.c" file.

Sorry for asking this simple question.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21 12:07   ` daniel tian
@ 2009-09-21 12:59     ` sumanth
  2009-09-21 13:37       ` daniel tian
  0 siblings, 1 reply; 9+ messages in thread
From: sumanth @ 2009-09-21 12:59 UTC (permalink / raw)
  To: daniel tian; +Cc: Andrew Haley, gcc

Hi ,
     Follow this wiki  " http://gcc.gnu.org/wiki/DebuggingGCC" to know 
how to debug gcc.
    
   As far as I know  compute_frame_pointer_to_fb_displacement is the 
displacement between your
    frame pointer and the frame base ( mostly stack pointer's location 
after your prologue code - depends on your architecture).
    You need to tell dwarf how much you are displacing your frame in 
order to fit in your variables and stack pushed registers of a specific 
function.
     The above mentioned explanation is my perception ( I am novice too 
in gcc). However  your error might not  be related to it.
 
The only way you can resolve your issue is by debugging gcc as per the 
link I mentioned.
Feel free to ask , if any clarifications required.
  
Thanks,
Sumanth G



daniel tian wrote:
>> You've got to get in there with gdb and find out why compute_frame_pointer_to_fb_displacement()
>> is erroring.  There's no way to avoid this.
>>
>>     
>
> Thank you.
> But I don't know how. I mean which execute file, even I can't find the
> "conftest.c" file.
>
> Sorry for asking this simple question.
>
>
>   


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21 12:59     ` sumanth
@ 2009-09-21 13:37       ` daniel tian
  2009-09-21 14:19         ` Andrew Haley
  0 siblings, 1 reply; 9+ messages in thread
From: daniel tian @ 2009-09-21 13:37 UTC (permalink / raw)
  To: sumanth; +Cc: gcc

2009/9/21 sumanth <sumanth.gundapneni@redpinesignals.com>:
> Hi ,
>    Follow this wiki  " http://gcc.gnu.org/wiki/DebuggingGCC" to know how to
> debug gcc.
>    As far as I know  compute_frame_pointer_to_fb_displacement is the
> displacement between your
>   frame pointer and the frame base ( mostly stack pointer's location after
> your prologue code - depends on your architecture).
>   You need to tell dwarf how much you are displacing your frame in order to
> fit in your variables and stack pushed registers of a specific function.
>    The above mentioned explanation is my perception ( I am novice too in
> gcc). However  your error might not  be related to it.
>
> The only way you can resolve your issue is by debugging gcc as per the link
> I mentioned.
> Feel free to ask , if any clarifications required.
>  Thanks,
> Sumanth G
>
>

Thank you very much.
I will look into it.  I need to figure out where the "conftest.c" is.
I mean I know how to use the gdb or insight.
But I wonder which execute file I need to run, is the "cc1"?
and to compile the "conftest.c" file with "cc1"?

Any advice is appreciated.

Does everyone port the gcc to a new target alway encounter this
problem, or just the luck hits on me?

Thanks.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21 13:37       ` daniel tian
@ 2009-09-21 14:19         ` Andrew Haley
  2009-09-21 14:31           ` daniel tian
  0 siblings, 1 reply; 9+ messages in thread
From: Andrew Haley @ 2009-09-21 14:19 UTC (permalink / raw)
  To: daniel tian; +Cc: gcc

daniel tian wrote:
> 2009/9/21 sumanth <sumanth.gundapneni@redpinesignals.com>:
>> Hi ,
>>    Follow this wiki  " http://gcc.gnu.org/wiki/DebuggingGCC" to know how to
>> debug gcc.
>>    As far as I know  compute_frame_pointer_to_fb_displacement is the
>> displacement between your
>>   frame pointer and the frame base ( mostly stack pointer's location after
>> your prologue code - depends on your architecture).
>>   You need to tell dwarf how much you are displacing your frame in order to
>> fit in your variables and stack pushed registers of a specific function.
>>    The above mentioned explanation is my perception ( I am novice too in
>> gcc). However  your error might not  be related to it.
>>
>> The only way you can resolve your issue is by debugging gcc as per the link
>> I mentioned.
> 
> Thank you very much.
> I will look into it.  I need to figure out where the "conftest.c" is.

It's in the first message you sent:

| /* confdefs.h.  */
|
| #define PACKAGE_NAME "GNU C Runtime Library"
| #define PACKAGE_TARNAME "libgcc"
| #define PACKAGE_VERSION "1.0"
| #define PACKAGE_STRING "GNU C Runtime Library 1.0"
| #define PACKAGE_BUGREPORT ""
| /* end confdefs.h.  */
|
| int
| main ()
| {
|
|   ;
|   return 0;
| }

> I mean I know how to use the gdb or insight.
> But I wonder which execute file I need to run, is the "cc1"?
> and to compile the "conftest.c" file with "cc1"?

Yes.

> Any advice is appreciated.
> 
> Does everyone port the gcc to a new target alway encounter this
> problem, or just the luck hits on me?

It happens to everyone.

Andrew.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21 14:19         ` Andrew Haley
@ 2009-09-21 14:31           ` daniel tian
  0 siblings, 0 replies; 9+ messages in thread
From: daniel tian @ 2009-09-21 14:31 UTC (permalink / raw)
  To: Andrew Haley; +Cc: gcc

2009/9/21 Andrew Haley <aph@redhat.com>:
> daniel tian wrote:
>> 2009/9/21 sumanth <sumanth.gundapneni@redpinesignals.com>:
>>> Hi ,
>>>    Follow this wiki  " http://gcc.gnu.org/wiki/DebuggingGCC" to know how to
>>> debug gcc.
>>>    As far as I know  compute_frame_pointer_to_fb_displacement is the
>>> displacement between your
>>>   frame pointer and the frame base ( mostly stack pointer's location after
>>> your prologue code - depends on your architecture).
>>>   You need to tell dwarf how much you are displacing your frame in order to
>>> fit in your variables and stack pushed registers of a specific function.
>>>    The above mentioned explanation is my perception ( I am novice too in
>>> gcc). However  your error might not  be related to it.
>>>
>>> The only way you can resolve your issue is by debugging gcc as per the link
>>> I mentioned.
>>
>> Thank you very much.
>> I will look into it.  I need to figure out where the "conftest.c" is.
>
> It's in the first message you sent:
>
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> | #define PACKAGE_VERSION "1.0"
> | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
> | #define PACKAGE_BUGREPORT ""
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }
>
>> I mean I know how to use the gdb or insight.
>> But I wonder which execute file I need to run, is the "cc1"?
>> and to compile the "conftest.c" file with "cc1"?
>
> Yes.
>

Thanks.
So it is the simplest program.  I will find the problem..

Thank you again.

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21  9:50 Add new architechture in gcc build error daniel tian
  2009-09-21  9:56 ` Andrew Haley
@ 2009-09-21 18:49 ` Ian Lance Taylor
  2009-09-23 10:45   ` daniel tian
  1 sibling, 1 reply; 9+ messages in thread
From: Ian Lance Taylor @ 2009-09-21 18:49 UTC (permalink / raw)
  To: daniel tian; +Cc: gcc

daniel tian <daniel.xntian@gmail.com> writes:

>    I have already finished CPU port named RICE.  The previous version
> I did is on gcc 4.0.2. it can be compiled.  Now I wanna move it to
> v4.3.0.  I added the config script just as the CRX architechture.

> configure:2379: $? = 1
> configure:2398:
> /home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/xgcc
> -B/home/daniel.tian/gcc_rice_dev/rice-binutils/build-gcc-debug/./gcc/
> -B/usr/local/cross/rice-elf/rice-elf/bin/
> -B/usr/local/cross/rice-elf/rice-elf/lib/ -isystem
> /usr/local/cross/rice-elf/rice-elf/include -isystem
> /usr/local/cross/rice-elf/rice-elf/sys-include -o conftest -O2 -g
> -gdwarf-2 -g3     conftest.c  >&5
> conftest.c: In function 'main':
> conftest.c:16: internal compiler error: in
> compute_frame_pointer_to_fb_displacement, at dwarf2out.c:10984
> Please submit a full bug report,
> with preprocessed source if appropriate.
> See <http://gcc.gnu.org/bugs.html> for instructions.

This is the error.


> configure: failed program was:
> | /* confdefs.h.  */
> |
> | #define PACKAGE_NAME "GNU C Runtime Library"
> | #define PACKAGE_TARNAME "libgcc"
> | #define PACKAGE_VERSION "1.0"
> | #define PACKAGE_STRING "GNU C Runtime Library 1.0"
> | #define PACKAGE_BUGREPORT ""
> | /* end confdefs.h.  */
> |
> | int
> | main ()
> | {
> |
> |   ;
> |   return 0;
> | }

This is the failed program.

That should give you all you need to recreate the problem.

Now you need to fire up the debugger and take a look at the failure.  It
has something to do with unexpected behaviour in your backend register
elimination.  It's pretty hard to say anything else about it with the
information you provided.

Ian

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: Add new architechture in gcc build error
  2009-09-21 18:49 ` Ian Lance Taylor
@ 2009-09-23 10:45   ` daniel tian
  0 siblings, 0 replies; 9+ messages in thread
From: daniel tian @ 2009-09-23 10:45 UTC (permalink / raw)
  To: Ian Lance Taylor; +Cc: gcc

Thank you. I fixed the error. it caused by macro:
#define ELIMINABLE_REGS \
{\

 {ARG_POINTER_REGNUM,	     FRAME_POINTER_REGNUM}, \
 {ARG_POINTER_REGNUM,	     STACK_POINTER_REGNUM}, \
 {FRAME_POINTER_REGNUM,	     STACK_POINTER_REGNUM} \
}

because everytime when gcc check the frame_pointer_need, if it is
false, aim eliminated register is SP.
But in the former array, gcc still got FP. So error accurred.

Now it is OK with the following:
#define ELIMINABLE_REGS \
{\
 {ARG_POINTER_REGNUM,	     STACK_POINTER_REGNUM}, \
 {ARG_POINTER_REGNUM,	     FRAME_POINTER_REGNUM}, \
 {FRAME_POINTER_REGNUM,	     STACK_POINTER_REGNUM} \
}
just exchange the former two elements.

So thanks for your guys.

^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2009-09-23 10:45 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-21  9:50 Add new architechture in gcc build error daniel tian
2009-09-21  9:56 ` Andrew Haley
2009-09-21 12:07   ` daniel tian
2009-09-21 12:59     ` sumanth
2009-09-21 13:37       ` daniel tian
2009-09-21 14:19         ` Andrew Haley
2009-09-21 14:31           ` daniel tian
2009-09-21 18:49 ` Ian Lance Taylor
2009-09-23 10:45   ` daniel tian

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).