[oe-commits] org.oe.dev merge of '0088316df3061919a20637a41044dc15844fd050'

mickeyl commit openembedded-commits at lists.openembedded.org
Sat Mar 1 17:16:41 UTC 2008


merge of '0088316df3061919a20637a41044dc15844fd050'
     and 'da5e0ed70f6c251be956cc03725872ed4094d823'

Author: mickeyl at openembedded.org
Branch: org.openembedded.dev
Revision: 578fa0a9d58c7fdf739b61155abf2a0c27b12f50
ViewMTN: http://monotone.openembedded.org/revision/info/578fa0a9d58c7fdf739b61155abf2a0c27b12f50
Files:
1
packages/libgcrypt/libgcrypt_1.2.0.bb
packages/libgcrypt/libgcrypt_1.2.1.bb
packages/libgcrypt/libgcrypt_1.2.2.bb
packages/libgcrypt/libgcrypt_1.2.3.bb
packages/libgcrypt/libgcrypt_1.2.4.bb
packages/libgcrypt/files
packages/libgcrypt/libgcrypt-1.4.0
packages/libgcrypt/files/add-pkgconfig-support.patch
packages/libgcrypt/libgcrypt-1.4.0/add-pkgconfig-support.patch
packages/libgcrypt/libgcrypt.inc
packages/gnutls/gnutls.inc
packages/gnutls/gnutls_1.4.5.bb
packages/gnutls/gnutls_1.6.3.bb
packages/libgcrypt/libgcrypt_1.4.0.bb
packages/gdb/gdb-6.6
packages/ltp/ltp-20080229
packages/rt-tests
packages/gdb/gdb-6.6/early_debug_in_nptl.patch
packages/ltp/ltp-20080229/ballista.patch
packages/ltp/ltp-20080229/cross-compile.patch
packages/ltp/ltp-20080229/ltp-run
packages/ltp/ltp-20080229/posix_shell_compat.patch
packages/ltp/ltp-20080229/runltp-path.patch
packages/ltp/ltp_20080229.bb
packages/rt-tests/rt-tests_0.19.bb
classes/base.bbclass
conf/distro/include/angstrom.inc
packages/gdb/gdb-cross_6.6.bb
packages/gdb/gdb_6.6.bb
packages/linux/linux_2.6.24.bb
packages/mtd/mtd-utils-native.inc
Diffs:

