[leaf-commits] src/bering-uclibc4/source/elfutils buildtool.cfg, NONE, 1.1 buildtool.mk, NONE, 1.1 elfutils-0.148.tar.bz2, NONE, 1.1 leaf-patches.patch, NONE, 1.1

Andrew <[email protected]> Sat, 11 Dec 2010 19:07:53 +0000
Newsgroups gmane.linux.leaf.cvs
Message-ID <[email protected]>
Update of /cvsroot/leaf/src/bering-uclibc4/source/elfutils
In directory sfp-cvsdas-2.v30.ch3.sourceforge.com:/tmp/cvs-serv17423/elfutils

Added Files:
	buildtool.cfg buildtool.mk elfutils-0.148.tar.bz2 
	leaf-patches.patch 
Log Message:
added elfutils (for libelf) and perf package


--- NEW FILE: leaf-patches.patch ---
diff -aur elfutils-0.148/libelf/elf_begin.c elfutils-0.148.new/libelf/elf_begin.c
--- elfutils-0.148/libelf/elf_begin.c	2010-04-21 17:26:40.000000000 +0300
+++ elfutils-0.148.new/libelf/elf_begin.c	2010-12-11 19:16:34.000000000 +0200
@@ -796,7 +796,8 @@
     }
 
   /* Copy the raw name over to a NUL terminated buffer.  */
-  *((char *) __mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16)) = '\0';
+  mempcpy (elf->state.ar.raw_name, ar_hdr->ar_name, 16);
+  elf->state.ar.raw_name[16] = '\0';
 
   elf_ar_hdr = &elf->state.ar.elf_ar_hdr;
 
@@ -888,8 +889,8 @@
       const char *string = ar_hdr->FIELD;				      \
       if (ar_hdr->FIELD[sizeof (ar_hdr->FIELD) - 1] != ' ')		      \
 	{								      \
-	  *((char *) __mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD)))  \
-	    = '\0';							      \
+	  mempcpy (buf, ar_hdr->FIELD, sizeof (ar_hdr->FIELD));		      \
+	  buf[sizeof (ar_hdr->FIELD)] = '\0';				      \
 	  string = buf;							      \
 	}								      \
       if (sizeof (elf_ar_hdr->FIELD) <= sizeof (long int))		      \
diff -aur elfutils-0.148/libelf/elf_error.c elfutils-0.148.new/libelf/elf_error.c
--- elfutils-0.148/libelf/elf_error.c	2010-04-13 23:08:02.000000000 +0300
+++ elfutils-0.148.new/libelf/elf_error.c	2010-12-11 19:24:15.000000000 +0200
@@ -53,7 +53,7 @@
 #endif
 
 #include <assert.h>
-#include <libintl.h>
+//#include <libintl.h>
 #include <stdbool.h>
 #include <stdint.h>
 #include <stdlib.h>
@@ -62,7 +62,7 @@
 
 
 /* The error number.  */
-static __thread int global_error;
+static int global_error;
 
 
 int
@@ -320,11 +320,11 @@
   if (error == 0)
     {
       assert (msgidx[last_error] < sizeof (msgstr));
-      return last_error != 0 ? _(msgstr + msgidx[last_error]) : NULL;
+      return last_error != 0 ? msgstr + msgidx[last_error] : NULL;
     }
   else if (error < -1 || error >= nmsgidx)
-    return _(msgstr + ELF_E_UNKNOWN_ERROR_IDX);
+    return msgstr + ELF_E_UNKNOWN_ERROR_IDX;
 
   assert (msgidx[error == -1 ? last_error : error] < sizeof (msgstr));
-  return _(msgstr + msgidx[error == -1 ? last_error : error]);
+  return msgstr + msgidx[error == -1 ? last_error : error];
 }
diff -aur elfutils-0.148/libelf/libelfP.h elfutils-0.148.new/libelf/libelfP.h
--- elfutils-0.148/libelf/libelfP.h	2010-01-12 18:57:54.000000000 +0200
+++ elfutils-0.148.new/libelf/libelfP.h	2010-12-11 19:54:42.000000000 +0200
@@ -64,7 +64,7 @@
 #include <string.h>
 
 /* gettext helper macros.  */
