summaryrefslogtreecommitdiff
path: root/packages/glibc
diff options
context:
space:
mode:
authorThomas Kunze <thommycheck@gmx.de>2008-03-27 22:52:19 +0000
committerThomas Kunze <thommycheck@gmx.de>2008-03-27 22:52:19 +0000
commitc387c55213338679b3dee7c4e6c97f01b4806c6a (patch)
tree8c0f5568e78c373f9000251cd9fcaa7f6e418048 /packages/glibc
parente6dc7f865766178bd2aa9514eac2431d1cc0187a (diff)
parent6e80b7ada5b0175f0a97a7b3787ce059e8960bbe (diff)
merge of '42f9a5d8cedd5c5de2a24d72c0f84b019e7a5246'
and 'c474f6f48b0333b791017b2d12c15831e6d2b873'
Diffstat (limited to 'packages/glibc')
-rw-r--r--packages/glibc/glibc-2.3.6/.mtn2git_empty0
-rw-r--r--packages/glibc/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch28
-rw-r--r--packages/glibc/glibc-2.3.6/glibc-2.3.6-bind-already-defined-on-powerpc.patch65
-rw-r--r--packages/glibc/glibc-2.3.6/glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch28
-rw-r--r--packages/glibc/glibc-2.3.6/late-install-loop-break.patch29
-rw-r--r--packages/glibc/glibc-initial_2.3.6.bb4
-rw-r--r--packages/glibc/glibc-intermediate_2.3.6.bb2
-rw-r--r--packages/glibc/glibc_2.3.6.bb89
8 files changed, 245 insertions, 0 deletions
diff --git a/packages/glibc/glibc-2.3.6/.mtn2git_empty b/packages/glibc/glibc-2.3.6/.mtn2git_empty
new file mode 100644
index 0000000000..e69de29bb2
--- /dev/null
+++ b/packages/glibc/glibc-2.3.6/.mtn2git_empty
diff --git a/packages/glibc/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch b/packages/glibc/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch
new file mode 100644
index 0000000000..4348d6f5d0
--- /dev/null
+++ b/packages/glibc/glibc-2.3.6/glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch
@@ -0,0 +1,28 @@
+fixes
+
+{BUILD_DIR}/build-glibc/csu/crtn.o: In function "dummy":
+{BUILD_DIR}/build-glibc/csu/crtn.S:14: multiple definition of "dummy"
+{BUILD_DIR}/build-glibc/csu/crti.o:{BUILD_DIR}/build-glibc/csu/crti.S:33: first defined here
+{BUILD_DIR}/build-glibc/csu/crtn.o: In function "_init":
+{BUILD_DIR}/build-glibc/csu/crtn.S:30: multiple definition of "_init"
+{BUILD_DIR}/build-glibc/csu/crti.o:{BUILD_DIR}/build-glibc/csu/crti.S:65: first defined here
+{BUILD_DIR}/build-glibc/csu/crtn.o: In function "_fini":
+{BUILD_DIR}/build-glibc/csu/crtn.S:25: multiple definition of "_fini"
+{BUILD_DIR}/build-glibc/csu/crti.o:{BUILD_DIR}/build-glibc/csu/crti.S:38: first defined here
+{BUILD_DIR}/build-glibc/csu/crti.o: In function "_fini":
+{BUILD_DIR}/build-glibc/csu/crti.S:(.init+0x20): undefined reference to "i_am_not_a_leaf"
+{BUILD_DIR}/build-glibc/csu/crtn.o: In function "_fini":
+{BUILD_DIR}/build-glibc/csu/crtn.S:(.init+0x40): undefined reference to "i_am_not_a_leaf"
+{BUILD_DIR}/build-glibc/csu/crtn.S:(.init+0x44): undefined reference to "i_am_not_a_leaf"
+
+--- glibc-2.3.6/sysdeps/powerpc/powerpc32/Makefile.org 2006-08-21 19:03:01.000000000 -0700
++++ glibc-2.3.6/sysdeps/powerpc/powerpc32/Makefile 2006-08-21 19:03:19.000000000 -0700
+@@ -21,7 +21,7 @@
+ ifneq ($(elf),no)
+ # The initfini generation code doesn't work in the presence of -fPIC, so
+ # we use -fpic instead which is much better.
+-CFLAGS-initfini.s = -g0 -fpic -O1
++CFLAGS-initfini.s = -g0 -fpic -O1 $(fno-unit-at-a-time)
+
+ # There is no benefit to using sdata for these objects, and the user
+ # of the library should be able to control what goes into sdata.
diff --git a/packages/glibc/glibc-2.3.6/glibc-2.3.6-bind-already-defined-on-powerpc.patch b/packages/glibc/glibc-2.3.6/glibc-2.3.6-bind-already-defined-on-powerpc.patch
new file mode 100644
index 0000000000..9938ef6973
--- /dev/null
+++ b/packages/glibc/glibc-2.3.6/glibc-2.3.6-bind-already-defined-on-powerpc.patch
@@ -0,0 +1,65 @@
+Fixes "Error: symbol `__bind' is already defined" error when building for PowerPC
+
+Patch taken from http://bugs.debian.org/343571
+
+
+--- x/sysdeps/powerpc/powerpc32/fpu/s_lround.S 2004-06-30 17:29:12.000000000 -0500
++++ x/sysdeps/powerpc/powerpc32/fpu/s_lround.S 2005-11-18 16:48:11.000000000 -0600
+@@ -88,7 +79,6 @@
+ b .L9
+ END (__lround)
+
+-strong_alias (__lround, __lround)
+ weak_alias (__lround, lround)
+
+ strong_alias (__lround, __lroundf)
+--- x/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S 2005-12-16 01:04:21.000000000 -0600
++++ x/sysdeps/unix/sysv/linux/powerpc/powerpc32/socket.S 2005-12-16 01:06:26.000000000 -0600
+@@ -42,7 +42,11 @@
+ #define stackblock 20
+
+ #ifndef __socket
+-#define __socket P(__,socket)
++# ifndef NO_WEAK_ALIAS
++# define __socket P(__,socket)
++# else
++# define __socket socket
++# endif
+ #endif
+
+ .text
+@@ -116,4 +120,6 @@
+
+ PSEUDO_END (__socket)
+
++#ifndef NO_WEAK_ALIAS
+ weak_alias (__socket, socket)
++#endif
+--- x/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S 2005-12-16 01:08:45.000000000 -0600
++++ x/sysdeps/unix/sysv/linux/powerpc/powerpc64/socket.S 2005-12-16 01:09:32.000000000 -0600
+@@ -41,12 +41,12 @@
+
+ #define stackblock 80 /* offset to socket parm area. */
+
+-#ifndef socket
+-/* If this is just socket.S leave it alone! */
+-#else
+ #ifndef __socket
+-#define __socket P(__,socket)
+-#endif
++# ifndef NO_WEAK_ALIAS
++# define __socket P(__,socket)
++# else
++# define __socket socket
++# endif
+ #endif
+
+ .text
+@@ -120,4 +120,6 @@
+ cfi_endproc
+ PSEUDO_END (__socket)
+
++#ifndef NO_WEAK_ALIAS
+ weak_alias (__socket, socket)
++#endif
+
diff --git a/packages/glibc/glibc-2.3.6/glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch b/packages/glibc/glibc-2.3.6/glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch
new file mode 100644
index 0000000000..9976eccef9
--- /dev/null
+++ b/packages/glibc/glibc-2.3.6/glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch
@@ -0,0 +1,28 @@
+fixes
+
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.o: In function "dummy":
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.S:14: multiple definition of "dummy"
+{BUILD_DIR}/build-glibc/linuxthreads/crti.o:{BUILD_DIR}/build-glibc/linuxthreads/crti.S:33: first defined here
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.o: In function "_fini":
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.S:30: multiple definition of "_fini"
+{BUILD_DIR}/build-glibc/linuxthreads/crti.o:{BUILD_DIR}/build-glibc/linuxthreads/crti.S:65: first defined here
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.o: In function "_init":
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.S:23: multiple definition of "_init"
+{BUILD_DIR}/build-glibc/linuxthreads/crti.o:{BUILD_DIR}/build-glibc/linuxthreads/crti.S:37: first defined here
+{BUILD_DIR}/build-glibc/linuxthreads/crti.o: In function "_fini":
+{BUILD_DIR}/build-glibc/linuxthreads/crti.S:(.text+0x70): undefined reference to "i_am_not_a_leaf"
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.o: In function "_fini":
+{BUILD_DIR}/build-glibc/linuxthreads/crtn.S:(.text+0x38): undefined reference to "i_am_not_a_leaf"
+collect2: ld returned 1 exit status
+
+--- glibc-2.3.6/linuxthreads/sysdeps/powerpc/Makefile.org 2003-02-17 20:33:17.000000000 +0000
++++ glibc-2.3.6/linuxthreads/sysdeps/powerpc/Makefile 2007-04-04 16:26:01.969067632 +0100
+@@ -1,6 +1,6 @@
+ ifeq ($(subdir):$(elf),linuxthreads:yes)
+ # See CFLAGS-initfini.s above; this is the same code.
+-CFLAGS-pt-initfini.s = -g0 -fpic -O1
++CFLAGS-pt-initfini.s = -g0 -fpic -O1 $(fno-unit-at-a-time)
+ endif
+ ifeq ($(subdir),csu)
+ gen-as-const-headers += tcb-offsets.sym
+
diff --git a/packages/glibc/glibc-2.3.6/late-install-loop-break.patch b/packages/glibc/glibc-2.3.6/late-install-loop-break.patch
new file mode 100644
index 0000000000..fc7d8b31e6
--- /dev/null
+++ b/packages/glibc/glibc-2.3.6/late-install-loop-break.patch
@@ -0,0 +1,29 @@
+--- glibc-2.3.6/Makerules Sat Sep 8 22:59:54 2007
++++ glibc-2.3.6/Makerules Sun Sep 9 01:04:29 2007
+@@ -154,26 +154,6 @@
+ common-before-compile = $(before-compile)
+ endif
+
+-ifndef subdir
+-# If a makefile needs to do something conditional on something that
+-# can only be figured out from headers, write a FOO.make.c input
+-# file that uses cpp contructs and contains @@@ LINE @@@ for each LINE
+-# to emit in the generated makefile, and use -include $(common-objpfx)FOO.make.
+-#
+-# We only generate these in the top-level makefile, to avoid any weirdness
+-# from subdir-specific makefile tweaks creeping in on an update.
+-$(common-objpfx)%.make: $(..)%.make.c $(..)Makerules $(common-before-compile)
+- rm -f $@T $@.dT
+- (echo '# Generated from $*.make.c by Makerules.'; \
+- $(CC) $(CFLAGS) $(CPPFLAGS) -E $< \
+- -MD -MP -MT '$$(common-objpfx)$*.make' -MF $@.dT \
+- | sed -n '/@@@/{s/@@@[ ]*\(.*\)@@@/\1/;s/[ ]*$$//p;}'; \
+- echo 'common-generated += $(@F)'; \
+- sed $(sed-remove-objpfx) $(sed-remove-dotdot) $@.dT; \
+- rm -f $@.dT) > $@T
+- mv -f $@T $@
+-endif
+-
+ ifdef subdir
+ sed-remove-dotdot := -e 's@ *\.\.\/\([^ \]*\)@ $$(..)\1@g' \
+ -e 's@^\.\.\/\([^ \]*\)@$$(..)\1@g'
diff --git a/packages/glibc/glibc-initial_2.3.6.bb b/packages/glibc/glibc-initial_2.3.6.bb
new file mode 100644
index 0000000000..8249cd696d
--- /dev/null
+++ b/packages/glibc/glibc-initial_2.3.6.bb
@@ -0,0 +1,4 @@
+require glibc_${PV}.bb
+require glibc-initial.inc
+
+FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-${PV}', '${FILE_DIRNAME}/glibc', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
diff --git a/packages/glibc/glibc-intermediate_2.3.6.bb b/packages/glibc/glibc-intermediate_2.3.6.bb
new file mode 100644
index 0000000000..f7113ba04c
--- /dev/null
+++ b/packages/glibc/glibc-intermediate_2.3.6.bb
@@ -0,0 +1,2 @@
+require glibc_${PV}.bb
+require glibc-intermediate.inc
diff --git a/packages/glibc/glibc_2.3.6.bb b/packages/glibc/glibc_2.3.6.bb
new file mode 100644
index 0000000000..bebc48dfa5
--- /dev/null
+++ b/packages/glibc/glibc_2.3.6.bb
@@ -0,0 +1,89 @@
+require glibc.inc
+
+#FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/glibc-2.3.6', '${FILE_DIRNAME}/orig/glibc', '${FILE_DIRNAME}/orig/files', '${FILE_DIRNAME}/orig' ], d)}"
+
+GLIBC_ADDONS ?= "linuxthreads"
+
+# ${CROSSTOOL_PATCH_URL}glibc-2.3.5-cygwin.patch;patch=1
+
+CROSSTOOL_PATCH_URL = "http://www.kegel.com/crosstool/crosstool-0.43/patches/glibc-2.3.6/"
+SRC_URI = "ftp://ftp.gnu.org/pub/gnu/glibc/glibc-${PV}.tar.bz2 \
+ ftp://ftp.gnu.org/pub/gnu/glibc/glibc-linuxthreads-${PV}.tar.bz2 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.5-sh-lowlevellock.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.5-sh-memset.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.6-allow-gcc-4.0-arm.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.6-allow-gcc-4.0-elf.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.6-configure-apple-as.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-2.3.6-fix-pr631.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-fp-byteorder.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}glibc-mips-bootstrap-gcc-header-install.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}make-install-lib-all.patch;patch=1 \
+ ${CROSSTOOL_PATCH_URL}maybe/glibc-2.3.6-allow-gcc-4.0-powerpc32.patch;patch=1 \
+ file://glibc-2.3.6-bind-already-defined-on-powerpc.patch;patch=1 \
+ file://glibc-2.3.6-allow-gcc-4.1-powerpc32-initfini.s.patch;patch=1 \
+ file://glibc-2.3.6-linuxthreads-allow-gcc-4.1-powerpc32-initfini.s.patch;patch=1 \
+ file://late-install-loop-break.patch \
+ \
+ file://etc/ld.so.conf \
+ file://generate-supported.mk"
+
+S = "${WORKDIR}/glibc-${PV}"
+B = "${WORKDIR}/build-${TARGET_SYS}"
+
+EXTRA_OECONF = "--enable-kernel=${OLDEST_KERNEL} \
+ --without-cvs --disable-profile --disable-debug --without-gd \
+ --enable-clocale=gnu \
+ --enable-add-ons=${GLIBC_ADDONS} \
+ --with-headers=${STAGING_INCDIR} \
+ ${GLIBC_EXTRA_OECONF}"
+
+EXTRA_OECONF += "${@get_glibc_fpu_setting(bb, d)}"
+
+glibc_do_unpack () {
+ mv "${WORKDIR}/linuxthreads" "${WORKDIR}/linuxthreads_db" "${S}/"
+}
+
+python do_unpack () {
+ bb.build.exec_func('base_do_unpack', d)
+ bb.build.exec_func('glibc_do_unpack', d)
+}
+
+do_configure () {
+# override this function to avoid the autoconf/automake/aclocal/autoheader
+# calls for now
+# don't pass CPPFLAGS into configure, since it upsets the kernel-headers
+# version check and doesn't really help with anything
+ if [ -z "`which rpcgen`" ]; then
+ echo "rpcgen not found. Install glibc-devel."
+ exit 1
+ fi
+ (cd ${S} && gnu-configize) || die "failure in running gnu-configize"
+ CPPFLAGS="" oe_runconf
+}
+
+rpcsvc = "bootparam_prot.x nlm_prot.x rstat.x \
+ yppasswd.x klm_prot.x rex.x sm_inter.x mount.x \
+ rusers.x spray.x nfs_prot.x rquota.x key_prot.x"
+
+do_compile () {
+ # this really is arm specific
+ touch ${S}/sysdeps/arm/framestate.c
+ # -Wl,-rpath-link <staging>/lib in LDFLAGS can cause breakage if another glibc is in staging
+ unset LDFLAGS
+ base_do_compile
+ (
+ cd ${S}/sunrpc/rpcsvc
+ for r in ${rpcsvc}; do
+ h=`echo $r|sed -e's,\.x$,.h,'`
+ rpcgen -h $r -o $h || oewarn "unable to generate header for $r"
+ done
+ )
+}
+
+do_stage_prepend() {
+ ( cd ${S} ; patch -p1 < ${WORKDIR}/late-install-loop-break.patch )
+}
+
+require glibc-stage.inc
+
+require glibc-package.bbclass