This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
How to build glibc2.5 with gcc 4.5
- From: Mirko Banchi <mk dot banchi at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Thu, 14 Jun 2012 14:43:29 +0200
- Subject: How to build glibc2.5 with gcc 4.5
Hi all,
i'll try to build glibc2.5 with gcc 4.5. I get a lot of errors but i was able (i think) to fix some of them. I already applied a patch found here
http://sourceware.org/ml/libc-hacker/2006-11/msg00001.html
to fix extern inline functions and it fixes some problems.
However this is not enough:
Errors form compiler:
1 - i added an AS flag in sysdeps/i386/fpu/Makefile ASFLAGS+=-U__i686 otherwise some .S files doesn't compile because gcc 4.5 defines that macro. I don't know if this could be a problem for other files. Advices?
2 - I got an error in string/memmove.c when this file is included by bcopy.c
bcopy.c:21:0: warning: "memmove" redefined
../string/bits/string3.h:55:0: note: this is the location of the previous definition
In file included from bcopy.c:29:0:
./memmove.c:42:1: error: expected identifier or ‘(’ before ‘void’
./memmove.c:42:1: error: expected ‘)’ before ‘(’ token
./memmove.c:46:1: error: expected identifier or ‘(’ before ‘{’ token
if i try to substitute memmove with another identifier at line 42 (for example xxx) the problem disappear but i expect that will be a linker problem...i can't figure out the reason...some ideas?
3 - i get an error about conflicting types...there is a conflict of types for __readlink_chk and __readlinkat_chk. Those functions are declared in posix/bits/unistd.h and defined in __readlink_chk.c and __readlinkat_chk.c files. Is this a glibc bug?
Errors for linker:
These are the linker errors:
/home/mpc8306/src/glibc-2.5/build/elf/librtld.os: In function `print_statistics':
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2739: undefined reference to `__memcpy_chk'
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2745: undefined reference to `__memcpy_chk'
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2808: undefined reference to `__memcpy_chk'
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2828: undefined reference to `__stack_chk_fail_local'
/home/mpc8306/src/glibc-2.5/build/elf/librtld.os: In function `process_dl_debug':
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2464: undefined reference to `__stack_chk_fail_local'
/home/mpc8306/src/glibc-2.5/build/elf/librtld.os: In function `process_envvars':
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2723: undefined reference to `__stack_chk_fail_local'
/home/mpc8306/src/glibc-2.5/build/elf/librtld.os: In function `dl_main':
/home/mpc8306/src/glibc-2.5/elf/rtld.c:2344: undefined reference to `__stack_chk_fail_local'
/home/mpc8306/src/glibc-2.5/build/elf/librtld.os: In function `_dl_start_final':
/home/mpc8306/src/glibc-2.5/elf/rtld.c:291: undefined reference to `_begin'
/usr/bin/ld: /home/mpc8306/src/glibc-2.5/build/elf/librtld.os: relocation R_386_GOTOFF against undefined hidden symbol `_begin' can not be used when making a shared object
Any help will be appreciated!
Thank you all!
Mirko
--
Mirko Banchi
e-mail: mk.banchi@gmail.com
id-jabber: mk.banchi@jabber.org
PGP key fingerprint:
308F BFB1 4E67 2522 C88E
DC69 7631 52ED 32A5 6456