-#define _(Str) dgettext ("elfutils", Str)
+#define _(Str) Str
 
 
 /* Helper Macros to write 32 bit and 64 bit functions.  */

--- NEW FILE: buildtool.mk ---
#############################################################
#
# elfutils
# Currently we need only libelf from it.
#
#############################################################

include $(MASTERMAKEFILE)
DIR:=elfutils-0.148
TARGET_DIR:=$(BT_BUILD_DIR)/libelf
export CC=$(TARGET_CC)

$(DIR)/.source:
	bzcat $(SOURCE) | tar -xvf - 	
	cat $(PATCH1) | patch -p1 -d $(DIR)
	touch $(DIR)/.source

$(DIR)/.configured: $(DIR)/.source
	(cd $(DIR); LDFLAGS="-L$(BT_STAGING_DIR)/usr/lib" \
		CFLAGS="$(BT_COPT_FLAGS)" \
		./configure \
			--build=i386-pc-linux-gnu \
			--target=i386-pc-linux-gnu \
			--prefix=/usr \
			--disable-nls);
	touch $(DIR)/.configured
	
source: $(DIR)/.source

$(DIR)/.build: $(DIR)/.configured
	mkdir -p $(TARGET_DIR)
	$(MAKE) CFLAGS="$(BT_COPT_FLAGS)" -C $(DIR)/libelf
	$(MAKE) DESTDIR=$(TARGET_DIR) -C $(DIR)/libelf install
	-$(BT_STRIP) $(BT_STRIP_LIBOPTS) $(TARGET_DIR)/usr/lib/*
	cp -a $(TARGET_DIR)/* $(BT_STAGING_DIR)
	touch $(DIR)/.build

build: $(DIR)/.build

clean:
	echo $(PATH)
	-rm $(DIR)/.build
	rm -rf $(TARGET_DIR)
	$(MAKE) -C $(DIR) clean
	rm -f $(BT_STAGING_DIR)/usr/lib/libelf.*
	
srcclean:
	rm -rf $(DIR)

--- NEW FILE: buildtool.cfg ---
<File buildtool.mk>
  Server = cvs4-sourceforge
  Revision = HEAD
  Directory = elfutils
</File>

<File elfutils-0.148.tar.bz2>
  Server = cvs4-sourceforge
  Revision = HEAD  
  Directory = elfutils
  envname = SOURCE
</File>

<File leaf-patches.patch>
  Server = cvs4-sourceforge
  Revision = HEAD  
  Directory = elfutils
  envname = PATCH1
</File>

<Package>
    <libelf>
	    Version = 0.148
	    Revision = 1
	    
	    Help <<EOF
	    The libelf library from elfutils
	    Homepage: https://fedorahosted.org/elfutils/
	    LEAF Package by __PACKAGER__, __BUILDDATE__
	    EOF
	    
	    <Permissions>
		    Files = 644
		    Directories = 755
	    </Permissions>
	    
	    <Owner>
		    Files = root:root
		    Directories = root:root
	    </Owner>
	    
	    <Contents>
		    <File>
			    Source	= usr/lib/libelf.so.0.148
			    Filename	= usr/lib/libelf.so.0.148
			    Type	= binary
			    Permissions	= 755
		    </File>
		    
		    <File>
			    Target	= usr/lib/libelf.so.0.148
			    Filename	= usr/lib/libelf.so.0
			    Type	= link
		    </File>
		    
		    <File>
			    Target	= usr/lib/libelf.so.0.148
			    Filename	= usr/lib/libelf.so
			    Type	= link
		    </File>
	    </Contents>
    </libpcap>
</Package>

--- NEW FILE: elfutils-0.148.tar.bz2 ---
(This appears to be a binary file; contents omitted.)


------------------------------------------------------------------------------
Oracle to DB2 Conversion Guide: Learn learn about native support for PL/SQL,
new data types, scalar functions, improved concurrency, built-in packages, 
OCI, SQL*Plus, data movement tools, best practices and more.
http://p.sf.net/sfu/oracle-sfdev2dev