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]

Re: Patch to compile glibc 2.3.2 on alpha using binutils 2.15.90.0.3and gcc 3.4.0


	Hi,

I haven't received any feedback on theses patches. Are they ok?

Cheers.

On Thu, May 13, 2004 at 04:14:15PM -0400, Mathieu Chouquet-Stringer wrote:
> 	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 --

> --- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h.orig	2004-05-13 00:33:54.000000000 -0400
> +++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/sysdep-cancel.h	2004-05-13 00:34:19.000000000 -0400
> @@ -42,7 +42,7 @@
>  	.align 4;						\
>  	.type name, @function;					\
>  	.usepv name, std;					\
> -	cfi_startproc;						\
> +	.cfi_startproc;						\
>  __LABEL(name)							\
>  	ldgp	gp, 0(pv);					\
>  	PSEUDO_PROF;						\
> @@ -56,9 +56,9 @@
>  	.subsection 2;						\
>  __LABEL($pseudo_cancel)						\
>  	subq	sp, 64, sp;					\
> -	cfi_def_cfa_offset(64);					\
> +	.cfi_def_cfa_offset(64);					\
>  	stq	ra, 0(sp);					\
> -	cfi_offset(ra, -64);					\
> +	.cfi_offset ra, -64;					\
>  	SAVE_ARGS_##args;					\
>  	CENABLE;						\
>  	LOAD_ARGS_##args;					\
> @@ -70,18 +70,18 @@
>  	ldq	ra, 0(sp);					\
>  	ldq	v0, 8(sp);					\
>  	addq	sp, 64, sp;					\
> -	cfi_remember_state;					\
> -	cfi_restore(ra);					\
> -	cfi_def_cfa_offset(0);					\
> +	.cfi_remember_state;					\
> +	.cfi_restore(ra);					\
> +	.cfi_def_cfa_offset(0);					\
>  	ret;							\
> -	cfi_restore_state;					\
> +	.cfi_restore_state;					\
>  __LABEL($multi_error)						\
>  	CDISABLE;						\
>  	ldq	ra, 0(sp);					\
>  	ldq	v0, 8(sp);					\
>  	addq	sp, 64, sp;					\
> -	cfi_restore(ra);					\
> -	cfi_def_cfa_offset(0);					\
> +	.cfi_restore(ra);					\
> +	.cfi_def_cfa_offset(0);					\
>  __LABEL($syscall_error)						\
>  	SYSCALL_ERROR_HANDLER;					\
>  	.previous
> @@ -89,7 +89,7 @@
>  # undef PSEUDO_END
>  # define PSEUDO_END(sym)					\
>  	.subsection 2;						\
> -	cfi_endproc;						\
> +	.cfi_endproc;						\
>  	.size sym, .-sym
>  
>  # define SAVE_ARGS_0	/* Nothing.  */

> --- glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S.orig	2004-05-13 01:47:46.000000000 -0400
> +++ glibc-2.3.2/linuxthreads/sysdeps/unix/sysv/linux/alpha/vfork.S	2004-05-13 01:48:17.000000000 -0400
> @@ -23,7 +23,7 @@
>  	.globl	__vfork
>  	.type	__vfork, @function
>  	.usepv	__vfork, std
> -	cfi_startproc
> +	.cfi_startproc
>  __vfork:
>  	ldgp	gp, 0(pv)
>  	PSEUDO_PROF
> @@ -47,22 +47,22 @@
>  	   fork and vfork object files.  */
>  $do_fork:
>  	subq	sp, 16, sp
> -	cfi_adjust_cfa_offset(16)
> +	.cfi_adjust_cfa_offset(16)
>  	stq	ra, 0(sp)
> -	cfi_offset(ra, -16)
> +	.cfi_offset ra, -16
>  	jsr	ra, HIDDEN_JUMPTARGET (__fork)
>  	ldgp	gp, 0(ra)
>  	ldq	ra, 0(sp)
>  	addq	sp, 16, sp
> -	cfi_restore(ra)
> -	cfi_adjust_cfa_offset(-16)
> +	.cfi_restore(ra)
> +	.cfi_adjust_cfa_offset(-16)
>  	ret
>  
>  $syscall_error:
>  	SYSCALL_ERROR_HANDLER
>  #endif
>  
> -	cfi_endproc
> +	.cfi_endproc
>  	.size __vfork, .-__vfork
>  
>  libc_hidden_def (__vfork)


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


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