#
# mt diff -r0088316df3061919a20637a41044dc15844fd050 -r578fa0a9d58c7fdf739b61155abf2a0c27b12f50
#
# 
# 
# delete "packages/libgcrypt/libgcrypt_1.2.0.bb"
# 
# delete "packages/libgcrypt/libgcrypt_1.2.1.bb"
# 
# delete "packages/libgcrypt/libgcrypt_1.2.2.bb"
# 
# rename "packages/libgcrypt/libgcrypt_1.2.3.bb"
#     to "packages/libgcrypt/libgcrypt_1.2.4.bb"
# 
# add_dir "packages/libgcrypt/files"
# 
# add_dir "packages/libgcrypt/libgcrypt-1.4.0"
# 
# add_file "packages/libgcrypt/files/add-pkgconfig-support.patch"
#  content [0c9bcfe5f66668cc2d120c1a7fa2da40e5b2942c]
# 
# add_file "packages/libgcrypt/libgcrypt-1.4.0/add-pkgconfig-support.patch"
#  content [5232a01eaab0ce7ff907ea44b68a6b042cc66cf5]
# 
# add_file "packages/libgcrypt/libgcrypt.inc"
#  content [8e21adfdd89aea4f3065efcdd7086b8a9e5e455e]
# 
# patch "packages/gnutls/gnutls.inc"
#  from [684fa353da238f622dd47843a2ab39f725289869]
#    to [542734338d3b2fde137f0cc594490a911647352b]
# 
# patch "packages/gnutls/gnutls_1.4.5.bb"
#  from [789d682a9597f72219be0892eed5b06ff7e24269]
#    to [5db5b87c1a9e8d49c524010294fe8193a1c9cab9]
# 
# patch "packages/gnutls/gnutls_1.6.3.bb"
#  from [d9680357a147ffbb532b44d35e0ba188e067e902]
#    to [870f5fbd7dcbf64dcbea5f197963a11c689cf0d2]
# 
# patch "packages/libgcrypt/libgcrypt_1.2.4.bb"
#  from [b1dae0759fc4781ccd62f97bbf98ed78f9053815]
#    to [aeb06341bebcef5a09a8d2768dda9c4965b14250]
# 
# patch "packages/libgcrypt/libgcrypt_1.4.0.bb"
#  from [b1dae0759fc4781ccd62f97bbf98ed78f9053815]
#    to [aeb06341bebcef5a09a8d2768dda9c4965b14250]
# 
============================================================
--- packages/libgcrypt/files/add-pkgconfig-support.patch	0c9bcfe5f66668cc2d120c1a7fa2da40e5b2942c
+++ packages/libgcrypt/files/add-pkgconfig-support.patch	0c9bcfe5f66668cc2d120c1a7fa2da40e5b2942c
@@ -0,0 +1,62 @@
+diff -Nur libgcrypt-1.2.4/configure.ac libgcrypt11-1.2.4/configure.ac
+--- libgcrypt-1.2.4/configure.ac 2007-02-01 19:41:06.000000000 +0100
++++ libgcrypt11-1.2.4/configure.ac 2007-02-11 13:05:36.000000000 +0100
+@@ -808,6 +808,7 @@
+ src/Makefile
+ src/gcrypt.h
+ src/libgcrypt-config
++src/libgcrypt.pc
+ tests/Makefile
+ w32-dll/Makefile
+ ])
+diff -Nur libgcrypt-1.2.4/src/libgcrypt.pc.in libgcrypt11-1.2.4/src/libgcrypt.pc.in
+--- libgcrypt-1.2.4/src/libgcrypt.pc.in 1970-01-01 01:00:00.000000000 +0100
++++ libgcrypt11-1.2.4/src/libgcrypt.pc.in 2007-02-11 13:03:30.000000000 +0100
+@@ -0,0 +1,32 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} @LIBGCRYPT_CONFIG_LIBS@
++Libs.private: @GPG_ERROR_LIBS@
++Cflags: -I${includedir} @LIBGCRYPT_CONFIG_CFLAGS@ @GPG_ERROR_CFLAGS@
+diff -Nur libgcrypt-1.2.4/src/Makefile.am libgcrypt11-1.2.4/src/Makefile.am
+--- libgcrypt-1.2.4/src/Makefile.am 2006-11-30 16:38:18.000000000 +0100
++++ libgcrypt11-1.2.4/src/Makefile.am 2007-02-11 13:10:03.000000000 +0100
+@@ -27,6 +27,11 @@
+ 
+ lib_LTLIBRARIES = libgcrypt.la
+ 
++# Pkg-config script.
++pkgconfigdir = $(libdir)/pkgconfig
++pkgconfig_DATA = libgcrypt.pc
++DISTCLEANFILES = $(pkgconfig_DATA)
++
+ if HAVE_LD_VERSION_SCRIPT
+   libgcrypt_version_script_cmd = -Wl,--version-script=$(srcdir)/libgcrypt.vers
+ else 
============================================================
--- packages/libgcrypt/libgcrypt-1.4.0/add-pkgconfig-support.patch	5232a01eaab0ce7ff907ea44b68a6b042cc66cf5
+++ packages/libgcrypt/libgcrypt-1.4.0/add-pkgconfig-support.patch	5232a01eaab0ce7ff907ea44b68a6b042cc66cf5
@@ -0,0 +1,49 @@
+Index: libgcrypt-1.4.0/configure.ac
+===================================================================
+--- libgcrypt-1.4.0.orig/configure.ac
++++ libgcrypt-1.4.0/configure.ac
+@@ -1072,6 +1072,7 @@ cipher/Makefile
+ doc/Makefile
+ src/Makefile
+ src/gcrypt.h
++src/libgcrypt.pc
+ src/libgcrypt-config
+ src/versioninfo.rc
+ tests/Makefile
+Index: libgcrypt-1.4.0/src/libgcrypt.pc.in
+===================================================================
+--- /dev/null
++++ libgcrypt-1.4.0/src/libgcrypt.pc.in
+@@ -0,0 +1,32 @@
++# Process this file with autoconf to produce a pkg-config metadata file.
++# Copyright (C) 2002, 2003, 2004, 2005, 2006 Free Software Foundation
++# Author: Simon Josefsson
++#
++# This file is free software; as a special exception the author gives
++# unlimited permission to copy and/or distribute it, with or without
++# modifications, as long as this notice is preserved.
++#
++# This file is distributed in the hope that it will be useful, but
++# WITHOUT ANY WARRANTY, to the extent permitted by law; without even the
++# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
++
++prefix=@prefix@
++exec_prefix=@exec_prefix@
++libdir=@libdir@
++includedir=@includedir@
++
++# API info
++api_version=@LIBGCRYPT_CONFIG_API_VERSION@
++
++# Misc information.
++symmetric_ciphers=@LIBGCRYPT_CIPHERS@
++asymmetric_ciphers=@LIBGCRYPT_PUBKEY_CIPHERS@
++digests=@LIBGCRYPT_DIGESTS@
++
++Name: libgcrypt
++Description: GNU crypto library
++URL: http://www.gnupg.org
++Version: @VERSION@
++Libs: -L${libdir} @LIBGCRYPT_CONFIG_LIBS@
++Libs.private: @GPG_ERROR_LIBS@
++Cflags: -I${includedir} @LIBGCRYPT_CONFIG_CFLAGS@ @GPG_ERROR_CFLAGS@
============================================================
--- packages/libgcrypt/libgcrypt.inc	8e21adfdd89aea4f3065efcdd7086b8a9e5e455e
+++ packages/libgcrypt/libgcrypt.inc	8e21adfdd89aea4f3065efcdd7086b8a9e5e455e
@@ -0,0 +1,22 @@
+DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
+SECTION = "libs"
+PRIORITY = "optional"
+LICENSE = "GPL LGPL FDL"
+DEPENDS = "libgpg-error"
+
+SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz \
+           file://add-pkgconfig-support.patch;patch=1"
+
+inherit autotools binconfig pkgconfig
+
+EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
+
+ARM_INSTRUCTION_SET = "arm"
+
+do_stage() {
+	autotools_stage_all
+}
+
+# move libgcrypt-config into -dev package
+FILES_${PN} = "${libdir}/lib*.so.*"
+FILES_${PN}-dev += "${bindir}"
============================================================
--- packages/gnutls/gnutls.inc	684fa353da238f622dd47843a2ab39f725289869
+++ packages/gnutls/gnutls.inc	542734338d3b2fde137f0cc594490a911647352b
@@ -1,7 +1,6 @@ DEPENDS = "zlib libgcrypt lzo"
 DESCRIPTION = "GNU Transport Layer Security Library"
 HOMEPAGE = "http://www.gnu.org/software/gnutls/"
 DEPENDS = "zlib libgcrypt lzo"
