Bug 5216 - glibc 2.7 compilation problem on alpha due to PTR_MANGLE and PTR_DEMANGLE
Summary: glibc 2.7 compilation problem on alpha due to PTR_MANGLE and PTR_DEMANGLE
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: ports (show other bugs)
Version: unspecified
: P2 normal
Target Milestone: ---
Assignee: Roland McGrath
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-10-24 11:58 UTC by Oliver Falk
Modified: 2014-07-04 07:11 UTC (History)
2 users (show)

See Also:
Host: alpha-redhat-linux
Target: alpha-redhat-linux
Build: alpha-redhat-linux
Last reconfirmed:
fweimer: security-


Attachments
patch that moves PTR_MANGLE for alpha (834 bytes, patch)
2007-10-28 19:47 UTC, Joe Ciccone
Details | Diff
Patch from Mike Frysinger <vapier@gentoo.org> fixing some asm incl (2.30 KB, patch)
2009-01-07 07:55 UTC, Oliver Falk
Details | Diff
alpha does not have a __NR_creat (236 bytes, patch)
2009-01-07 07:56 UTC, Oliver Falk
Details | Diff
dl_support incl fix (182 bytes, patch)
2009-01-07 07:57 UTC, Oliver Falk
Details | Diff
Pointer mangling support fix (770 bytes, patch)
2009-01-07 07:57 UTC, Oliver Falk
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Falk 2007-10-24 11:58:54 UTC
Build log can be found here:
http://buildsys.zero42.at/koji/getfile?taskID=52759&name=build.log

For every arch, PTR_MANGLE and PTR_DEMANGLE defines are in
sysdeps/unix/sysv/linux/<arch>/sysdep.h. But for alpha this is not true. The
defines are in sysdeps/unix/alpha/sysdep.h and unix/sysv/linux/alpha/sysdep.h
includes the first. I don't know if this is a mistake or by design...

However, nss/nscd do #include "sysdep.h", which should pull in both headers,
shouldn't it? Well as you can see in the build log that doesn't seem to work out...

