public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* [crosstool-ng-1.6.0] mips64-octeon-linux-gnu
@ 2010-02-20  6:35 Zhuang Yuyao
  2010-02-20 18:59 ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Zhuang Yuyao @ 2010-02-20  6:35 UTC (permalink / raw)
  To: crossgcc

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

Hi,

I am trying to compile a mips64 cross toolchain. the attached file
ctng.1.6.0.mips64.patch contains some patches I made to crosstool-ng
1.6.0. the build process finished successfully with this patch, but
while compiling some source codes, mips64-octeon-linux-gnu-ld failed
with the following message:
......
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-gcc
-I../ -I../..  -g -O2 -o cf-parse.tab.o -c cf-parse.tab.c
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-gcc
-I../ -I../..  -g -O2 -o cf-lex.o -c cf-lex.c
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-gcc
-I../ -I../..  -g -O2 -o conf.o -c conf.c
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-ld
-r -o all.o cf-parse.tab.o cf-lex.o conf.o
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
cf-parse.tab.o: ABI is incompatible with that of the selected
emulation
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
failed to merge target specific data of file cf-parse.tab.o
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
cf-lex.o: ABI is incompatible with that of the selected emulation
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
failed to merge target specific data of file cf-lex.o
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
conf.o: ABI is incompatible with that of the selected emulation
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
failed to merge target specific data of file conf.o
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
BFD (GNU Binutils) 2.19.1 assertion fail
/root/ctng-1.6.0/mips64-octeon-linux-gnu/targets/src/binutils-2.19.1/bfd/elflink.c:10117
......
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
Attempt to do relocatable link with elf64-tradbigmips input and
elf32-ntradbigmips output
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
final link failed: File in wrong format


#/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-ld
--help
....
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
supported targets: elf32-ntradbigmips elf32-ntradlittlemips
elf32-tradbigmips elf32-tradlittlemips elf64-tradbigmips
elf64-tradlittlemips elf64-little elf64-big elf32-little elf32-big
srec symbolsrec tekhex binary ihex
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
supported emulations: elf32btsmipn32 elf32ltsmipn32 elf32btsmip
elf32ltsmip elf64btsmip elf64ltsmip
/opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/.mips64-octeon-linux-gnu-ld:
emulation specific options:
elf32btsmipn32:
....

as you can see, the 'emulation specific options' is elf32btsmipn32 but
i think it should be elf64btsmip.

the ctng config file for mips64-octeon-linux-gnu is also attached to this mail.

my host:
#uname -a
Linux R710 2.6.30-2-686 #1 SMP Sat Sep 26 01:16:22 UTC 2009 i686 GNU/Linux

#gcc --version
gcc (Debian 4.4.2-9) 4.4.3 20100108 (prerelease)
Copyright (C) 2009 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.

my question is:
1) mips64 is not supported by crosstool-ng 1.6.0, why?
2) how can i change the emulation specific options of
mips64-octeon-linux-gnu-ld to elf64btsmip?

sorry for bad english, any help will be appreciated.

Thanks very much.


Zhuang Yuyao

