This is the mail archive of the crossgcc@sourceware.org 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]

[CT_NG] Cross-compiler for Alpha architecture


Dear all,

After having sent a private mail to Yann Morin asking him about Alpha support in crosstool-ng (and some directions he sent back), I started adding support for it in the last version of the tool in the trunk (12-06-2008).

Attached you can find a patch, which should be applied to the code that you will check-out from the trunk. It adds sub-menus to select the Alpha architecture and a specific model (EV4, EV5, EV56, etc. The list in the patch is not complete, however).

I have tried quite a few combinations of binutils/gcc/glibc/kernel versions (all for an Alpha EV56 processor), but was able to create only 1 cross-compiler, for the following versions:

1) binutils 2.17
2) gcc 4.2.4
3) glibc 2.3.6
4) kernel 2.6.24.7

Well, this is actually the best I can do with the original crosstool too, but it is a start :-) I would like to be able, however, to create a cross tool-chain with more recent versions.

Changing versions of the above tools gives different errors. For example, if I change only the kernel to version 2.6.25.x, the following error appears:

Installing C library
[ERROR] ../sysdeps/unix/sysv/linux/alpha/sys/user.h:26:22: error: asm/page.h: No such file or directory
[ERROR] ../sysdeps/unix/sysv/linux/alpha/sys/procfs.h:32:21: error: asm/elf.h: No such file or directory
[ERROR] ../sysdeps/unix/sysv/linux/alpha/sys/procfs.h:76: error: expected specifier-qualifier-list before 'elf_gregset_t'
[ERROR] Build failed in step 'Installing C library'
Error happened in '/root/Temp/crosstool-ng-2008-06-12/scripts/build/libc_glibc.sh' in function 'do_libc' (line unknown, sorry)
[ERROR] called from '/root/Temp/crosstool-ng-2008-06-12/scripts/crosstool.sh' at line # 490 in function 'main'
[ERROR] Look at '/opt/test/build.log' for more info on this error.
[ERROR] Build completed at 20080613.190403



If I change back to 2.6.24.7 and use binutils 2.18, then I get the error:


Installing C library
[ERROR] Build failed in step 'Installing C library'
[ERROR] Error happened in '/root/Temp/crosstool-ng-2008-06-12/scripts/build/libc_glibc.sh' in function 'do_libc' (line unknown, sorry)
[ERROR] called from '/root/Temp/crosstool-ng-2008-06-12/scripts/crosstool.sh' at line # 490 in function 'main'
[ERROR] Look at '/opt/test/build.log' for more info on this error.
[ERROR] Build completed at 20080613.191008



The build.log says:


alphaev56-unknown-linux-gnu-gcc -pipe ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S -c -I../include -I. -I/root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/build-libc/signal -I.. -I../libio -I/root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/build-libc -I../linuxthreads/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../linuxthreads/sysdeps/unix/sysv/linux/alpha -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/alpha/fpu -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/alpha/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -nostdinc -isystem /root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/gcc-core-static/lib/gcc/alphaev56-unknown-linux-gnu/4.2.3/include -isystem /opt/test/alphaev56-unknown-linux-gnu/sys-root/usr/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h -DASSEMBLER -Wa,--noexecstack -o /root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/build-libc/signal/sigsuspend.o -MD -MP -MF /root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/build-libc/signal/sigsuspend.o.dt -MT /root/Temp/crosstool-ng-2008-06-12/targets/alphaev56-unknown-linux-gnu/build/build-libc/signal/sigsuspend.o
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Assembler messages:
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: CFI instruction used without previous .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:30: Error: .cfi_endproc without corresponding .cfi_startproc
[ALL ] ../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:33: Error: open CFI at the end of file; missing .cfi_endproc directive




There seems to be an infinite number of combinations and errors :-) I will have to try more combinations and write down in a table what exactly happens in each case, so that we get an overall idea. I will try to do it in the following days. Any suggestions where to start would be very useful!

Ioannis
diff -Naur crosstool-ng-2008-06-12/arch/alpha/config.in crosstool-ng-2008-06-12-alpha/arch/alpha/config.in
--- crosstool-ng-2008-06-12/arch/alpha/config.in	1970-01-01 02:00:00.000000000 +0200
+++ crosstool-ng-2008-06-12-alpha/arch/alpha/config.in	2008-06-13 17:46:12.000000000 +0300
@@ -0,0 +1,42 @@
+# Alpha specific configuration file
+
+comment "Alpha specific configuration"
+
+choice
+    bool
+    prompt "Variant"
+
+config ARCH_ALPHA_EV4
+    bool
+    prompt "EV4"
+
+config ARCH_ALPHA_EV45
+    bool
+    prompt "EV45"
+
+config ARCH_ALPHA_EV5
+    bool
+    prompt "EV5"
+
+config ARCH_ALPHA_EV56
+    bool
+    prompt "EV56"
+
+config ARCH_ALPHA_EV6
+    bool
+    prompt "EV6"
+
+config ARCH_ALPHA_EV67
+    bool
+    prompt "EV67"
+
+endchoice
+
+config ARCH_ALPHA_VARIANT
+    string
+    default "ev4"   if ARCH_ALPHA_EV4
+    default "ev45"  if ARCH_ALPHA_EV45
+    default "ev5"   if ARCH_ALPHA_EV5
+    default "ev56"  if ARCH_ALPHA_EV56
+    default "ev6"   if ARCH_ALPHA_EV6
+    default "ev67"  if ARCH_ALPHA_EV67
diff -Naur crosstool-ng-2008-06-12/arch/alpha/functions crosstool-ng-2008-06-12-alpha/arch/alpha/functions
--- crosstool-ng-2008-06-12/arch/alpha/functions	1970-01-01 02:00:00.000000000 +0200
+++ crosstool-ng-2008-06-12-alpha/arch/alpha/functions	2008-06-13 09:41:39.000000000 +0300
@@ -0,0 +1,9 @@
+# Compute Alpha-specific values
+
+CT_DoArchValues () {
+    # The architecture part of the tuple:
+    CT_TARGET_ARCH="${CT_ARCH}${CT_ARCH_ALPHA_VARIANT}"
+
+    # The kernel ARCH:
+    CT_KERNEL_ARCH=${CT_ARCH}
+}
diff -Naur crosstool-ng-2008-06-12/config/target.in crosstool-ng-2008-06-12-alpha/config/target.in
--- crosstool-ng-2008-06-12/config/target.in	2008-06-12 19:28:41.000000000 +0300
+++ crosstool-ng-2008-06-12-alpha/config/target.in	2008-06-12 22:55:37.000000000 +0300
@@ -6,6 +6,7 @@
 
 config ARCH
     string
+    default "alpha"   if ARCH_ALPHA
     default "arm"     if ARCH_ARM
     default "ia64"    if ARCH_IA64
     default "mips"    if ARCH_MIPS
@@ -19,6 +20,11 @@
     prompt "Target architecture:"
     default ARCH_x86
 
+config ARCH_ALPHA
+    bool
+    prompt "alpha (EXPERIMENTAL)"
+    depends on EXPERIMENTAL
+
 config ARCH_ARM
     bool
     prompt "arm"
@@ -88,6 +94,9 @@
 endchoice
 
 # Include architecture-specific configuration
+if ARCH_ALPHA
+source config/arch/alpha/config.in
+endif
 if ARCH_ARM
 source config/arch/arm/config.in
 endif

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

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