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]

hppa/dl-machine.h compilation error


Hi,

When compiling glibc for hppa, I get this error:

hppa-linux-gcc dl-reloc.c -c -O2 -Wall -Winline -Wstrict-prototypes -Wwrite-strings -g      -I../include -I. -I/backup/cross-build/build-glibc-hppa/elf -I.. -I../libio  -I/backup/cross-build/build-glibc-hppa -I../sysdeps/hppa/elf -I../linuxthreads/sysdeps/unix/sysv/linux/hppa -I../linuxthreads/sysdeps/unix/sysv/linux -I../linuxthreads/sysdeps/pthread -I../sysdeps/pthread -I../linuxthreads/sysdeps/unix/sysv -I../linuxthreads/sysdeps/unix -I../linuxthreads/sysdeps/hppa -I../sysdeps/unix/sysv/linux/hppa -I../sysdeps/unix/sysv/linux -I../sysdeps/gnu -I../sysdeps/unix/common -I../sysdeps/unix/mman -I../sysdeps/unix/inet -I../sysdeps/unix/sysv -I../sysdeps/unix -I../sysdeps/posix -I../sysdeps/hppa/hppa1.1 -I../sysdeps/wordsize-32 -I../sysdeps/ieee754/flt-32 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/hppa/fpu -I../sysdeps/hppa -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic  -nostdinc -isystem /cross/hppa-linux-tools/lib/gcc-lib/hppa-linux/3.1/include -isystem /cross/hppa-linux/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h     -o /backup/cross-build/build-glibc-hppa/elf/dl-reloc.o
In file included from dynamic-link.h:21,
                 from dl-reloc.c:28:
../sysdeps/hppa/dl-machine.h:410:34: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:411:23: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:412:22: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:413:15: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:429:19: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:570:14: warning: multi-line string literals are deprecated
In file included from dynamic-link.h:21,
                 from dl-reloc.c:153:
../sysdeps/hppa/dl-machine.h:410:34: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:411:23: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:412:22: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:413:15: warning: multi-line string literals are deprecated
../sysdeps/hppa/dl-machine.h:429:19: warning: multi-line string literals are deprecated
In file included from dynamic-link.h:21,
                 from dl-reloc.c:153:
../sysdeps/hppa/dl-machine.h: In function `elf_machine_rela':
../sysdeps/hppa/dl-machine.h:534: invalid operands to binary &
../sysdeps/hppa/dl-machine.h:570:14: warning: multi-line string literals are deprecated
make[2]: *** [/backup/cross-build/build-glibc-hppa/elf/dl-reloc.o] Fehler 1
make[2]: Leaving directory `/packages2/glibc-2.2.5/elf'

The fix is obvious:


2002-06-04  Bruno Haible  <bruno@clisp.org>

	* sysdeps/hppa/dl-machine.h (elf_machine_rela): Cast reloc_addr
	to an integer type before performing bit operations on it.

*** glibc-2.2.5/sysdeps/hppa/dl-machine.h.bak	2001-08-27 00:26:34.000000000 +0200
--- glibc-2.2.5/sysdeps/hppa/dl-machine.h	2002-06-04 01:07:08.000000000 +0200
***************
*** 531,537 ****
  	return;
  #endif
        /* .eh_frame can have unaligned relocs.  */
!       if (reloc_addr & 3)
  	{
  	  char *rel_addr = (char *) reloc_addr;
  	  rel_addr[0] = value >> 24;
--- 531,537 ----
  	return;
  #endif
        /* .eh_frame can have unaligned relocs.  */
!       if ((unsigned long) reloc_addr & 3)
  	{
  	  char *rel_addr = (char *) reloc_addr;
  	  rel_addr[0] = value >> 24;

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