Bug 14447

Summary: building for hppa fails with cfi errors in syscall wrappers
Product: glibc Reporter: Mike Frysinger <vapier>
Component: portsAssignee: Not yet assigned to anyone <unassigned>
Status: RESOLVED FIXED    
Severity: normal CC: carlos, carlos_odonell, roland, toolchain
Priority: P2 Flags: fweimer: security-
Version: 2.15   
Target Milestone: 2.17   
Host: hppa2.0-linux-gnu Target:
Build: Last reconfirmed:

Description Mike Frysinger 2012-08-10 05:54:57 UTC
using:
GNU assembler (GNU Binutils) 2.22
hppa2.0-unknown-linux-gnu-gcc (Gentoo 4.5.3-r2 p1.0, pie-0.4.7) 4.5.3

building glibc-2.15 as well as current git tree fails with:
$ ../../configure --host=hppa2.0-unknown-linux-gnu --prefix=/usr
$ make -j4
(echo '#define SYSCALL_NAME pause'; \
 echo '#define SYSCALL_NARGS 0'; \
 echo '#define SYSCALL_SYMBOL __libc_pause'; \
 echo '#define SYSCALL_CANCELLABLE 1'; \
 echo '#include <syscall-template.S>'; \
 echo 'weak_alias (__libc_pause, pause)'; \
 echo 'libc_hidden_weak (pause)'; \
) | hppa2.0-unknown-linux-gnu-gcc -c -U_FORTIFY_SOURCE   -I../include -I/usr/local/src/gnu/glibc/build/hppa/posix -I/usr/local/src/gnu/glibc/build/hppa -I../ports/sysdeps/unix/sysv/linux/hppa/nptl -I../ports/sysdeps/unix/sysv/linux/hppa -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -I../ports/sysdeps/unix/sysv/linux -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/inet -I../nptl/sysdeps/unix/sysv -I../ports/sysdeps/unix/sysv -I../sysdeps/unix/sysv -I../nptl/sysdeps/unix -I../ports/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../ports/sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../ports/sysdeps/hppa/fpu -I../ports/sysdeps/hppa/nptl -I../ports/sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic -I../nptl -I../ports  -I.. -I../libio -I.  -D_LIBC_REENTRANT -include ../include/libc-symbols.h       -DASSEMBLER      -o /usr/local/src/gnu/glibc/build/hppa/posix/pause.o -x assembler-with-cpp - -MD -MP -MF /usr/local/src/gnu/glibc/build/hppa/posix/pause.o.dt -MT /usr/local/src/gnu/glibc/build/hppa/posix/pause.o 
../sysdeps/unix/syscall-template.S: Assembler messages:
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
../sysdeps/unix/syscall-template.S:81: Error: CFI instruction used without previous .cfi_startproc
make: *** [/usr/local/src/gnu/glibc/build/hppa/posix/pause.o] Error 1
Comment 1 jsm-csl@polyomino.org.uk 2012-08-10 11:53:50 UTC
As of 2.16 the hppa port is out of date in at least the 25 ways I listed 
at <http://sourceware.org/ml/libc-ports/2012-06/msg00048.html>; this may 
be a 26th.  In addition or since 2.16, it needs c++-types data, TLS 
configure checks removed, and __ASSUME_LWS_CAS definition / conditionals 
removed.
Comment 2 Carlos O'Donell 2012-11-29 14:56:56 UTC
Fixed by:

commit 236bb0623dba86582ded9f89b8d79f362404f7a1
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Mon Oct 29 23:31:55 2012 -0400

    hppa: Add cfi direcvtives.

    We add cfi directives to the syscall assembly.


 2012-10-29  Carlos O'Donell  <carlos@systemhalted.org>

+       * sysdeps/unix/sysv/linux/hppa/sysdep.h (ENTRY): Add cfi_startproc.
+       Use .cfi_offset for rp store.
+       (ENTRY_LEAF): Likewise.
+       (END) Add cfi_Endproc.
+       (DO_CALL): Add cfi directives.
+

and:

commit 77a13b85e36160e47c49886195d1af64a417074d
Author: Carlos O'Donell <carlos@systemhalted.org>
Date:   Thu Nov 29 10:08:31 2012 -0500

    hppa: Add BZ#14447 to NEWS and ChangeLog.hppa.