(Since the problem occurred at nscd, I post this with component nscd...)
Comment 1 Ulrich Drepper 2007-10-28 16:35:41 UTC
No idea what's going on, the report doesn't have enough information.
Comment 2 Pierre Habouzit 2007-10-28 18:18:09 UTC
(In reply to comment #1)
> No idea what's going on, the report doesn't have enough information.

http://experimental.ftbfs.de/fetch.php?pkg=glibc&arch=alpha&ver=2.7-0exp3&stamp=1193571427&file=log&as=raw

Here is a Debian Build-log that hit the same issue, the error is at:

gcc-4.2 
aicache.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fstrict-aliasing -g -pipe -Wstrict-prototypes -mlong-double-128 -mieee -mfp-rounding-mode=d  -DHAVE_SENDFILE -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector   -I../include -I/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd -I/build/buildd/glibc-2.7/build-tree/alpha-libc -I../nptl/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha/fpu -I../sysdeps/alpha/fpu -I../nptl/sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -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../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/alpha -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/alpha/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/alpha-linux-gnu/4.2.3/include -isystem /build/buildd/glibc-2.7/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/aicache.o -MD -MP -MF /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/aicache.o.dt -MT /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/aicache.o
aicache.c:1: warning: -fstack-protector not supported for this target
gcc-4.2 
initgrcache.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fstrict-aliasing -g -pipe -Wstrict-prototypes -mlong-double-128 -mieee -mfp-rounding-mode=d  -DHAVE_SENDFILE -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector   -I../include -I/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd -I/build/buildd/glibc-2.7/build-tree/alpha-libc -I../nptl/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha/fpu -I../sysdeps/alpha/fpu -I../nptl/sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -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../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/alpha -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/alpha/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/alpha-linux-gnu/4.2.3/include -isystem /build/buildd/glibc-2.7/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/initgrcache.o -MD -MP -MF /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/initgrcache.o.dt -MT /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/initgrcache.o
initgrcache.c:1: warning: -fstack-protector not supported for this target
gcc-4.2 
gai.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fstrict-aliasing -g -pipe -Wstrict-prototypes -mlong-double-128 -mieee -mfp-rounding-mode=d  -DNEED_NETLINK -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector   -I../include -I/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd -I/build/buildd/glibc-2.7/build-tree/alpha-libc -I../nptl/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha/fpu -I../sysdeps/alpha/fpu -I../nptl/sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -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../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/alpha -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/alpha/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/alpha-linux-gnu/4.2.3/include -isystem /build/buildd/glibc-2.7/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gai.o -MD -MP -MF /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gai.o.dt -MT /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gai.o
gai.c:1: warning: -fstack-protector not supported for this target
gcc-4.2 
res_hconf.c -c -std=gnu99 -fgnu89-inline -O2 -Wall -Winline -Wwrite-strings -fmerge-all-constants -fstrict-aliasing -g -pipe -Wstrict-prototypes -mlong-double-128 -mieee -mfp-rounding-mode=d  -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector   -I../include -I/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd -I/build/buildd/glibc-2.7/build-tree/alpha-libc -I../nptl/sysdeps/alpha/elf -I../sysdeps/alpha/elf -I../sysdeps/unix/sysv/linux/alpha/alpha -I../sysdeps/unix/sysv/linux/alpha/fpu -I../sysdeps/alpha/fpu -I../nptl/sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/alpha -I../sysdeps/unix/sysv/linux/wordsize-64 -I../sysdeps/ieee754/ldbl-64-128 -I../sysdeps/ieee754/ldbl-opt -I../nptl/sysdeps/unix/sysv/linux -I../nptl/sysdeps/pthread -I../sysdeps/pthread -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../sysdeps/unix/sysv -I../sysdeps/unix/alpha -I../nptl/sysdeps/unix -I../sysdeps/unix -I../sysdeps/posix -I../nptl/sysdeps/alpha -I../sysdeps/alpha -I../sysdeps/wordsize-64 -I../sysdeps/ieee754/ldbl-128 -I../sysdeps/ieee754/dbl-64 -I../sysdeps/ieee754/flt-32 -I../sysdeps/alpha/soft-fp -I../sysdeps/ieee754 -I../sysdeps/generic/elf -I../sysdeps/generic -I../nptl  -I.. -I../libio -I. -nostdinc -isystem /usr/lib/gcc/alpha-linux-gnu/4.2.3/include -isystem /build/buildd/glibc-2.7/debian/include -D_LIBC_REENTRANT -include ../include/libc-symbols.h   -DNOT_IN_libc=1    -o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/res_hconf.o -MD -MP -MF /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/res_hconf.o.dt -MT /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/res_hconf.o
res_hconf.c:1: warning: -fstack-protector not supported for this target
gcc-4.2   -pie -Wl,-O1 -DIS_IN_nscd=1 -D_FORTIFY_SOURCE=2 -fpie -fstack-protector 
\
           -Wl,-dynamic-linker=/lib/ld-linux.so.2 -Wl,-z,relro -Wl,-z,now \
           -B/build/buildd/glibc-2.7/build-tree/alpha-libc/csu/ \
            \
            \
          -L/build/buildd/glibc-2.7/build-tree/alpha-libc -L/build/buildd/glibc-2.7/build-tree/alpha-libc/math -L/build/buildd/glibc-2.7/build-tree/alpha-libc/elf -L/build/buildd/glibc-2.7/build-tree/alpha-libc/dlfcn -L/build/buildd/glibc-2.7/build-tree/alpha-libc/nss -L/build/buildd/glibc-2.7/build-tree/alpha-libc/nis -L/build/buildd/glibc-2.7/build-tree/alpha-libc/rt -L/build/buildd/glibc-2.7/build-tree/alpha-libc/resolv -L/build/buildd/glibc-2.7/build-tree/alpha-libc/crypt -L/build/buildd/glibc-2.7/build-tree/alpha-libc/nptl -Wl,-rpath-link=/build/buildd/glibc-2.7/build-tree/alpha-libc:/build/buildd/glibc-2.7/build-tree/alpha-libc/math:/build/buildd/glibc-2.7/build-tree/alpha-libc/elf:/build/buildd/glibc-2.7/build-tree/alpha-libc/dlfcn:/build/buildd/glibc-2.7/build-tree/alpha-libc/nss:/build/buildd/glibc-2.7/build-tree/alpha-libc/nis:/build/buildd/glibc-2.7/build-tree/alpha-libc/rt:/build/buildd/glibc-2.7/build-tree/alpha-libc/resolv:/build/buildd/glibc-2.7/build-tree/alpha-libc/crypt:/build/buildd/glibc-2.7/build-tree/alpha-libc/nptl 
\
          -o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/connections.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/pwdcache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwnam_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwuid_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/grpcache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrnam_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrgid_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/hstcache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbyad_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbynm2_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbynm_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbypt_r.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/servicescache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/dbg_log.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd_conf.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd_stat.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/cache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/mem.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd_setup_thread.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/xmalloc.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/xstrdup.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/aicache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/initgrcache.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gai.o /build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/res_hconf.o /build/buildd/glibc-2.7/build-tree/alpha-libc/rt/librt.so /build/buildd/glibc-2.7/build-tree/alpha-libc/nptl/libpthread_nonshared.a /build/buildd/glibc-2.7/build-tree/alpha-libc/nptl/libpthread.so /build/buildd/glibc-2.7/build-tree/alpha-libc/nis/libnsl.so  /build/buildd/glibc-2.7/build-tree/alpha-libc/libc_nonshared.a
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwnam_r.o: In function 
`__getpwnam_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwuid_r.o: In function 
`__getpwuid_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwuid_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getpwuid_r.o: In function 
`__getpwuid_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrnam_r.o: In function 
`__getgrnam_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrnam_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrnam_r.o: In function 
`__getgrnam_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrgid_r.o: In function 
`__getgrgid_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrgid_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getgrgid_r.o: In function 
`__getgrgid_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbyad_r.o: In function 
`__gethostbyaddr_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbynm2_r.o: In 
function `__gethostbyname2_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbynm2_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/gethstbynm2_r.o: In 
function `__gethostbyname2_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbynm_r.o: In function 
`__getservbyname_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbynm_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbynm_r.o: In function 
`__getservbyname_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbypt_r.o: In function 
`__getservbyport_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:199: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbypt_r.o:/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:202: 
more undefined references to `PTR_MANGLE' follow
/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/getsrvbypt_r.o: In function 
`__getservbyport_r':
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:214: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:216: 
undefined reference to `PTR_DEMANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd/../nss/getXXbyYY_r.c:178: 
undefined reference to `PTR_MANGLE'
collect2: ld returned 1 exit status
make[3]: *** [/build/buildd/glibc-2.7/build-tree/alpha-libc/nscd/nscd] Error 1
make[3]: Leaving directory `/build/buildd/glibc-2.7/build-tree/glibc-2.7/nscd'
make[2]: *** [nscd/others] Error 2
make[2]: Leaving directory `/build/buildd/glibc-2.7/build-tree/glibc-2.7'
make[1]: *** [all] Error 2
make[1]: Leaving directory `/build/buildd/glibc-2.7/build-tree/alpha-libc'
make: *** [/build/buildd/glibc-2.7/stamp-dir/build_libc] Error 2
Comment 3 Joe Ciccone 2007-10-28 19:47:45 UTC
Created attachment 2062 [details]
patch that moves PTR_MANGLE for alpha

I'm running into the same problem. My host is x86_64-unknown-linux-gnu and my
target is alphaev56-unknown-linux-gnu.

I'm attaching a patch that moves PTR_MANGLE from sysdeps/unix/alpha/sysdep.h
into sysdeps/unix/sysv/linux/alpha/sysdep.h just for consistancies sake.
PTR_MANGLE was inside of a ifdef __ASSEMBLER__ in sysdeps/unix/alpha/sysdep.h.
Moving it below the #endif /* ASSEMBLER */ in sysdeps/unix/alpha/sysdep.h has
the same result of putting it in the bottom of
sysdeps/unix/sysv/linux/alpha/sysdep.h. Which is where it exists in the rest of
the architectures.

Also, in every architecture besides alpha, the #if defined NOT_IN_libc &&
defined IS_IN_rtld contition has #else. alpha has a #elif defined PIC. The
attached patch changes that #elif defined PIC to a #else.

With these changes I no longer get undefined references to PTR_MANGLE and
PTR_DEMANGLE. This is what I'm now seeing.

alphaev56-unknown-linux-gnu-gcc -nostdlib -nostartfiles -static -o
/srv/data/clfs/clfs-alpha/sources/glibc-build/elf/sln	
/srv/data/clfs/clfs-alpha/sources/glibc-build/csu/crt1.o
/srv/data/clfs/clfs-alpha/sources/glibc-build/csu/crti.o
`alphaev56-unknown-linux-gnu-gcc --print-file-name=crtbegin.o`
/srv/data/clfs/clfs-alpha/sources/glibc-build/elf/sln.o 
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a -lgcc 
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a
`alphaev56-unknown-linux-gnu-gcc --print-file-name=crtend.o`
/srv/data/clfs/clfs-alpha/sources/glibc-build/csu/crtn.o
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(setjmp.o): In function
`__sigsetjmp':
(.text+0x28): undefined reference to `__pointer_chk_guard'
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(exit.o): In function
`exit':
/srv/data/clfs/clfs-alpha/sources/glibc-2.7/stdlib/exit.c:66: undefined
reference to `__pointer_chk_guard'
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(cxa_atexit.o): In function
`__cxa_atexit':
/srv/data/clfs/clfs-alpha/sources/glibc-2.7/stdlib/cxa_atexit.c:43: undefined
reference to `__pointer_chk_guard'
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(gconv_db.o): In function
`__gconv_release_step':
/srv/data/clfs/clfs-alpha/sources/glibc-2.7/iconv/gconv_db.c:220: undefined
reference to `__pointer_chk_guard'
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(gconv_db.o): In function
`increment_counter':
/srv/data/clfs/clfs-alpha/sources/glibc-2.7/iconv/gconv_db.c:398: undefined
reference to `__pointer_chk_guard'
/srv/data/clfs/clfs-alpha/sources/glibc-build/libc.a(gconv_db.o):/srv/data/clfs/clfs-alpha/sources/glibc-2.7/iconv/gconv_db.c:300:
more undefined references to `__pointer_chk_guard' follow
collect2: ld returned 1 exit status
make[2]: *** [/srv/data/clfs/clfs-alpha/sources/glibc-build/elf/sln] Error 1
make[2]: Leaving directory `/srv/data/clfs/clfs-alpha/sources/glibc-2.7/elf'
make[1]: *** [elf/others] Error 2
make[1]: Leaving directory `/srv/data/clfs/clfs-alpha/sources/glibc-2.7'
make: *** [all] Error 2
Comment 4 Oliver Falk 2007-10-29 09:40:13 UTC
(In reply to comment #1)
> No idea what's going on, the report doesn't have enough information.

I think the full build log does contain everything and although my explanation
wasn't very comprehensive and well written, since I was in a hurry, I think it
contains everything you need.
Comment 5 Pierre Habouzit 2007-11-02 08:20:41 UTC
Subject: Re:  glibc 2.7 compilation problem on alpha due to PTR_MANGLE and PTR_DEMANGLE

On Sun, Oct 28, 2007 at 09:47:59PM +0000, jciccone at gmail dot com wrote:
> 
> ------- Additional Comments From jciccone at gmail dot com  2007-10-28 19:47 -------
> Created an attachment (id=2062)
>  --> (http://sourceware.org/bugzilla/attachment.cgi?id=2062&action=view)
> patch that moves PTR_MANGLE for alpha

> Also, in every architecture besides alpha, the #if defined NOT_IN_libc &&
> defined IS_IN_rtld contition has #else. alpha has a #elif defined PIC. The
> attached patch changes that #elif defined PIC to a #else.

  The thing is, in non PIC mode, rtld.o is not in the libc.a (or hasn't
the symbol that the libc uses for PTR_MANGLE which is the same), so PIC
is definitely special cased.

  Attached is a patch that fixes the issue for Debian, and let alpha
build, at the expense of disabling MANGLING in the non PIC case, but
googling showed that the issue is known, and that nobody really cares
about it.

--- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h
+++ glibc-2.7/sysdeps/unix/alpha/sysdep.h
@@ -397,42 +397,4 @@
 	_sc_ret = _sc_0, _sc_err = _sc_19;			\
 }
 
-/* Pointer mangling support.  Note that tls access is slow enough that
-   we don't deoptimize things by placing the pointer check value there.  */
-
-#include <stdint.h>
-
-#if defined NOT_IN_libc && defined IS_IN_rtld
-# ifdef __ASSEMBLER__
-#  define PTR_MANGLE(dst, src, tmp)				\
-	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
-	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
-	xor	src, tmp, dst
-#  define PTR_MANGLE2(dst, src, tmp)				\
-	xor	src, tmp, dst
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
-#  define PTR_MANGLE(var)	\
-  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-# endif
-#elif defined PIC
-# ifdef __ASSEMBLER__
-#  define PTR_MANGLE(dst, src, tmp)		\
-	ldq	tmp, __pointer_chk_guard;	\
-	xor	src, tmp, dst
-#  define PTR_MANGLE2(dst, src, tmp)		\
-	xor	src, tmp, dst
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard attribute_relro;
-#  define PTR_MANGLE(var)	\
-	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-# endif
-#endif
-
 #endif /* ASSEMBLER */
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -98,4 +98,46 @@
 	INTERNAL_SYSCALL1(name, err_out, nr, args);			\
 })
 
+/* Pointer mangling support.  Note that tls access is slow enough that
+   we don't deoptimize things by placing the pointer check value there.  */
+
+#if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, tmp)				\
+	ldah	tmp, __pointer_chk_guard_local($29) !gprelhigh;	\
+	ldq	tmp, __pointer_chk_guard_local(tmp) !gprellow;	\
+	xor	src, tmp, dst
+#  define PTR_MANGLE2(dst, src, tmp)				\
+	xor	src, tmp, dst
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
+#  define PTR_MANGLE(var)	\
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
+# endif
+#elif defined PIC
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, tmp)		\
+	ldq	tmp, __pointer_chk_guard;	\
+	xor	src, tmp, dst
+#  define PTR_MANGLE2(dst, src, tmp)		\
+	xor	src, tmp, dst
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard attribute_relro;
+#  define PTR_MANGLE(var)	\
+	(var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
+# endif
+#else
+/* Pointer mangling is not yet supported for static libc on alpha.  */
+# ifndef __ASSEMBLER__
+#  define PTR_MANGLE(var)   (void) (var)
+#  define PTR_DEMANGLE(var) (void) (var)
+# endif
+#endif
+
 #endif /* _LINUX_ALPHA_SYSDEP_H */
Comment 6 Ulrich Drepper 2008-11-26 23:27:59 UTC
Alpha is not in the main tree anymore since we have no maintainer.  Somebody has
to step up and volunteer to be the maintainer of the alpha ports tree or nothing
will happen.
Comment 7 Oliver Falk 2008-11-27 09:24:11 UTC
(In reply to comment #6)
> Alpha is not in the main tree anymore since we have no maintainer.  Somebody has
> to step up and volunteer to be the maintainer of the alpha ports tree or nothing
> will happen.

Well. What do you want to say?
* I cannot add patches to Fedora; policy doesn't allow
* I cannot send patches to bugzilla; Noone will care

So what shall I do?

What skills will glibc alpha tree maintainer need? Maybe I have to do it myself,
if nobody else steps up, because the current situation is acceptable...
Comment 8 Oliver Falk 2008-12-10 10:08:28 UTC
ping.
Comment 9 Oliver Falk 2008-12-15 16:11:10 UTC
ping ping ping.

I don't want to waste your time. But this is important!
Comment 10 Greg Chandler 2009-01-06 22:15:58 UTC
I've been working to port a few things to mips/alpha/hppa, and I'm running into
this too. {specifically on the alpha}
I've applied the patch attached here and it fixed some of my issues, but still
get the attached build errors.  

I've looked at the header, but don't know what exactly the defines are messing
with.  Can I set a #define that will be a temporary work around for this so the
correct case will get __pointer_chk_guard into the mix?




make[3]: Entering directory `/build/glibc-2.7/elf'
make subdir=csu -C ../csu ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Make
                                                                        file -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-check_fds.os rtld-errno.os       
                                                                  rtld-sysdep.os'
/build/glibc-2.7/build-glibc-2.7/libc.a(setjmp.o): In function `__sigsetjmp':
(.text+0x28): undefined reference to `__pointer_chk_guard'
/build/glibc-2.7/build-glibc-2.7/libc.a(exit.o): In function `exit':
/build/glibc-2.7/stdlib/exit.c:66: undefined reference to `__pointer_chk_guard'
/build/glibc-2.7/build-glibc-2.7/libc.a(cxa_atexit.o): In function `__cxa_atexit
                                                                        ':
/build/glibc-2.7/stdlib/cxa_atexit.c:43: undefined reference to `__pointer_chk_g
                                                                        uard'
/build/glibc-2.7/build-glibc-2.7/libc.a(gconv_db.o): In function `__gconv_releas
                                                                        e_step':
/build/glibc-2.7/iconv/gconv_db.c:220: undefined reference to `__pointer_chk_gua
                                                                        rd'
/build/glibc-2.7/build-glibc-2.7/libc.a(gconv_db.o): In function `increment_coun
                                                                        ter':
/build/glibc-2.7/iconv/gconv_db.c:398: undefined reference to `__pointer_chk_gua
                                                                        rd'
/build/glibc-2.7/build-glibc-2.7/libc.a(gconv_db.o):/build/glibc-2.7/iconv/gconv
                                                                       
_db.c:300: more undefined references to `__pointer_chk_guard' follow
collect2: ld returned 1 exit status
make[2]: *** [/build/glibc-2.7/build-glibc-2.7/elf/sln] Error 1
make subdir=dirent -C ../dirent ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-opendir.os rtld-clos 
                                                                       edir.os
rtld-readdir.os rtld-getdents.os'
make[2]: *** Waiting for unfinished jobs....
make[4]: Entering directory `/build/glibc-2.7/csu'
make[4]: Leaving directory `/build/glibc-2.7/csu'
make subdir=gmon -C ../gmon ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Ma
                                                                        kefile
-f ../elf/rtld-Rules rtld-all rtld-modules='rtld-profil.os rtld-prof-freq      
                                                                  .os'
make[4]: Entering directory `/build/glibc-2.7/dirent'
make subdir=gnulib -C ../gnulib ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-divl.os rtld-divq.os 
                                                                       
rtld-divqu.os rtld-remqu.os'
make[4]: Leaving directory `/build/glibc-2.7/dirent'
make[4]: Entering directory `/build/glibc-2.7/gmon'
make[4]: Entering directory `/build/glibc-2.7/csu'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/csu'
make subdir=io -C ../io ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Makefi
                                                                        le -f
../elf/rtld-Rules rtld-all rtld-modules='rtld-xstat.os rtld-fxstat.os rtld     
                                                                   -open.os
rtld-close.os rtld-read.os rtld-write.os rtld-access.os rtld-fcntl.os r        
                                                                tld-getcwd.os
rtld-readlink.os rtld-xstatconv.os rtld-lxstat.os rtld-have_o_cloe             
                                                           xec.os'
make[4]: Leaving directory `/build/glibc-2.7/gmon'
make[4]: Entering directory `/build/glibc-2.7/gnulib'
make[4]: Leaving directory `/build/glibc-2.7/gnulib'
make[4]: Entering directory `/build/glibc-2.7/dirent'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/dirent'
make subdir=misc -C ../misc ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Ma
                                                                        kefile
-f ../elf/rtld-Rules rtld-all rtld-modules='rtld-getpagesize.os rtld-mmap      
                                                                  .os
rtld-munmap.os rtld-mprotect.os rtld-llseek.os'
make[4]: Entering directory `/build/glibc-2.7/gmon'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/gmon'
make subdir=nptl -C ../nptl ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Ma
                                                                        kefile
-f ../elf/rtld-Rules rtld-all rtld-modules='rtld-libc-cancellation.os rtl      
                                                                 
d-libc_multiple_threads.os rtld-forward.os rtld-libc-lowlevellock.os'
make[4]: Entering directory `/build/glibc-2.7/io'
make[4]: Entering directory `/build/glibc-2.7/gnulib'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/gnulib'
make subdir=posix -C ../posix ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f
                                                                        
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-uname.os rtld-_exit.os
                                                                        
rtld-getpid.os rtld-getuid.os rtld-geteuid.os rtld-getgid.os rtld-getegid.os rt
                                                                       
ld-environ.os'
make[4]: Leaving directory `/build/glibc-2.7/io'
make[4]: Entering directory `/build/glibc-2.7/misc'
make[4]: Leaving directory `/build/glibc-2.7/misc'
make[4]: Entering directory `/build/glibc-2.7/posix'
make[4]: Leaving directory `/build/glibc-2.7/posix'
make[4]: Entering directory `/build/glibc-2.7/io'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/io'
make subdir=setjmp -C ../setjmp ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setjmp.os rtld-__lon 
                                                                       gjmp.os'
make[4]: Entering directory `/build/glibc-2.7/misc'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/misc'
make subdir=signal -C ../signal ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-sigaction.os rtld-rt 
                                                                      
_sigaction.os'
make[4]: Entering directory `/build/glibc-2.7/setjmp'
make[4]: Leaving directory `/build/glibc-2.7/setjmp'
make[4]: Entering directory `/build/glibc-2.7/nptl'
make[4]: Entering directory `/build/glibc-2.7/posix'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/posix'
make subdir=stdlib -C ../stdlib ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-exit.os rtld-cxa_ate 
                                                                       xit.os'
make[4]: Entering directory `/build/glibc-2.7/signal'
make[4]: Leaving directory `/build/glibc-2.7/signal'
make[4]: Leaving directory `/build/glibc-2.7/nptl'
make[4]: Entering directory `/build/glibc-2.7/setjmp'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/setjmp'
make subdir=string -C ../string ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -
                                                                        f
Makefile -f ../elf/rtld-Rules rtld-all rtld-modules='rtld-strchr.os rtld-strcm 
                                                                       p.os
rtld-strlen.os rtld-strnlen.os rtld-memchr.os rtld-memcmp.os rtld-memmove.o    
                                                                    s
rtld-memset.os rtld-mempcpy.os rtld-stpcpy.os rtld-memcpy.os rtld-wordcopy.os  
                                                                      
rtld-rawmemchr.os rtld-stxcpy.os rtld-strcpy.os'
make[4]: Entering directory `/build/glibc-2.7/stdlib'
make[4]: Entering directory `/build/glibc-2.7/string'
make[4]: Entering directory `/build/glibc-2.7/signal'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/signal'
make subdir=time -C ../time ..=../ objdir=/build/glibc-2.7/build-glibc-2.7 -f Ma
                                                                        kefile
-f ../elf/rtld-Rules rtld-all rtld-modules='rtld-setitimer.os'
make[4]: Leaving directory `/build/glibc-2.7/stdlib'
make[4]: Leaving directory `/build/glibc-2.7/string'
make[4]: Entering directory `/build/glibc-2.7/time'
make[4]: Leaving directory `/build/glibc-2.7/time'
make[4]: Entering directory `/build/glibc-2.7/stdlib'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/stdlib'
make[4]: Entering directory `/build/glibc-2.7/string'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/string'
make[4]: Entering directory `/build/glibc-2.7/time'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/time'
make[4]: Entering directory `/build/glibc-2.7/nptl'
make[4]: Nothing to be done for `rtld-all'.
make[4]: Leaving directory `/build/glibc-2.7/nptl'
make[3]: Leaving directory `/build/glibc-2.7/elf'
make[2]: Leaving directory `/build/glibc-2.7/elf'
make[1]: *** [elf/others] Error 2
make[1]: Leaving directory `/build/glibc-2.7'
make: *** [all] Error 2
Comment 11 Oliver Falk 2009-01-07 07:54:11 UTC
Greg. I have a few more patches for 2.9.
Maybe the PTR_MANGLE is also outdated already for the latest 2.7.
I'll attach all patches that I have for 2.9 at the moment.
Comment 12 Oliver Falk 2009-01-07 07:55:28 UTC
Created attachment 3639 [details]
Patch from Mike Frysinger <vapier@gentoo.org> fixing some asm incl
Comment 13 Oliver Falk 2009-01-07 07:56:19 UTC
Created attachment 3640 [details]
alpha does not have a __NR_creat

http://bugs.gentoo.org/227275
http://sourceware.org/bugzilla/show_bug.cgi?id=6650
Comment 14 Oliver Falk 2009-01-07 07:57:05 UTC
Created attachment 3641 [details]
dl_support incl fix
Comment 15 Oliver Falk 2009-01-07 07:57:50 UTC
Created attachment 3642 [details]
Pointer mangling support fix

I guess this is newer than the one already attached...
Comment 16 Oliver Falk 2009-01-07 07:58:50 UTC
Please note. The currently attached patches do work for 2.9. I'm currently
unsure which patches you'll need for 2.7..
Comment 17 Greg Chandler 2009-01-07 16:34:15 UTC
Well I found one for 2.7 that was almost identical to the one attached, I kicked
off the compile last night and let it rip, and it seems to have worked.  
The difference seems to be the "elif defined PIC" section.
I'm also assuming with this particular patch this bug migh be marked fixed.
This is it:

--- glibc-2.7.orig/sysdeps/unix/alpha/sysdep.h
+++ glibc-2.7/sysdeps/unix/alpha/sysdep.h
@@ -397,42 +397,4 @@
        _sc_ret = _sc_0, _sc_err = _sc_19;                      \
 }

-/* Pointer mangling support.  Note that tls access is slow enough that
-   we don't deoptimize things by placing the pointer check value there.  */
-
-#include <stdint.h>
-
-#if defined NOT_IN_libc && defined IS_IN_rtld
-# ifdef __ASSEMBLER__
-#  define PTR_MANGLE(dst, src, tmp)                            \
-       ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
-       ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
-       xor     src, tmp, dst
-#  define PTR_MANGLE2(dst, src, tmp)                           \
-       xor     src, tmp, dst
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
-#  define PTR_MANGLE(var)      \
-  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-# endif
-#elif defined PIC
-# ifdef __ASSEMBLER__
-#  define PTR_MANGLE(dst, src, tmp)            \
-       ldq     tmp, __pointer_chk_guard;       \
-       xor     src, tmp, dst
-#  define PTR_MANGLE2(dst, src, tmp)           \
-       xor     src, tmp, dst
-#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
-#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
-# else
-extern uintptr_t __pointer_chk_guard attribute_relro;
-#  define PTR_MANGLE(var)      \
-       (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
-#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
-# endif
-#endif
-
 #endif /* ASSEMBLER */
--- glibc-2.7.orig/sysdeps/unix/sysv/linux/alpha/sysdep.h
+++ glibc-2.7/sysdeps/unix/sysv/linux/alpha/sysdep.h
@@ -98,4 +98,46 @@
        INTERNAL_SYSCALL1(name, err_out, nr, args);                     \
 })

+/* Pointer mangling support.  Note that tls access is slow enough that
+   we don't deoptimize things by placing the pointer check value there.  */
+
+#if defined NOT_IN_libc && defined IS_IN_rtld
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, tmp)                            \
+       ldah    tmp, __pointer_chk_guard_local($29) !gprelhigh; \
+       ldq     tmp, __pointer_chk_guard_local(tmp) !gprellow;  \
+       xor     src, tmp, dst
+#  define PTR_MANGLE2(dst, src, tmp)                           \
+       xor     src, tmp, dst
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard_local attribute_relro attribute_hidden;
+#  define PTR_MANGLE(var)      \
+  (var) = (__typeof (var)) ((uintptr_t) (var) ^ __pointer_chk_guard_local)
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
+# endif
+#elif defined PIC
+# ifdef __ASSEMBLER__
+#  define PTR_MANGLE(dst, src, tmp)            \
+       ldq     tmp, __pointer_chk_guard;       \
+       xor     src, tmp, dst
+#  define PTR_MANGLE2(dst, src, tmp)           \
+       xor     src, tmp, dst
+#  define PTR_DEMANGLE(dst, tmp)   PTR_MANGLE(dst, dst, tmp)
+#  define PTR_DEMANGLE2(dst, tmp)  PTR_MANGLE2(dst, dst, tmp)
+# else
+extern uintptr_t __pointer_chk_guard attribute_relro;
+#  define PTR_MANGLE(var)      \
+       (var) = (void *) ((uintptr_t) (var) ^ __pointer_chk_guard)
+#  define PTR_DEMANGLE(var)  PTR_MANGLE(var)
+# endif
+#else
+/* Pointer mangling is not yet supported for static libc on alpha.  */
+# ifndef __ASSEMBLER__
+#  define PTR_MANGLE(var)   (void) (var)
+#  define PTR_DEMANGLE(var) (void) (var)
+# endif
+#endif
+
 #endif /* _LINUX_ALPHA_SYSDEP_H */
Comment 18 Oliver Falk 2009-01-08 08:54:41 UTC
Alright. If that works for you that's fine.

There's still the question who is going to put the 2.9 patches into upstream
sources?

Since there's no glibc alpha maintainer? *cry*
Comment 19 Matt Turner 2010-05-04 02:28:28 UTC
Richard Henderson fixed this with commit ee390edfa9 to glibc-ports.git. Marking
as fixed.