Bug#709992: eglibc: FTBFS: Assembler messages: Error: bad register expression

2013-06-25 Thread Andreas Schwab
>From 5ccb4311206d95f48e44ffaba09bf6cf05d17145 Mon Sep 17 00:00:00 2001
From: Andreas Schwab 
Date: Tue, 25 Jun 2013 18:57:42 +0200
Subject: [PATCH] m68k: fix bad use of register alias in cfi insn

---
 ports/ChangeLog.m68k| 5 +
 ports/sysdeps/m68k/sysdep.h | 4 ++--
 2 files changed, 7 insertions(+), 2 deletions(-)

diff --git a/ports/ChangeLog.m68k b/ports/ChangeLog.m68k
index f9a5f0b..c5b1e21 100644
--- a/ports/ChangeLog.m68k
+++ b/ports/ChangeLog.m68k
@@ -1,3 +1,8 @@
+2013-06-25  Andreas Schwab  
+
+   * sysdeps/m68k/sysdep.h (CALL_MCOUNT) [PROF]: Use %a6 instead of
+   %fp in cfi insns.
+
 2013-06-15  Siddhesh Poyarekar  
 
* sysdeps/unix/sysv/linux/m68k/coldfire/nptl/libpthread.abilist:
diff --git a/ports/sysdeps/m68k/sysdep.h b/ports/sysdeps/m68k/sysdep.h
index cd34dd8..f8ad70e 100644
--- a/ports/sysdeps/m68k/sysdep.h
+++ b/ports/sysdeps/m68k/sysdep.h
@@ -45,11 +45,11 @@
to locate our caller, so push one just for its benefit.  */
 #  define CALL_MCOUNT \
   move.l %fp, -(%sp);\
-  cfi_adjust_cfa_offset (4);  cfi_rel_offset (%fp, 0);   \
+  cfi_adjust_cfa_offset (4);  cfi_rel_offset (%a6, 0);   \
   move.l %sp, %fp;   \
   jbsr JUMPTARGET (_mcount); \
   move.l (%sp)+, %fp;\
-  cfi_adjust_cfa_offset (-4); cfi_restore (%fp);
+  cfi_adjust_cfa_offset (-4); cfi_restore (%a6);
 # else
 #  define CALL_MCOUNT  /* Do nothing.  */
 # endif
-- 
1.8.3.1


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: http://lists.debian.org/87txkm5dbm@igel.home



Bug#709992: eglibc: FTBFS: Assembler messages: Error: bad register expression

2013-06-25 Thread John Paul Adrian Glaubitz
Package: src:eglibc
Followup-For: Bug #709992

Hi,

just a short heads-up. Michael Karcher suggested that the binutils
package used on the buildds has been too old. However, as of
yesterday, ara5 has compiled the latest version available in
Debian.

Can you update your binutils package and give it another try?

Cheers,

Adrian


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20130625160115.18765.43808.report...@z6.physik.fu-berlin.de



Bug#709992: eglibc: FTBFS: Assembler messages: Error: bad register expression

2013-06-24 Thread John Paul Adrian Glaubitz
Package: src:eglibc
Followup-For: Bug #709992

Hi!

I have browsed the code a bit and looked at the differences
between eglibc 2.13 (which builds on m68k) and 2.17 and it
turns out that m68k-helpers.S had two separate versions
for Coldfire and real m68k CPUs in 2.13 while the code was
merged in 2.17.

2.13:

glaubitz@z6:..linux/m68k> pwd
/home/glaubitz/tmp/eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k
glaubitz@z6:..linux/m68k> ls -l */m68k-helpers.S
-rw-r--r-- 1 glaubitz glaubitz 3474 Mar 13  2010 coldfire/m68k-helpers.S
-rw-r--r-- 1 glaubitz glaubitz 3433 Mar 13  2010 m680x0/m68k-helpers.S
glaubitz@z6:..linux/m68k>

2.17:

glaubitz@z6:..linux/m68k> pwd
/home/glaubitz/tmp/eglibc-2.17/ports/sysdeps/unix/sysv/linux/m68k
glaubitz@z6:..linux/m68k> ls -l m68k-helpers.S
-rw-r--r-- 1 glaubitz glaubitz 3251 Mar 10  2012 m68k-helpers.S
glaubitz@z6:..linux/m68k>

So it might be worth looking into what has been changed for the
original m68k CPUs in m68k-helper.S:

glaubitz@z6:~> diff -u 
/home/glaubitz/tmp/eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
 
/home/glaubitz/tmp/eglibc-2.17/ports/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S
--- 
/home/glaubitz/tmp/eglibc-2.13/ports/sysdeps/unix/sysv/linux/m68k/m680x0/m68k-helpers.S
2010-03-13 19:20:12.0 +0100
+++ 
/home/glaubitz/tmp/eglibc-2.17/ports/sysdeps/unix/sysv/linux/m68k/m68k-helpers.S
   2012-03-10 02:14:00.0 +0100
@@ -1,4 +1,4 @@
-/* Copyright (C) 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2010, 2012 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Maxim Kuvyrkov , 2010.
 
@@ -30,9 +30,8 @@
Lesser General Public License for more details.
 
You should have received a copy of the GNU Lesser General Public
-   License along with the GNU C Library; if not, write to the Free
-   Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
-   02111-1307 USA.  */
+   License along with the GNU C Library.  If not, see
+   .  */
 
 #include 
 #include 
@@ -41,12 +40,10 @@
 
.hidden __vdso_read_tp_stub
 ENTRY (__vdso_read_tp_stub)
-  cfi_startproc
   move.l   #__NR_get_thread_area, %d0
   trap #0
   move.l   %d0, %a0
   rts
-  cfi_endproc
 END (__vdso_read_tp_stub)
 
 # ifdef SHARED
@@ -59,11 +56,10 @@
   .hidden __m68k_read_tp
 # endif
 ENTRY (__m68k_read_tp)
-  cfi_startproc
-  lea  _GLOBAL_OFFSET_TABLE_@GOTPC(%pc), %a0
+  LOAD_GOT (%a0)
   move.l   M68K_VDSO_SYMBOL (__vdso_read_tp)@GOT(%a0), %a0
-  jmp  ([%a0])
-  cfi_endproc
+  move.l   (%a0), %a0
+  jmp  (%a0)
 END (__m68k_read_tp)
 
 /* The following two stubs are for macros in atomic.h, they can't
@@ -71,7 +67,6 @@
 
.hidden __vdso_atomic_cmpxchg_32_stub
 ENTRY (__vdso_atomic_cmpxchg_32_stub)
-  cfi_startproc
   move.l   %d2, -(%sp)
   cfi_adjust_cfa_offset (4)
   cfi_rel_offset (%d2, 0)
@@ -82,12 +77,10 @@
   cfi_adjust_cfa_offset (-4)
   cfi_restore (%d2)
   rts
-  cfi_endproc
 END (__vdso_atomic_cmpxchg_32_stub)
 
.hidden __vdso_atomic_barrier_stub
 ENTRY (__vdso_atomic_barrier_stub)
-  cfi_startproc
   move.l   %d0, -(%sp)
   cfi_adjust_cfa_offset (4)
   move.l#SYS_ify (atomic_barrier), %d0
@@ -95,7 +88,6 @@
   move.l  (%sp)+, %d0
   cfi_adjust_cfa_offset (-4)
   rts
-  cfi_endproc
 END (__vdso_atomic_barrier_stub)
 # else /* !SHARED */
 /* If the vDSO is not available, use a syscall to get TP.  */
glaubitz@z6:~>

So, 2.17 had the cfi_startproc and cfi_endproc macros removed.

Any comment on that?

Cheers,

Adrian


-- 
To UNSUBSCRIBE, email to debian-glibc-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org
Archive: 
http://lists.debian.org/20130624230024.9263.4203.report...@z6.physik.fu-berlin.de