[-- Attachment #2: ctng.1.6.0.mips64.patch --]
[-- Type: application/octet-stream, Size: 1079 bytes --]

--- crosstool-ng-1.6.0/scripts/build/arch/mips.sh.orig	2010-02-20 00:55:55.000000000 -0500
+++ crosstool-ng-1.6.0/scripts/build/arch/mips.sh	2010-02-20 00:56:13.000000000 -0500
@@ -1,8 +1,13 @@
 # Compute IA-64-specific values
 
 CT_DoArchTupleValues() {
-    # The architecture part of the tuple:
-    CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
+    # The architecture part of the tuple, override only for 64-bit
+    if [ "${CT_ARCH_64}" = "y" ]; then
+        CT_TARGET_ARCH="mips64${target_endian_el}"
+    else
+        # The architecture part of the tuple:
+        CT_TARGET_ARCH="${CT_ARCH}${target_endian_el}"
+    fi
 
     # Override CFLAGS for endianness:
     case "${CT_ARCH_BE},${CT_ARCH_LE}" in
--- crosstool-ng-1.6.0/config/arch/mips.in.orig	2010-02-20 00:58:34.000000000 -0500
+++ crosstool-ng-1.6.0/config/arch/mips.in	2010-02-20 00:58:29.000000000 -0500
@@ -2,6 +2,7 @@
 
 config ARCH_mips
     select ARCH_SUPPORTS_32
+    select ARCH_SUPPORTS_64 if EXPERIMENTAL
     select ARCH_DEFAULT_32
     select ARCH_USE_MMU
     select ARCH_SUPPORTS_BOTH_ENDIAN

[-- Attachment #3: config-mips64-octeon-linux-gnu --]
[-- Type: application/octet-stream, Size: 8927 bytes --]

#
# Automatically generated make config: don't edit
# crosstool-NG version: 1.6.0
# Thu Feb 18 22:53:45 2010
#

#
# Paths and misc options
#

#
# crosstool-NG behavior
#
# CT_OBSOLETE is not set
CT_EXPERIMENTAL=y
# CT_DEBUG_CT is not set

#
# Paths
#
CT_LOCAL_TARBALLS_DIR="/opt/netone/dl"
CT_SAVE_TARBALLS=y
CT_WORK_DIR="${CT_TOP_DIR}/targets"
CT_PREFIX_DIR="${HOME}/x-tools/${CT_TARGET}"
CT_INSTALL_DIR="${CT_PREFIX_DIR}"
CT_REMOVE_DOCS=y
CT_INSTALL_DIR_RO=y

#
# Downloading
#
# CT_FORBID_DOWNLOAD is not set
# CT_FORCE_DOWNLOAD is not set
CT_USE_MIRROR=y
# CT_PREFER_MIRROR is not set
CT_MIRROR_BASE_URL="http://ymorin.is-a-geek.org/mirrors/"
CT_CONNECT_TIMEOUT=10
CT_DOWNLOAD_MAX_CHUNKS=5
# CT_ONLY_DOWNLOAD is not set

#
# Extracting
#
# CT_FORCE_EXTRACT is not set
CT_OVERIDE_CONFIG_GUESS_SUB=y
# CT_ONLY_EXTRACT is not set
CT_PATCH_BUNDLED=y
# CT_PATCH_LOCAL is not set
# CT_PATCH_BUNDLED_LOCAL is not set
# CT_PATCH_LOCAL_BUNDLED is not set
# CT_PATCH_BUNDLED_FALLBACK_LOCAL is not set
# CT_PATCH_LOCAL_FALLBACK_BUNDLED is not set
# CT_PATCH_NONE is not set
CT_PATCH_ORDER="bundled"
# CT_PATCH_SINGLE is not set
# CT_PATCH_USE_LOCAL is not set

#
# Build behavior
#
CT_PARALLEL_JOBS=1
CT_LOAD=0
CT_USE_PIPES=y
# CT_CONFIG_SHELL_SH is not set
# CT_CONFIG_SHELL_ASH is not set
CT_CONFIG_SHELL_BASH=y
# CT_CONFIG_SHELL_CUSTOM is not set
CT_CONFIG_SHELL="bash"

#
# Logging
#
# CT_LOG_ERROR is not set
# CT_LOG_WARN is not set
# CT_LOG_INFO is not set
CT_LOG_EXTRA=y
# CT_LOG_DEBUG is not set
# CT_LOG_ALL is not set
CT_LOG_LEVEL_MAX="EXTRA"
# CT_LOG_SEE_TOOLS_WARN is not set
CT_LOG_PROGRESS_BAR=y
CT_LOG_TO_FILE=y
CT_LOG_FILE_COMPRESS=y

#
# Target options
#
CT_ARCH="mips"
# CT_ARCH_SUPPORTS_BOTH_MMU is not set
CT_ARCH_SUPPORTS_BOTH_ENDIAN=y
CT_ARCH_SUPPORTS_32=y
CT_ARCH_SUPPORTS_64=y
CT_ARCH_SUPPORT_ARCH=y
CT_ARCH_SUPPORT_ABI=y
# CT_ARCH_SUPPORT_CPU is not set
CT_ARCH_SUPPORT_TUNE=y
# CT_ARCH_SUPPORT_FPU is not set
# CT_ARCH_DEFAULT_HAS_MMU is not set
CT_ARCH_DEFAULT_BE=y
# CT_ARCH_DEFAULT_LE is not set
CT_ARCH_DEFAULT_32=y
# CT_ARCH_DEFAULT_64 is not set
CT_ARCH_ARCH="octeon"
CT_ARCH_ABI="64"
CT_ARCH_TUNE="octeon"
CT_ARCH_BE=y
# CT_ARCH_LE is not set
# CT_ARCH_32 is not set
CT_ARCH_64=y
CT_ARCH_BITNESS=64
CT_ARCH_FLOAT_HW=y
# CT_ARCH_FLOAT_SW is not set
CT_TARGET_CFLAGS=""
CT_TARGET_LDFLAGS=""

#
# General target options
#
# CT_ARCH_alpha is not set
# CT_ARCH_arm is not set
# CT_ARCH_avr32 is not set
# CT_ARCH_ia64 is not set
# CT_ARCH_m68k is not set
CT_ARCH_mips=y
# CT_ARCH_powerpc is not set
# CT_ARCH_s390 is not set
# CT_ARCH_sh is not set
# CT_ARCH_x86 is not set
CT_ARCH_USE_MMU=y

#
# Target optimisations
#

#
# Toolchain options
#

#
# General toolchain options
#
CT_USE_SYSROOT=y
CT_SYSROOT_DIR_PREFIX=""

#
# Tuple completion and aliasing
#
CT_TARGET_VENDOR="octeon"
CT_TARGET_ALIAS_SED_EXPR=""
CT_TARGET_ALIAS=""

#
# Toolchain type
#
# CT_NATIVE is not set
CT_CROSS=y
# CT_CROSS_NATIVE is not set
# CT_CANADIAN is not set
CT_TOOLCHAIN_TYPE="cross"

#
# Build system
#
CT_BUILD=""
CT_BUILD_PREFIX=""
CT_BUILD_SUFFIX=""

#
# Operating System
#
# CT_BARE_METAL is not set
CT_KERNEL_SUPPORTS_SHARED_LIBS=y
CT_KERNEL="linux"
CT_KERNEL_VERSION="2.6.27.45"
# CT_KERNEL_bare_metal is not set
CT_KERNEL_linux=y
CT_KERNEL_LINUX_INSTALL=y
CT_KERNEL_LINUX_INSTALL_CHECK=y
# CT_KERNEL_V_2_6_32_7 is not set
# CT_KERNEL_V_2_6_32_6 is not set
# CT_KERNEL_V_2_6_32_5 is not set
# CT_KERNEL_V_2_6_32_4 is not set
# CT_KERNEL_V_2_6_32_3 is not set
# CT_KERNEL_V_2_6_32_2 is not set
# CT_KERNEL_V_2_6_32_1 is not set
# CT_KERNEL_V_2_6_32 is not set
# CT_KERNEL_V_2_6_31_12 is not set
# CT_KERNEL_V_2_6_30_10 is not set
# CT_KERNEL_V_2_6_29_6 is not set
# CT_KERNEL_V_2_6_28_10 is not set
CT_KERNEL_V_2_6_27_45=y
CT_KERNEL_LINUX_VERBOSITY_0=y
# CT_KERNEL_LINUX_VERBOSITY_1 is not set
# CT_KERNEL_LINUX_VERBOSITY_2 is not set
CT_KERNEL_LINUX_VERBOSE_LEVEL=0
# CT_KERNEL_LINUX_USE_CUSTOM_HEADERS is not set

#
# Common kernel options
#
CT_SHARED_LIBS=y

#
# Binary utilities
#
CT_ARCH_BINFMT_ELF=y
# CT_ARCH_BINFMT_FLAT is not set

#
# GNU binutils
#
# CT_BINUTILS_V_2_20 is not set
CT_BINUTILS_V_2_19_1=y
# CT_BINUTILS_V_2_19 is not set
# CT_BINUTILS_V_2_18 is not set
# CT_BINUTILS_V_2_17 is not set
# CT_BINUTILS_V_2_16_1 is not set
CT_BINUTILS_VERSION="2.19.1"
CT_BINUTILS_EXTRA_CONFIG="--enable-64-bit-bfd"
CT_BINUTILS_FOR_TARGET=y
CT_BINUTILS_FOR_TARGET_IBERTY=y
CT_BINUTILS_FOR_TARGET_BFD=y

#
# C compiler
#
CT_CC="gcc"
CT_CC_VERSION="4.4.3"
CT_CC_gcc=y
CT_CC_V_4_4_3=y
# CT_CC_V_4_4_2 is not set
# CT_CC_V_4_4_1 is not set
# CT_CC_V_4_4_0 is not set
# CT_CC_V_4_3_4 is not set
# CT_CC_V_4_3_3 is not set
# CT_CC_V_4_3_2 is not set
# CT_CC_V_4_3_1 is not set
# CT_CC_V_4_2_4 is not set
# CT_CC_V_4_2_3 is not set
# CT_CC_V_4_2_2 is not set
# CT_CC_V_4_2_1 is not set
# CT_CC_V_4_2_0 is not set
# CT_CC_V_4_1_2 is not set
# CT_CC_V_4_0_4 is not set
# CT_CC_V_3_4_6 is not set
CT_CC_GCC_4_3_or_later=y
CT_CC_GCC_4_4_or_later=y
CT_CC_CXA_ATEXIT=y
CT_CC_SJLJ_EXCEPTIONS_CONFIGURE=y
# CT_CC_SJLJ_EXCEPTIONS_USE is not set
# CT_CC_SJLJ_EXCEPTIONS_DONT_USE is not set
CT_CC_ENABLE_CXX_FLAGS=""
CT_CC_CORE_EXTRA_CONFIG=""
CT_CC_EXTRA_CONFIG=""
CT_CC_PKGVERSION="crosstool-ng-${CT_VERSION}"
CT_CC_BUGURL=""
CT_CC_SUPPORT_CXX=y
CT_CC_SUPPORT_FORTRAN=y
CT_CC_SUPPORT_JAVA=y
CT_CC_SUPPORT_ADA=y
CT_CC_SUPPORT_OBJC=y
CT_CC_SUPPORT_OBJCXX=y

#
# Additional supported languages:
#
CT_CC_LANG_CXX=y
# CT_CC_LANG_FORTRAN is not set
# CT_CC_LANG_JAVA is not set
# CT_CC_LANG_ADA is not set
# CT_CC_LANG_OBJC is not set
# CT_CC_LANG_OBJCXX is not set
CT_CC_LANG_OTHERS=""

#
# C-library
#
CT_LIBC="glibc"
CT_LIBC_VERSION="2.9"
# CT_LIBC_eglibc is not set
CT_LIBC_glibc=y
# CT_LIBC_newlib is not set
# CT_LIBC_none is not set
# CT_LIBC_uClibc is not set
CT_LIBC_GLIBC_TARBALL=y
# CT_LIBC_GLIBC_V_2_11_1 is not set
# CT_LIBC_GLIBC_V_2_11 is not set
# CT_LIBC_V_2_10_1 is not set
CT_LIBC_V_2_9=y
# CT_LIBC_V_2_8 is not set
# CT_LIBC_V_2_7 is not set
# CT_LIBC_V_2_6_1 is not set
# CT_LIBC_V_2_6 is not set
# CT_LIBC_V_2_5_1 is not set
# CT_LIBC_V_2_5 is not set
# CT_LIBC_V_2_3_6 is not set

#
# glibc/eglibc common options
#
CT_LIBC_GLIBC_EXTRA_CONFIG=""
CT_LIBC_GLIBC_CONFIGPARMS=""
CT_LIBC_GLIBC_EXTRA_CFLAGS=""
CT_LIBC_EXTRA_CC_ARGS=""
CT_LIBC_GLIBC_USE_PORTS=y
CT_LIBC_ADDONS_LIST=""

#
# WARNING !!!                                            
#

#
#   For glibc >= 2.8, it can happen that the tarballs    
#

#
#   for the addons are not available for download.       
#

#
#   If that happens, bad luck... Try a previous version  
#

#
#   or try again later... :-(                            
#
# CT_LIBC_GLIBC_KERNEL_VERSION_NONE is not set
CT_LIBC_GLIBC_KERNEL_VERSION_AS_HEADERS=y
# CT_LIBC_GLIBC_KERNEL_VERSION_CHOSEN is not set
CT_LIBC_GLIBC_MIN_KERNEL="2.6.27.45"
CT_LIBC_SUPPORT_NPTL=y
CT_LIBC_SUPPORT_LINUXTHREADS=y
CT_THREADS="nptl"

#
# Common C library options
#
CT_THREADS_NPTL=y
# CT_THREADS_LINUXTHREADS is not set
# CT_THREADS_NONE is not set

#
# Debug facilities
#
CT_DEBUG_dmalloc=y
CT_DMALLOC_V_5_5_2=y
CT_DMALLOC_VERSION="5.5.2"
CT_DEBUG_duma=y
CT_DUMA_A=y
CT_DUMA_SO=y
CT_DUMA_V_2_5_15=y
# CT_DUMA_V_2_5_14 is not set
# CT_DUMA_V_2_5_12 is not set
# CT_DUMA_V_2_5_8 is not set
# CT_DUMA_V_2_5_1 is not set
CT_DUMA_VERSION="2_5_15"
CT_DEBUG_gdb=y
CT_GDB_CROSS=y
# CT_GDB_CROSS_STATIC is not set
# CT_GDB_CROSS_INSIGHT is not set
CT_GDB_NATIVE=y
# CT_GDB_NATIVE_STATIC is not set
CT_GDB_NATIVE_USE_GMP_MPFR=y
CT_GDB_GDBSERVER=y
CT_GDB_GDBSERVER_STATIC=y
# CT_GDB_V_7_0_1 is not set
# CT_GDB_V_7_0 is not set
CT_GDB_V_6_8=y
# CT_GDB_V_snapshot is not set
CT_GDB_VERSION="6.8"
# CT_DEBUG_ltrace is not set
CT_DEBUG_strace=y
# CT_STRACE_V_4_5_19 is not set
CT_STRACE_V_4_5_18=y
# CT_STRACE_V_4_5_17 is not set
# CT_STRACE_V_4_5_16 is not set
# CT_STRACE_V_4_5_15 is not set
CT_STRACE_VERSION="4.5.18"

#
# Tools facilities
#
# CT_TOOL_libelf is not set
CT_TOOL_sstrip=y
CT_SSTRIP_BUILDROOT=y
# CT_SSTRIP_ELFKICKERS is not set
CT_SSTRIP_FROM="buildroot"

#
# Companion libraries
#
CT_WRAPPER_NEEDED=y
CT_GMP_MPFR=y
CT_GMP_V_4_3_1=y
# CT_GMP_V_4_3_0 is not set
# CT_GMP_V_4_2_4 is not set
# CT_GMP_V_4_2_2 is not set
CT_GMP_VERSION="4.3.1"
CT_MPFR_V_2_4_2=y
# CT_MPFR_V_2_4_1 is not set
# CT_MPFR_V_2_4_0 is not set
# CT_MPFR_V_2_3_2 is not set
# CT_MPFR_V_2_3_1 is not set
CT_MPFR_VERSION="2.4.2"
CT_PPL_CLOOG_MPC=y
CT_PPL_V_0_10_2=y
CT_PPL_VERSION="0.10.2"
CT_CLOOG_V_0_15_7=y
# CT_CLOOG_V_0_15_6 is not set
# CT_CLOOG_V_0_15_5 is not set
# CT_CLOOG_V_0_15_4 is not set
# CT_CLOOG_V_0_15_3 is not set
CT_CLOOG_VERSION="0.15.7"
CT_MPC_V_0_8_1=y
# CT_MPC_V_0_7 is not set
# CT_MPC_V_0_6 is not set
CT_MPC_VERSION="0.8.1"

#
# Companion libraries common options
#
# CT_COMP_LIBS_CHECK is not set
CT_COMP_LIBS_TARGET=y
CT_TOOLS_WRAPPER_SCRIPT=y
# CT_TOOLS_WRAPPER_EXEC is not set
CT_TOOLS_WRAPPER="script"

#
# Companion tools
#

#
# READ HELP before you say 'Y' below !!!
#
# CT_COMP_TOOLS is not set

[-- Attachment #4: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng-1.6.0] mips64-octeon-linux-gnu
  2010-02-20  6:35 [crosstool-ng-1.6.0] mips64-octeon-linux-gnu Zhuang Yuyao
@ 2010-02-20 18:59 ` Yann E. MORIN
  2010-02-21 14:53   ` Zhuang Yuyao
  0 siblings, 1 reply; 4+ messages in thread
From: Yann E. MORIN @ 2010-02-20 18:59 UTC (permalink / raw)
  To: crossgcc; +Cc: Zhuang Yuyao

Hello Zhuang, All!

On Saturday 20 February 2010 07:35:02 Zhuang Yuyao wrote:
> I am trying to compile a mips64 cross toolchain. the attached file
> ctng.1.6.0.mips64.patch contains some patches I made to crosstool-ng
> 1.6.0.

Cool! It will be nice to have mips64 in crosstool-NG once this issue is
solved! :-)

> the build process finished successfully with this patch,

I built the same toolchian using your patch and your .config.

> but  
> while compiling some source codes, mips64-octeon-linux-gnu-ld failed
> with the following message:
> ......
> /opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-gcc

This path looks like an /old/ installation of a toolchain built with the
original crosstool. Could you check that you do not have an old toolchain
in your PATH ?

Anyway, I can reproduce the issue here as well. But as I'm no MIPS64 expert,
I do not have a clue on how to solve it.

[--SNIP--]
> as you can see, the 'emulation specific options' is elf32btsmipn32 but
> i think it should be elf64btsmip.

It looks to me that binutils *might* be the culprit here.

> my question is:
> 1) mips64 is not supported by crosstool-ng 1.6.0, why?

Because you are the first one to need it! :-)

> 2) how can i change the emulation specific options of
> mips64-octeon-linux-gnu-ld to elf64btsmip?

