summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Hatle <mark.hatle@windriver.com>2011-07-26 14:17:11 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2011-07-27 15:45:48 +0100
commitac236b02d9ad43e3122cce7cb92bdbf5deeceabf (patch)
tree62c362fa933d6b1a8ccb3155b3b6ed205a43e022
parente17f834f16c0a5e5f6b62c898316b082b6cf7362 (diff)
downloadpoky-ac236b02d9ad43e3122cce7cb92bdbf5deeceabf.tar.gz
eglibc_2.13: Resolve multilib header conflicts
Due to mismatches between various header definitions in i386 and x86_64 we need to overwrite the i386 versions of the headers with their x86_64 equivalents. This can not be done for the syscall.h as it's dynamically generated, so use the header conflict resolution helper for that. (From OE-Core rev: 019a33236f76aacb989e8f37b09b81599c27f296) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-core/eglibc/eglibc-package.inc4
-rw-r--r--meta/recipes-core/eglibc/eglibc_2.13.bb91
2 files changed, 94 insertions, 1 deletions
diff --git a/meta/recipes-core/eglibc/eglibc-package.inc b/meta/recipes-core/eglibc/eglibc-package.inc
index 9e71150ca2..a995f4f610 100644
--- a/meta/recipes-core/eglibc/eglibc-package.inc
+++ b/meta/recipes-core/eglibc/eglibc-package.inc
@@ -86,10 +86,12 @@ SUMMARY_eglibc-utils = "Miscellaneous utilities provided by eglibc"
86DESCRIPTION_eglibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..." 86DESCRIPTION_eglibc-utils = "Miscellaneous utilities including getconf, iconf, locale, gencat, tzselect, zic, rpcinfo, ..."
87DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs" 87DESCRIPTION_libsotruss = "Library to support sotruss which traces calls through PLTs"
88 88
89inherit libc-common 89inherit libc-common multilib_header
90 90
91do_install_append () { 91do_install_append () {
92 rm -f ${D}${sysconfdir}/localtime 92 rm -f ${D}${sysconfdir}/localtime
93
94 oe_multilib_header bits/syscall.h
93} 95}
94 96
95do_install_locale () { 97do_install_locale () {
diff --git a/meta/recipes-core/eglibc/eglibc_2.13.bb b/meta/recipes-core/eglibc/eglibc_2.13.bb
index e88e26664e..41fe7c7df7 100644
--- a/meta/recipes-core/eglibc/eglibc_2.13.bb
+++ b/meta/recipes-core/eglibc/eglibc_2.13.bb
@@ -79,6 +79,97 @@ do_move_ports() {
79 fi 79 fi
80} 80}
81 81
82do_patch_append() {
83 bb.build.exec_func('do_fix_ia_headers', d)
84}
85
86# We need to ensure that all of the i386 and x86_64 headers are identical
87# to support the multilib case. We do this by copying headers from x86_64
88# to i386 directories. Normally when hand building eglibc or a combined
89# system you would build 32-bit, and then overwrite any files with the x86_64
90# versions.
91#
92# Each time eglibc is updated, this will need to be re-evaluated. In order
93# to do this, disable this function. Build eglibc for a 32-bit and a 64-bit
94# IA32 target. Compare the contents of the include files -- comments specific
95# to the x86_64 version compared to the 32-bit one.
96#
97# For eglibc 2.13, each conflict noted below:
98# bits/a.out.h - Add support for __WORDSIZE = 64
99# bits/byteswap.h - Copyright date mismatch, add support for __WORDSIZE = 64
100# bits/endian.h - Comment mismatch
101# bits/environment.h - add support for __WORDSIZE = 64
102# bits/fcntl.h - Comment/Copyright date mismatch, add support for __WORDSIZE = 64
103# bits/fenv.h - Copyright date mismatch, add support for __WORDSIZE = 64
104# bits/huge_vall.h - Comment/Copyright date mismatch, remove support for older gcc
105# bits/link.h - Function name difference, add x86_64 definitions
106# bits/mathdef.h - Copyright date mismatch, add support for __WORDSIZE = 64
107# bits/mathinline.h - Copyright date mismatch, contributed by mismatch, remove support for older gcc/assembly optimization, add support for __WORDSIZE = 64
108# bits/mman.h - Header/Copyright date mismatch, add MAP_32BIT definition
109# bits/msq.h - Copyright date mismatch, add __WORDSIZE = 32 definitions
110# bits/pthread_type.h -- Contributed by added, add support for __WORDSIZE = 64
111# bits/select.h - Copyright date mismatch, add support for __WORDSIZE = 64
112# bits/semaphore.h - Copyright date mismatch, add support for __WORDSIZE = 64
113# bits/sem.h - Copyright date mismatch
114# bits/setjmp.h - Copyrgiht date mismatch, add support for __WORDSIZE = 64
115# bits/shm.h - Copyright date mismatch, add support for __WORDSIZE = 32
116# bits/sigcontext.h - Copyright date mismatch, license wording mismatch, add support for __WORDSIZE = 32
117# bits/stat.h - Copyright date mismatch, add support for __WORDSIZE = 32 and __WORDSIZE = 64
118# bits/string.h - Header/Copyright date mismatch, remove assembly optimizations
119# bits/syscall.h - different order, some different syscalls listed
120# bits/wchar.h - Change the way the definitions are done
121# bits/wordsize.h - Different header, remove license notice, add __x86_64__ support
122# bits/xtitypes.h - Header difference, different typedef format
123# bits/fpu_control.h - header difference, revised comments, updated assembly macros
124# sys/debugreg.h - Copyright date mismatch, new definition and added __WORDSIZE=64 support
125# sys/epoll.h - Copyright date mismatch, slightly different definitions
126# sys/io.h - Copyright date mismatch, slightly different assembly formats
127# sys/perm.h - Copyright date mismatch
128# sys/procfs.h - Copyright date mismatch, support for __WORDSIZE = 32
129# sys/reg.h - Copyright date mismatch, support for __WORDSIZE = 64
130# sys/ucontext.h - Copyright date mismatch, support for __WORDSIZE = 64
131# sys/user.h - Copyright date mismatch, support for __WORDSIZE = 64
132#
133# we rm something to return to the default version
134#
135do_fix_ia_headers() {
136 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/a.out.h ${S}/sysdeps/unix/sysv/linux/i386/bits/a.out.h
137 cp ${S}/sysdeps/x86_64/bits/byteswap.h ${S}/sysdeps/i386/bits/byteswap.h
138 cp ${S}/sysdeps/x86_64/bits/endian.h ${S}/sysdeps/i386/bits/endian.h
139 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/environments.h ${S}/sysdeps/unix/sysv/linux/i386/bits/environments.h
140 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/fcntl.h ${S}/sysdeps/unix/sysv/linux/i386/bits/fcntl.h
141 cp ${S}/sysdeps/x86_64/fpu/bits/fenv.h ${S}/sysdeps/i386/fpu/bits/fenv.h
142 rm ${S}/sysdeps/i386/bits/huge_vall.h
143 cp ${S}/sysdeps/x86_64/bits/link.h ${S}/sysdeps/i386/bits/link.h
144 cp ${S}/sysdeps/x86_64/bits/mathdef.h ${S}/sysdeps/i386/bits/mathdef.h
145 cp ${S}/sysdeps/x86_64/fpu/bits/mathinline.h ${S}/sysdeps/i386/fpu/bits/mathinline.h
146 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/mman.h ${S}/sysdeps/unix/sysv/linux/i386/bits/mman.h
147 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/msq.h ${S}/sysdeps/unix/sysv/linux/i386/bits/msq.h
148 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/pthreadtypes.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/pthreadtypes.h
149 cp ${S}/sysdeps/x86_64/bits/select.h ${S}/sysdeps/i386/bits/select.h
150 cp ${S}/nptl/sysdeps/unix/sysv/linux/x86_64/bits/semaphore.h ${S}/nptl/sysdeps/unix/sysv/linux/i386/bits/semaphore.h
151 rm ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sem.h
152 cp ${S}/sysdeps/x86_64/bits/setjmp.h ${S}/sysdeps/i386/bits/setjmp.h
153 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/shm.h ${S}/sysdeps/unix/sysv/linux/i386/bits/shm.h
154 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/sigcontext.h ${S}/sysdeps/unix/sysv/linux/i386/bits/sigcontext.h
155 cp ${S}/sysdeps/unix/sysv/linux/x86_64/bits/stat.h ${S}/sysdeps/unix/sysv/linux/i386/bits/stat.h
156 rm ${S}/sysdeps/i386/i486/bits/string.h ; cp ${S}/sysdeps/x86_64/bits/string.h ${S}/sysdeps/i386/bits/string.h
157 # Skip syscall.h, see do_install
158 rm ${S}/sysdeps/unix/sysv/linux/i386/bits/wchar.h
159 cp ${S}/sysdeps/x86_64/bits/wordsize.h ${S}/sysdeps/i386/bits/wordsize.h
160 cp ${S}/sysdeps/x86_64/bits/xtitypes.h ${S}/sysdeps/i386/bits/xtitypes.h
161 # i386 version is correct, x86_64 is incorrect for fpu_control.h
162 cp ${S}/sysdeps/i386/fpu_control.h ${S}/sysdeps/x86_64/fpu_control.h
163 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/debugreg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/debugreg.h
164 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/epoll.h ${S}/sysdeps/unix/sysv/linux/i386/sys/epoll.h
165 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/io.h ${S}/sysdeps/unix/sysv/linux/i386/sys/io.h
166 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/perm.h ${S}/sysdeps/unix/sysv/linux/i386/sys/perm.h
167 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/procfs.h ${S}/sysdeps/unix/sysv/linux/i386/sys/procfs.h
168 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/reg.h ${S}/sysdeps/unix/sysv/linux/i386/sys/reg.h
169 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/ucontext.h ${S}/sysdeps/unix/sysv/linux/i386/sys/ucontext.h
170 cp ${S}/sysdeps/unix/sysv/linux/x86_64/sys/user.h ${S}/sysdeps/unix/sysv/linux/i386/sys/user.h
171}
172
82do_configure () { 173do_configure () {
83# override this function to avoid the autoconf/automake/aclocal/autoheader 174# override this function to avoid the autoconf/automake/aclocal/autoheader
84# calls for now 175# calls for now