This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports 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: Building sysdeps/unix/getppid.S by accident.


On Thu, Apr 12, 2012 at 4:45 AM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> "Carlos O'Donell" <carlos@systemhalted.org> writes:
>
>> ../sysdeps/unix/getppid.S:24: Error: Unknown opcode: `move(r1, r0)'
>
> What does sysd-syscalls say about getppid?

Thanks, that is a good pointer. Given your pointer I've started a fresh build.

It's there only once in sysd-syscalls:
~~~
...
#### CALL=getppid NUMBER=(0 + 64) ARGS=i: SOURCE=-
ifeq (,$(filter getppid,$(unix-syscalls)))
unix-syscalls += getppid
$(foreach p,$(sysd-rules-targets),$(foreach
o,$(object-suffixes),$(objpfx)$(patsubst %,$p,getppid)$o)): \
                $(..)sysdeps/unix/make-syscalls.sh
        $(make-target-directory)
        (echo '#define SYSCALL_NAME getppid'; \
         echo '#define SYSCALL_NARGS 0'; \
         echo '#define SYSCALL_SYMBOL __getppid'; \
         echo '#define SYSCALL_NOERRNO 1'; \
         echo '#include <syscall-template.S>'; \
         echo 'weak_alias (__getppid, getppid)'; \
         echo 'libc_hidden_weak (getppid)'; \
        ) | $(compile-syscall) $(foreach p,$(patsubst
%getppid,%,$(basename $(@F))),$($(p)CPPFLAGS))
endif
...
~~~

Something is definitely odd, I'll have to debug this more later.

A full rebuild results in more weirdness:
~~~
(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)'; \
        ) | hppa-linux-gnu-gcc -c   -I../include
-I/home/carlos/build/glibc/posix -I/home/carlos/build/glibc
-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/common
-I../sysdeps/unix/mman -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. -nostdinc -isystem
/usr/lib/gcc/hppa-linux-gnu/4.6/include -isystem
/usr/lib/gcc/hppa-linux-gnu/4.6/include-fixed -isystem
/home/carlos/build/linux-headers/include -D_LIBC_REENTRANT -include
../include/libc-symbols.h       -DASSEMBLER      -o
/home/carlos/build/glibc/posix/pause.o -x assembler-with-cpp - -MD -MP
-MF /home/carlos/build/glibc/posix/pause.o.dt -MT
/home/carlos/build/glibc/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[2]: *** [/home/carlos/build/glibc/posix/pause.o] Error 1
make[2]: Leaving directory `/home/carlos/src/glibc/posix'
make[1]: *** [posix/subdir_lib] Error 2
make[1]: Leaving directory `/home/carlos/src/glibc'
make: *** [all] Error 2
~~~

Which is valid error, but new.

This was easy to fixup by adding cfi_startproc/cfi_endproc to
ports/sysdeps/unix/sysv/linux/hppa/sysdeps.h in PSEUDO* and END.

I was a bit surprised to see macros for all of these directives
getting in the way e.g. #define cfi_startproc .cfi_startproc from
sysdeps/generic/sysdep.h (which everyone includes).

I've started rebuilding. We'll see how far it gets.

Thanks Andreas!

Cheers,
Carlos.


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