-
 LICENSE = "LGPL"
 
 SRC_URI = "ftp://ftp.gnutls.org/pub/gnutls/gnutls-${PV}.tar.bz2"
@@ -10,6 +9,11 @@ EXTRA_OECONF="--with-included-opencdk --
 
 EXTRA_OECONF="--with-included-opencdk --with-included-libtasn1"
 
+# fix wrong dependency
+do_configure_append() {
+    sed -i s,gcrypt,libgcrypt, lib/gnutls.pc.in
+}
+
 do_stage() {
     oe_libinstall -C lib/.libs -so -a libgnutls ${STAGING_LIBDIR}
     oe_libinstall -C libextra/.libs -so -a libgnutls-extra ${STAGING_LIBDIR}
============================================================
--- packages/gnutls/gnutls_1.4.5.bb	789d682a9597f72219be0892eed5b06ff7e24269
+++ packages/gnutls/gnutls_1.4.5.bb	5db5b87c1a9e8d49c524010294fe8193a1c9cab9
@@ -1,3 +1,3 @@ require gnutls.inc
 require gnutls.inc
 
+PR = "r2"
-PR = "r1"
============================================================
--- packages/gnutls/gnutls_1.6.3.bb	d9680357a147ffbb532b44d35e0ba188e067e902
+++ packages/gnutls/gnutls_1.6.3.bb	870f5fbd7dcbf64dcbea5f197963a11c689cf0d2
@@ -6,4 +6,4 @@ SRC_URI += "\
 	file://configure_madness.patch;patch=1 \
 	"
 
+PR = "r5"
-PR = "r4"
============================================================
--- packages/libgcrypt/libgcrypt_1.2.3.bb	b1dae0759fc4781ccd62f97bbf98ed78f9053815
+++ packages/libgcrypt/libgcrypt_1.2.4.bb	aeb06341bebcef5a09a8d2768dda9c4965b14250
@@ -1,22 +1,3 @@
-DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
-SECTION = "libs"
-PRIORITY = "optional"
-LICENSE = "GPL LGPL FDL"
-DEPENDS = "libgpg-error"
-PR = "r1"
+require libgcrypt.inc
 
+PR = "r2"
-# move libgcrypt-config into -dev package
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${bindir}"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz"
-
-inherit autotools binconfig
-
-EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
-
-ARM_INSTRUCTION_SET = "arm"
-
-do_stage() {
-	autotools_stage_all
-}
============================================================
--- packages/libgcrypt/libgcrypt_1.4.0.bb	b1dae0759fc4781ccd62f97bbf98ed78f9053815
+++ packages/libgcrypt/libgcrypt_1.4.0.bb	aeb06341bebcef5a09a8d2768dda9c4965b14250
@@ -1,22 +1,3 @@
-DESCRIPTION = "A general purpose cryptographic library based on the code from GnuPG"
-SECTION = "libs"
-PRIORITY = "optional"
-LICENSE = "GPL LGPL FDL"
-DEPENDS = "libgpg-error"
-PR = "r1"
+require libgcrypt.inc
 
+PR = "r2"
-# move libgcrypt-config into -dev package
-FILES_${PN} = "${libdir}/lib*.so.*"
-FILES_${PN}-dev += "${bindir}"
-
-SRC_URI = "ftp://ftp.gnupg.org/gcrypt/libgcrypt/libgcrypt-${PV}.tar.gz"
-
-inherit autotools binconfig
-
-EXTRA_OECONF = "--without-pth --disable-asm --with-capabilities"
-
-ARM_INSTRUCTION_SET = "arm"
-
-do_stage() {
-	autotools_stage_all
-}


#
# mt diff -rda5e0ed70f6c251be956cc03725872ed4094d823 -r578fa0a9d58c7fdf739b61155abf2a0c27b12f50
#
# 
# 
# add_dir "packages/gdb/gdb-6.6"
# 
# add_dir "packages/ltp/ltp-20080229"
# 
# add_dir "packages/rt-tests"
# 
# add_file "packages/gdb/gdb-6.6/early_debug_in_nptl.patch"
#  content [6e027b2499da589384a40847de046842934ba44e]
# 
# add_file "packages/ltp/ltp-20080229/ballista.patch"
#  content [03c8fb2c442ea81117b4b7bbb28e2bbb90a31e89]
# 
# add_file "packages/ltp/ltp-20080229/cross-compile.patch"
#  content [031b7228b6e7076d8eea3d23ff2adbf202cd4107]
# 
# add_file "packages/ltp/ltp-20080229/ltp-run"
#  content [92ccd86130ecd17d5e4b78cf161ed64069e14639]
# 
# add_file "packages/ltp/ltp-20080229/posix_shell_compat.patch"
#  content [fa9dc1575c08087c69629f00c1c8fe09d3197290]
# 
# add_file "packages/ltp/ltp-20080229/runltp-path.patch"
#  content [60b2f63bed93e45d756fb82a7caa59d7180f79e3]
# 
# add_file "packages/ltp/ltp_20080229.bb"
#  content [9a5448b41b907e4bb4bd1b02764a6a8c7bdc0f86]
# 
# add_file "packages/rt-tests/rt-tests_0.19.bb"
#  content [c4e7bcc06c49edbbf421e8fd4e9f00cb7fb0fb44]
# 
# patch "classes/base.bbclass"
#  from [cb47f4951ca60041e077ae00509c54961b54d573]
#    to [b37f42836fc2adcb03d14179319ac508313a2b86]
# 
# patch "conf/distro/include/angstrom.inc"
#  from [2519c1b72831f6c678dec86bda400fdbdd069054]
#    to [102341621f020659773a2fbf19e11819013571ad]
# 
# patch "packages/gdb/gdb-cross_6.6.bb"
#  from [9a7805347f8169f59da65f6cb95a2535ac4be50a]
#    to [e8062d29b76f1e8ea94af361684fd7a6ca31ec43]
# 
# patch "packages/gdb/gdb_6.6.bb"
#  from [adec94e411af2e5c3f8afd912c47bd0164f8d3b8]
#    to [0936f1e34522b8b57df91141344f54eef99f5c29]
# 
# patch "packages/linux/linux_2.6.24.bb"
#  from [02d0aff47a49583d0545d170cb8642f122e48c0c]
#    to [46a5e7b5309ef25e6b9107603cef2e2a92f13b03]
# 
# patch "packages/mtd/mtd-utils-native.inc"
#  from [6b5294b10251b0556a0fcb2a554c8fe2022b6438]
#    to [66ddbc0bb10e9069eb84c259f7470a92ef5d7205]
# 
============================================================
--- packages/gdb/gdb-6.6/early_debug_in_nptl.patch	6e027b2499da589384a40847de046842934ba44e
+++ packages/gdb/gdb-6.6/early_debug_in_nptl.patch	6e027b2499da589384a40847de046842934ba44e
@@ -0,0 +1,306 @@
+http://sourceware.org/ml/gdb-patches/2007-06/msg00479.html
+
+Index: gdb/linux-thread-db.c
+===================================================================
+--- gdb/linux-thread-db.c.orig	2006-10-20 03:08:14.000000000 +0200
++++ gdb/linux-thread-db.c	2008-03-01 14:45:52.000000000 +0100
+@@ -213,6 +213,21 @@
+     }
+ }
+ 
++/* Return 1 if any threads have been registered.  There may be none if
++   the threading library is not fully initialized yet.  */
++
++static int
++have_threads_callback (struct thread_info *thread, void *dummy)
++{
++  return 1;
++}
++
++static int
++have_threads (void)
++{
++  return iterate_over_threads (have_threads_callback, NULL) != NULL;
++}
++
+ /* A callback function for td_ta_thr_iter, which we use to map all
+    threads to LWPs.
+ 
+@@ -700,23 +715,6 @@
+ }
+ 
+ static void
+-thread_db_attach (char *args, int from_tty)
+-{
+-  target_beneath->to_attach (args, from_tty);
+-
+-  /* Destroy thread info; it's no longer valid.  */
+-  init_thread_list ();
+-
+-  /* The child process is now the actual multi-threaded
+-     program.  Snatch its process ID...  */
+-  proc_handle.pid = GET_PID (inferior_ptid);
+-
+-  /* ...and perform the remaining initialization steps.  */
+-  enable_thread_event_reporting ();
+-  thread_db_find_new_threads ();
+-}
+-
+-static void
+ detach_thread (ptid_t ptid, int verbose)
+ {
+   struct thread_info *thread_info;
+@@ -742,14 +740,13 @@
+   disable_thread_event_reporting ();
+ 
+   /* There's no need to save & restore inferior_ptid here, since the
+-     inferior is supposed to be survive this function call.  */
++     inferior is not supposed to survive this function call.  */
+   inferior_ptid = lwp_from_thread (inferior_ptid);
+ 
+-  /* Forget about the child's process ID.  We shouldn't need it
+-     anymore.  */
+-  proc_handle.pid = 0;
+-
+   target_beneath->to_detach (args, from_tty);
++
++  /* Should this be done by detach_command?  */
++  target_mourn_inferior ();
+ }
+ 
+ static int
+@@ -870,12 +867,6 @@
+ 
+   ptid = target_beneath->to_wait (ptid, ourstatus);
+ 
+-  if (proc_handle.pid == 0)
+-    /* The current child process isn't the actual multi-threaded
+-       program yet, so don't try to do any special thread-specific
+-       post-processing and bail out early.  */
+-    return ptid;
+-
+   if (ourstatus->kind == TARGET_WAITKIND_EXITED
+     || ourstatus->kind == TARGET_WAITKIND_SIGNALLED)
+     return pid_to_ptid (-1);
+@@ -889,23 +880,32 @@
+       return pid_to_ptid (GET_PID (ptid));
+     }
+ 
++  /* If we do not know about the main thread yet, this would be a good time to
++     find it.  */
++  if (ourstatus->kind == TARGET_WAITKIND_STOPPED && !have_threads ())
++    thread_db_find_new_threads ();
++
+   if (ourstatus->kind == TARGET_WAITKIND_STOPPED
+       && ourstatus->value.sig == TARGET_SIGNAL_TRAP)
+     /* Check for a thread event.  */
+     check_event (ptid);
+ 
+-  if (!ptid_equal (trap_ptid, null_ptid))
+-    trap_ptid = thread_from_lwp (trap_ptid);
++  if (have_threads ())
++    {
++      /* Change ptids back into the higher level PID + TID format.  If
++	 the thread is dead and no longer on the thread list, we will
++	 get back a dead ptid.  This can occur if the thread death
++	 event gets postponed by other simultaneous events.  In such a
++	 case, we want to just ignore the event and continue on.  */
++
++      if (!ptid_equal (trap_ptid, null_ptid))
++	trap_ptid = thread_from_lwp (trap_ptid);
++
++      ptid = thread_from_lwp (ptid);
++      if (GET_PID (ptid) == -1)
++	ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
++    }
+ 
+-  /* Change the ptid back into the higher level PID + TID format.
+-     If the thread is dead and no longer on the thread list, we will 
+-     get back a dead ptid.  This can occur if the thread death event
+-     gets postponed by other simultaneous events.  In such a case, 
+-     we want to just ignore the event and continue on.  */
+-  ptid = thread_from_lwp (ptid);
+-  if (GET_PID (ptid) == -1)
+-    ourstatus->kind = TARGET_WAITKIND_SPURIOUS;
+-  
+   return ptid;
+ }
+ 
+@@ -944,30 +944,6 @@
+ }
+ 
+ static void
+-thread_db_create_inferior (char *exec_file, char *allargs, char **env,
+-			   int from_tty)
+-{
+-  unpush_target (&thread_db_ops);
+-  using_thread_db = 0;
+-  target_beneath->to_create_inferior (exec_file, allargs, env, from_tty);
+-}
+-
+-static void
+-thread_db_post_startup_inferior (ptid_t ptid)
+-{
+-  if (proc_handle.pid == 0)
+-    {
+-      /* The child process is now the actual multi-threaded
+-         program.  Snatch its process ID...  */
+-      proc_handle.pid = GET_PID (ptid);
+-
+-      /* ...and perform the remaining initialization steps.  */
+-      enable_thread_event_reporting ();
+-      thread_db_find_new_threads ();
+-    }
+-}
+-
+-static void
+ thread_db_mourn_inferior (void)
+ {
+   /* Forget about the child's process ID.  We shouldn't need it
+@@ -1002,6 +978,22 @@
+ 
+   ptid = ptid_build (GET_PID (inferior_ptid), ti.ti_lid, ti.ti_tid);
+ 
++  if (ti.ti_tid == 0)
++    {
++      /* A thread ID of zero means that this is the main thread, but
++	 glibc has not yet initialized thread-local storage and the
++	 pthread library.  We do not know what the thread's TID will
++	 be yet.  Just enable event reporting and otherwise ignore
++	 it.  */
++
++      err = td_thr_event_enable_p (th_p, 1);
++      if (err != TD_OK)
++	error (_("Cannot enable thread event reporting for %s: %s"),
++	       target_pid_to_str (ptid), thread_db_err_str (err));
++
++      return 0;
++    }
++
+   if (!in_thread_list (ptid))
+     attach_thread (ptid, th_p, &ti, 1);
+ 
+@@ -1058,6 +1050,16 @@
+   return NULL;
+ }
+ 
++/* Return 1 if this thread has the same LWP as the passed PTID.  */
++
++static int
++same_ptid_callback (struct thread_info *thread, void *arg)
++{
++  ptid_t *ptid_p = arg;
++
++  return GET_LWP (thread->ptid) == GET_LWP (*ptid_p);
++}
++
+ /* Get the address of the thread local variable in load module LM which
+    is stored at OFFSET within the thread local storage for thread PTID.  */
+ 
+@@ -1066,6 +1068,21 @@
+ 				    CORE_ADDR lm,
+ 				    CORE_ADDR offset)
+ {
++  /* If we have not discovered any threads yet, check now.  */
++  if (!is_thread (ptid) && !have_threads ())
++    thread_db_find_new_threads ();
++
++  /* Try to find a matching thread if we still have the LWP ID instead
++     of the thread ID.  */
++  if (!is_thread (ptid))
++    {
++      struct thread_info *thread;
++
++      thread = iterate_over_threads (same_ptid_callback, &ptid);
++      if (thread != NULL)
++	ptid = thread->ptid;
++    }
++
+   if (is_thread (ptid))
+     {
+       td_err_e err;
+@@ -1125,14 +1142,11 @@
+   thread_db_ops.to_shortname = "multi-thread";
+   thread_db_ops.to_longname = "multi-threaded child process.";
+   thread_db_ops.to_doc = "Threads and pthreads support.";
+-  thread_db_ops.to_attach = thread_db_attach;
+   thread_db_ops.to_detach = thread_db_detach;
+   thread_db_ops.to_resume = thread_db_resume;
+   thread_db_ops.to_wait = thread_db_wait;
+   thread_db_ops.to_xfer_partial = thread_db_xfer_partial;
+   thread_db_ops.to_kill = thread_db_kill;
+-  thread_db_ops.to_create_inferior = thread_db_create_inferior;
+-  thread_db_ops.to_post_startup_inferior = thread_db_post_startup_inferior;
+   thread_db_ops.to_mourn_inferior = thread_db_mourn_inferior;
+   thread_db_ops.to_find_new_threads = thread_db_find_new_threads;
+   thread_db_ops.to_pid_to_str = thread_db_pid_to_str;
+Index: gdb/gdbserver/thread-db.c
+===================================================================
+--- gdb/gdbserver/thread-db.c.orig	2006-10-17 18:02:27.000000000 +0200
++++ gdb/gdbserver/thread-db.c	2008-03-01 14:44:41.000000000 +0100
+@@ -40,6 +40,7 @@
+ /* Connection to the libthread_db library.  */
+ static td_thragent_t *thread_agent;
+ 
++static void thread_db_find_new_threads (void);
+ static int find_new_threads_callback (const td_thrhandle_t *th_p, void *data);
+ 
+ static char *
+@@ -134,6 +135,8 @@
+   td_event_msg_t msg;
+   td_err_e err;
+   struct inferior_linux_data *tdata;
++  struct thread_info *inferior;
++  struct process_info *process;
+ 
+   if (debug_threads)
+     fprintf (stderr, "Thread creation event.\n");
+@@ -149,6 +152,14 @@
+     fprintf (stderr, "thread getmsg err: %s\n",
+ 	     thread_db_err_str (err));
+ 
++  /* If we do not know about the main thread yet, this would be a good time to
++     find it.  We need to do this to pick up the main thread before any newly
++     created threads.  */
++  inferior = (struct thread_info *) all_threads.head;
++  process = get_thread_process (inferior);
++  if (process->thread_known == 0)
++    thread_db_find_new_threads ();
++
+   /* msg.event == TD_EVENT_CREATE */
+ 
+   find_new_threads_callback (msg.th_p, NULL);
+@@ -231,8 +242,24 @@
+     {
+       inferior = (struct thread_info *) all_threads.head;
+       process = get_thread_process (inferior);
++
+       if (process->thread_known == 0)
+ 	{
++	  /* If the new thread ID is zero, a final thread ID will be
++	     available later.  Do not enable thread debugging yet.  */
++	  if (ti_p->ti_tid == 0)
++	    {
++	      err = td_thr_event_enable (th_p, 1);
++	      if (err != TD_OK)
++		error ("Cannot enable thread event reporting for %d: %s",
++		       ti_p->ti_lid, thread_db_err_str (err));
++	      return;
++	    }
++
++	  if (process->lwpid != ti_p->ti_lid)
++	    fatal ("PID mismatch!  Expected %ld, got %ld",
++		   (long) process->lwpid, (long) ti_p->ti_lid);
++
+ 	  /* Switch to indexing the threads list by TID.  */
+ 	  change_inferior_id (&all_threads, ti_p->ti_tid);
+ 	  goto found;
+@@ -331,6 +358,8 @@
+ 
+   process = get_thread_process (thread);
+   if (!process->thread_known)
++    thread_db_find_new_threads ();
++  if (!process->thread_known)
+     return TD_NOTHR;
+ 
+   err = td_thr_tls_get_addr (&process->th, (psaddr_t) load_module, offset,
============================================================
--- packages/ltp/ltp-20080229/ballista.patch	03c8fb2c442ea81117b4b7bbb28e2bbb90a31e89
+++ packages/ltp/ltp-20080229/ballista.patch	03c8fb2c442ea81117b4b7bbb28e2bbb90a31e89
@@ -0,0 +1,22 @@
+Index: ltp-full-20080229/testcases/ballista/Makefile
+===================================================================
+--- ltp-full-20080229.orig/testcases/ballista/Makefile	2008-02-29 08:55:46.000000000 +0100
++++ ltp-full-20080229/testcases/ballista/Makefile	2008-03-01 01:21:16.000000000 +0100
+@@ -1,4 +1,4 @@
+-ifeq ($(shell perl -v &> /dev/null && echo yes),yes)
++ifeq ($(shell perl -v > /dev/null && echo yes),yes)
+ 
+ all: bal
+ 
+Index: ltp-full-20080229/testcases/ballista/ballista/Makefile
+===================================================================
+--- ltp-full-20080229.orig/testcases/ballista/ballista/Makefile	2008-03-01 01:21:16.000000000 +0100
++++ ltp-full-20080229/testcases/ballista/ballista/Makefile	2008-03-01 01:22:22.000000000 +0100
+@@ -37,6 +37,7 @@
+ 
+ # build everything by default
+ all : callGen callGen_standAlone genCodeCreator replacer ballista
++	rm blexer bparser mut.out
+ 
+ # run-of-of-the-mill rules for utility programs
+ callGen: callGen.cpp
============================================================
--- packages/ltp/ltp-20080229/cross-compile.patch	031b7228b6e7076d8eea3d23ff2adbf202cd4107
+++ packages/ltp/ltp-20080229/cross-compile.patch	031b7228b6e7076d8eea3d23ff2adbf202cd4107
@@ -0,0 +1,57 @@
+Index: ltp-full-20080229/Makefile
+===================================================================
+--- ltp-full-20080229.orig/Makefile	2008-02-29 08:55:41.000000000 +0100
++++ ltp-full-20080229/Makefile	2008-03-01 01:14:35.000000000 +0100
+@@ -33,11 +33,12 @@
+ endif
+ ifdef CROSS_COMPILER
+ CC=$(CROSS_COMPILER)gcc
++CPP=$(CROSS_COMPILER)g++
+ AR=$(CROSS_COMPILER)ar
+ endif
+ 
+ export CFLAGS += -Wall $(CROSS_CFLAGS)
+-export CC AR LDFLAGS
++export CC AR LDFLAGS CPP
+ 
+ -include config.mk
+ 
+Index: ltp-full-20080229/testcases/ballista/ballista/Makefile
+===================================================================
+--- ltp-full-20080229.orig/testcases/ballista/ballista/Makefile	2008-02-29 08:55:46.000000000 +0100
++++ ltp-full-20080229/testcases/ballista/ballista/Makefile	2008-03-01 01:14:35.000000000 +0100
+@@ -24,7 +24,7 @@
+ ########################
+ 
+ # compiler info for the host
+-CC = g++ -Wno-deprecated
++CC = $(CPP) -Wno-deprecated
+ CFLAGS = -w -O ${TARGET_DEF}
+ CLIBS = -lpthread -ldl -lnsl -rdynamic
+ TEST_MAN_FILE = selfHost
+Index: ltp-full-20080229/testcases/kernel/security/filecaps/Makefile
+===================================================================
+--- ltp-full-20080229.orig/testcases/kernel/security/filecaps/Makefile	2008-03-01 01:14:49.000000000 +0100
++++ ltp-full-20080229/testcases/kernel/security/filecaps/Makefile	2008-03-01 01:15:05.000000000 +0100
+@@ -20,7 +20,6 @@
+ 
+ SCRIPTS = filecapstest.sh checkforlibcap.sh checkforfilecaps.sh
+ ifeq ($(shell sh checkforlibcap.sh yesno),yes)
+-CC=gcc
+ 
+ CFLAGS += -I../../../../include -Wall
+ LDLIBS += -L../../../../lib -lltp -lcap
+@@ -29,11 +28,11 @@
+ TARGETS = $(patsubst %.c,%,$(SRCS))
+ INSTALLTARGETS = $(TARGETS) $(SCRIPTS)
+ all: $(TARGETS)
+-	gcc -o checkforlibcap gotlibcap.c
++	$(CC) -o checkforlibcap gotlibcap.c
+ else
+ all:
+ 	@echo "setcap or xattr headers not installed.  Please install libcap from"; echo "ftp://ftp.kernel.org/pub/linux/libs/security/linux-privs/libcap2"; echo "Then make clean in ltp or ltp/testcases/kernel/security/filecaps, and recompile ltp."
+-	gcc -o checkforlibcap nolibcap.c
++	$(CC) -o checkforlibcap nolibcap.c
+ TARGETS =
+ endif
+ 
============================================================
--- packages/ltp/ltp-20080229/ltp-run	92ccd86130ecd17d5e4b78cf161ed64069e14639
+++ packages/ltp/ltp-20080229/ltp-run	92ccd86130ecd17d5e4b78cf161ed64069e14639
@@ -0,0 +1,4 @@
+#!/bin/sh
+/usr/libexec/ltp/runltp -t 180s > /home/root/testlog.txt
+echo "Benchmark run finished...."
+touch /home/root/testfinished.flag
============================================================
--- packages/ltp/ltp-20080229/posix_shell_compat.patch	fa9dc1575c08087c69629f00c1c8fe09d3197290
+++ packages/ltp/ltp-20080229/posix_shell_compat.patch	fa9dc1575c08087c69629f00c1c8fe09d3197290
%s
>>> DIFF TRUNCATED @ 16K






More information about the Openembedded-commits mailing list