This is the mail archive of the libc-alpha@sources.redhat.com mailing list for the glibc project.


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

Patch to compile glibc 2.3.2 on alpha using binutils 2.15.90.0.3 andgcc 3.4.0


	Hi,

I've been successfully using Dan Kegel's crosstool utility for quite some
time and yesterday, I was trying to build a cross-compiler for AXP on i386.

After a few minutes, the build failed with this error message:

../sysdeps/unix/sysv/linux/alpha/sigsuspend.S: Assembler messages:
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_startproc'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: missing ')'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: syntax error
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_remember_state'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore_state'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_restore'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:28: Error: unknown opcode `cfi_def_cfa_offset'
../sysdeps/unix/sysv/linux/alpha/sigsuspend.S:30: Error: unknown opcode `cfi_endproc'
make[2]: *** [/usr/src/crosstool/crosstool-0.28-rc14/build/alpha-linux/gcc-3.4.0-glibc-2.3.2/build-glibc/signal/sigsuspend.o] Error 1


At line 28 in sigsuspend.S, we've got this:
PSEUDO(__sigsuspend, sigsuspend, 1)

PSEUDO is defined in sysdep-cancel.h and is just a long asm macro. I was
googling to find out more because I have to admit I don't know much about
gas assembly syntax. One thing was clear though the cfi opcode are supposed
to be prefixed by a '.'. So cfi_startproc is really supposed to be
.cfi_startproc and so on...

So I decided to patch (attachment #1) sysdep-cancel.h by adding a '.' where
it was needed and by removing the parentheses for .cfi_offset. The patch
should apply cleanly on 1.4 (latest cvs version).

The compilation went a little bit further and failed on vfork.S this time
with the same kind of errors. So I patched it too (attachment #2). This
patch should apply cleanly on version 1.6 of vfork.S (latest cvs version).

When I was done, first thing I did was to contact Dan to let him know that
by patching these 2 files I was able to compile glibc 2.3.2 for AXP on i386
using gcc 3.4.0. He then kindly told me I should let you know about the
patches.

So, in the end, I've got two questions:
1 - are these two patches correct? (I'm especially unsure about the
    parentheses for cfi_offset)
2 - if they are and need to be integrated into mainline cvs, do I have to
    sign a copyright assignment?

Let me known.

Thanks, Mathieu.

-- 
Mathieu Chouquet-Stringer                 E-Mail: mchouque@online.fr
       Never attribute to malice that which can be adequately
                    explained by stupidity.
                     -- Hanlon's Razor --

Attachment: alpha_cfi2.patch
Description: Text document

Attachment: alpha_cfi3.patch
Description: Text document


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