Look at the binutils configury stuff, maybe there is an issue in there.
buildroot seems to have MIPS64 support. Maybe you could look at how they
build their toolchain? Also, try to google for the issue.

I am a bit short on time to investigate myself, sorry I can't help too
much... :-/

> sorry for bad english,

Well, I have read english far worse than yours! :-) And I'm not a native
english spaeker either!

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng-1.6.0] mips64-octeon-linux-gnu
  2010-02-20 18:59 ` Yann E. MORIN
@ 2010-02-21 14:53   ` Zhuang Yuyao
  2010-02-22  9:41     ` Yann E. MORIN
  0 siblings, 1 reply; 4+ messages in thread
From: Zhuang Yuyao @ 2010-02-21 14:53 UTC (permalink / raw)
  To: Yann E. MORIN; +Cc: crossgcc

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

check the patch attached to this mail.

put this patch into
/usr/local/lib/ct-ng-1.6.0/patches/binutils/2.19.1, recompile the
toolchain, the ld will work just as i wished.
the patch also works for binutils-2.20.

for those who do not want to apply this patch, take a look at
http://ftp.gnu.org/old-gnu/Manuals/binutils-2.12/html_node/binutils_20.html,
the emulation can be selected at runtime.

On Sun, Feb 21, 2010 at 2:59 AM, Yann E. MORIN
<yann.morin.1998@anciens.enib.fr> wrote:
> Hello Zhuang, All!
>
> On Saturday 20 February 2010 07:35:02 Zhuang Yuyao wrote:
>> I am trying to compile a mips64 cross toolchain. the attached file
>> ctng.1.6.0.mips64.patch contains some patches I made to crosstool-ng
>> 1.6.0.
>
> Cool! It will be nice to have mips64 in crosstool-NG once this issue is
> solved! :-)
>

I've used this toolchain to compile more than 130 different programs,
including linux kernel 2.6.31, it works just fine for me. i will be
glad to see more people use it on their own platforms and report that
it is ok.

>> ......
>> /opt/crosstool/gcc-4.4.3-glibc-2.9/mips64-octeon-linux-gnu/bin/mips64-octeon-linux-gnu-gcc
>
> This path looks like an /old/ installation of a toolchain built with the
> original crosstool. Could you check that you do not have an old toolchain
> in your PATH ?
>

the path does not matter, i just copied the toolchain from x-tools to
this location.

Zhuang Yuyao

[-- Attachment #2: 190-mips64-defaultemul.patch --]
[-- Type: application/octet-stream, Size: 1062 bytes --]

--- binutils-2.20/ld/configure.tgt.orig	2010-02-20 04:05:31.000000000 -0500
+++ binutils-2.20/ld/configure.tgt	2010-02-20 04:08:11.000000000 -0500
@@ -400,11 +400,11 @@
 mips*-*-vxworks*)	targ_emul=elf32ebmipvxworks
 		        targ_extra_emuls="elf32elmipvxworks" ;;
 mips*-*-windiss)	targ_emul=elf32mipswindiss ;;
-mips64*el-*-linux-*)	targ_emul=elf32ltsmipn32
-			targ_extra_emuls="elf32btsmipn32 elf32ltsmip elf32btsmip elf64ltsmip elf64btsmip"
+mips64*el-*-linux-*)	targ_emul=elf64ltsmip
+			targ_extra_emuls="elf32ltsmipn32 elf32btsmipn32 elf32ltsmip elf32btsmip elf64btsmip"
 			targ_extra_libpath=$targ_extra_emuls ;;
-mips64*-*-linux-*)	targ_emul=elf32btsmipn32
-			targ_extra_emuls="elf32ltsmipn32 elf32btsmip elf32ltsmip elf64btsmip elf64ltsmip"
+mips64*-*-linux-*)	targ_emul=elf64btsmip
+			targ_extra_emuls="elf32btsmipn32 elf32ltsmipn32 elf32btsmip elf32ltsmip elf64ltsmip"
 			targ_extra_libpath=$targ_extra_emuls ;;
 mips*el-*-linux-*)	targ_emul=elf32ltsmip
 			targ_extra_emuls="elf32btsmip elf32ltsmipn32 elf64ltsmip elf32btsmipn32 elf64btsmip"

[-- Attachment #3: Type: text/plain, Size: 71 bytes --]

--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

* Re: [crosstool-ng-1.6.0] mips64-octeon-linux-gnu
  2010-02-21 14:53   ` Zhuang Yuyao
@ 2010-02-22  9:41     ` Yann E. MORIN
  0 siblings, 0 replies; 4+ messages in thread
From: Yann E. MORIN @ 2010-02-22  9:41 UTC (permalink / raw)
  To: Zhuang Yuyao; +Cc: crossgcc

Hello Zhuang, All!

(Sorry for duplicate mail, forgot to CC: the list).

On Sunday 21 February 2010 15:53:39 you wrote:
> check the patch attached to this mail.
> put this patch into
> /usr/local/lib/ct-ng-1.6.0/patches/binutils/2.19.1, recompile the
> toolchain, the ld will work just as i wished.
> the patch also works for binutils-2.20.

Nice! Thank you! Patch added both to 2.19.1 and 2.20.

> I've used this toolchain to compile more than 130 different programs,
> including linux kernel 2.6.31, it works just fine for me. i will be
> glad to see more people use it on their own platforms and report that
> it is ok.

I pushed your mips64 support upstream. Thank you!

> > This path looks like an /old/ installation of a toolchain built with the
> > original crosstool. Could you check that you do not have an old toolchain
> > in your PATH ?
> the path does not matter, i just copied the toolchain from x-tools to
> this location.

OK. Not an issue, then.

Regards,
Yann E. MORIN.

-- 
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
`------------------------------^-------^------------------^--------------------'



--
For unsubscribe information see http://sourceware.org/lists.html#faq

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

end of thread, other threads:[~2010-02-22  9:41 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-02-20  6:35 [crosstool-ng-1.6.0] mips64-octeon-linux-gnu Zhuang Yuyao
2010-02-20 18:59 ` Yann E. MORIN
2010-02-21 14:53   ` Zhuang Yuyao
2010-02-22  9:41     ` Yann E. MORIN

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).