Skip to contentSkip to conversation

Misc fixes related to gcc 4.6.0

PATCH In review Nitin A Kamble 2 participants 7 messages May 9, 2011 – May 10, 2011

lore
Share & tools
lore
#0 lore raw

cover Misc fixes related to gcc 4.6.0

From: Nitin A Kamble <[email protected]>

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: nitin/misc
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Thanks,
Nitin A Kamble <[email protected]>
---

Khem Raj (1):
gcc-4.6.0: Apply linaro patches

Nitin A Kamble (4):
mdadm: compilation fix for gcc 4.6.0
pax: fix for compiling with gcc 4.6.0
systemtap: fix for compilation with gcc 4.6.0
kexec-tools: fix compiler errors with gcc 4.6.0

 meta/recipes-devtools/gcc/gcc-4.6.0.inc            |    4 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch  |   51 ++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch  |   63 ++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch  |   32 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch  |   28 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch  |  653 ++++++++++++++++++++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch  |  126 ++++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch  |  177 ++++++
 .../gcc/gcc-4_6-branch-linaro-backports.inc        |    9 +
 .../mdadm/fix_for_compilation_with_gcc-4.6.0.patch |  174 ++++++
 meta/recipes-extended/mdadm/mdadm_3.2.1.bb         |    5 +-
 .../pax/pax/fix_for_compile_with_gcc-4.6.0.patch   |   25 +
 meta/recipes-extended/pax/pax_3.4.bb               |    5 +-
 .../fix_for_compiling_with_gcc-4.6.0.patch         |   40 ++
 meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb     |    3 +-
 .../fix_for_compilation_with_gcc-4.6.0.patch       |  119 ++++
 meta/recipes-kernel/systemtap/systemtap_git.bb     |    3 +-
 17 files changed, 1511 insertions(+), 6 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc
 create mode 100644 meta/recipes-extended/mdadm/mdadm/fix_for_compilation_with_gcc-4.6.0.patch
 create mode 100644 meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch
Signature · 1 line
1.7.3.4
#1 lore raw

PATCH 1/5 gcc-4.6.0: Apply linaro patches

From: Khem Raj <[email protected]>

We take the improvements done by linaro for gcc 4.6

---
 meta/recipes-devtools/gcc/gcc-4.6.0.inc            |    4 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch  |   51 ++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch  |   63 ++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch  |   32 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch  |   28 +
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch  |  653 ++++++++++++++++++++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch  |  126 ++++
 .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch  |  177 ++++++
 .../gcc/gcc-4_6-branch-linaro-backports.inc        |    9 +
 9 files changed, 1143 insertions(+), 0 deletions(-)
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch
 create mode 100644 meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc
meta/recipes-devtools/gcc/gcc-4.6.0.inc +4 -0
index 2c30d43..609b1df 100644
@@ -7,6 +7,9 @@ require gcc-common.inc
 
 require gcc-4_6-branch-backports.inc
 
+# Linaro patches for 4.6 branch
+require gcc-4_6-branch-linaro-backports.inc
+
 PR = "r1"
 
 DEPENDS =+ "mpfr gmp libmpc"
@@ -22,6 +25,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 
 SRC_URI = "${GNU_MIRROR}/gcc/gcc-${PV}/gcc-${PV}.tar.bz2 \
 	   ${GCC-4_6-BRANCH-BACKPORTS} \
+	   ${GCC-4_6-BRANCH-LINARO-BACKPORTS} \
 	   file://gcc-4.3.1-ARCH_FLAGS_FOR_TARGET.patch \
 	   file://100-uclibc-conf.patch \
            file://gcc-uclibc-locale-ctype_touplow_t.patch \
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch new file +51 -0

51 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch new file +63 -0

63 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch new file +32 -0
new file mode 100644
index 0000000..465d09c
@@ -0,0 +1,32 @@
+2011-03-22  Andrew Stubbs  <[email protected]>
+
+	Backport from FSF:
+
+	2011-03-21  Daniel Jacobowitz  <[email protected]>
+
+	gcc/
+	* config/arm/unwind-arm.c (__gnu_unwind_pr_common): Correct test
+	for barrier handlers.
+
+=== modified file 'gcc/config/arm/unwind-arm.c'
+--- old/gcc/config/arm/unwind-arm.c	2009-10-30 14:55:10 +0000
++++ new/gcc/config/arm/unwind-arm.c	2011-03-22 10:59:10 +0000
+@@ -1196,8 +1196,6 @@
+ 		  ucbp->barrier_cache.bitpattern[4] = (_uw) &data[1];
+ 
+ 		  if (data[0] & uint32_highbit)
+-		    phase2_call_unexpected_after_unwind = 1;
+-		  else
+ 		    {
+ 		      data += rtti_count + 1;
+ 		      /* Setup for entry to the handler.  */
+@@ -1207,6 +1205,8 @@
+ 		      _Unwind_SetGR (context, 0, (_uw) ucbp);
+ 		      return _URC_INSTALL_CONTEXT;
+ 		    }
++		  else
++		    phase2_call_unexpected_after_unwind = 1;
+ 		}
+ 	      if (data[0] & uint32_highbit)
+ 		data++;
+
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch new file +28 -0
new file mode 100644
index 0000000..9b684aa
@@ -0,0 +1,28 @@
+2011-03-23  Andrew Stubbs  <[email protected]>
+
+	Backport from FSF:
+
+	2011-03-23  Julian Brown  <[email protected]>
+
+	gcc/
+	* expr.c (expand_expr_real_1): Only use BLKmode for volatile
+	accesses which are not naturally aligned.
+
+=== modified file 'gcc/expr.c'
+--- old/gcc/expr.c	2011-03-18 09:04:31 +0000
++++ new/gcc/expr.c	2011-04-05 16:18:11 +0000
+@@ -9147,8 +9147,11 @@
+ 		&& modifier != EXPAND_CONST_ADDRESS
+ 		&& modifier != EXPAND_INITIALIZER)
+ 	    /* If the field is volatile, we always want an aligned
+-	       access.  */
+-	    || (volatilep && flag_strict_volatile_bitfields > 0)
++	       access.  Only do this if the access is not already naturally
++	       aligned, otherwise "normal" (non-bitfield) volatile fields
++	       become non-addressable.  */
++	    || (volatilep && flag_strict_volatile_bitfields > 0
++		&& (bitpos % GET_MODE_ALIGNMENT (mode) != 0))
+ 	    /* If the field isn't aligned enough to fetch as a memref,
+ 	       fetch it as a bit field.  */
+ 	    || (mode1 != BLKmode
+
meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch new file +653 -0

653 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch new file +126 -0

126 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch new file +177 -0

177 lines not on this page · raw message

meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc new file +9 -0
new file mode 100644
index 0000000..3160e35
@@ -0,0 +1,9 @@
+GCC-4_6-BRANCH-LINARO-BACKPORTS = " \
+file://linaro/gcc-4.6-linaro-r106720.patch \
+file://linaro/gcc-4.6-linaro-r106723.patch \
+file://linaro/gcc-4.6-linaro-r106729.patch \
+file://linaro/gcc-4.6-linaro-r106731.patch \
+file://linaro/gcc-4.6-linaro-r106733.patch \
+file://linaro/gcc-4.6-linaro-r106737.patch \
+file://linaro/gcc-4.6-linaro-r106738.patch \
+"
Signature · 1 line
1.7.3.4
#2 lore raw

PATCH 2/5 mdadm: compilation fix for gcc 4.6.0

In reply to Nitin A Kamble

From: Nitin A Kamble <[email protected]>

---
 .../mdadm/fix_for_compilation_with_gcc-4.6.0.patch |  174 ++++++++++++++++++++
 meta/recipes-extended/mdadm/mdadm_3.2.1.bb         |    5 +-
 2 files changed, 177 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/mdadm/mdadm/fix_for_compilation_with_gcc-4.6.0.patch
meta/recipes-extended/mdadm/mdadm/fix_for_compilation_with_gcc-4.6.0.patch new file +174 -0
new file mode 100644
index 0000000..31fc83c
@@ -0,0 +1,174 @@
+Upstream-Status="Pending"
+
+Nitin A Kamble <[email protected]> 2011/05/06
+
+Fix these compilation errors with gcc 4.6.0
+
+| super1.c: In function 'calc_sb_1_csum':
+| super1.c:114:6: error: variable 'i' set but not used [-Werror=unused-but-set-variable]
+| Query.c: In function 'Query':
+| Query.c:38:16: error: variable 'superrno' set but not used [-Werror=unused-but-set-variable]
+| super1.c: In function 'examine_super1':
+| super1.c:390:7: error: variable 'me' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| make: *** [Query.o] Error 1
+| make: *** Waiting for unfinished jobs....
+| mdadm.c: In function 'main':
+| mdadm.c:106:6: error: variable 'auto_update_home' set but not used [-Werror=unused-but-set-variable]
+| mdmon.c: In function 'mdmon':
+| mdmon.c:354:6: error: variable 'ignore' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| make: *** [mdmon.o] Error 1
+| cc1: all warnings being treated as errors
+| 
+| sysfs.c: In function 'sysfs_uevent':
+| sysfs.c:421:6: error: variable 'n' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| make: *** [mdadm.o] Error 1
+| make: *** [super1.o] Error 1
+| cc1: all warnings being treated as errors
+| 
+| make: *** [sysfs.o] Error 1
+| Grow.c: In function 'Grow_reshape':
+| Grow.c:1315:6: error: variable 'changed' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| make: *** [Grow.o] Error 1
+| ERROR: oe_runmake failed
+
+Index: mdadm-3.2.1/Grow.c
+===================================================================
+--- mdadm-3.2.1.orig/Grow.c
++++ mdadm-3.2.1/Grow.c
+@@ -1312,7 +1312,6 @@ int Grow_reshape(char *devname, int fd, 
+ 	char *subarray = NULL;
+ 
+ 	int frozen;
+-	int changed = 0;
+ 	char *container = NULL;
+ 	char container_buf[20];
+ 	int cfd = -1;
+@@ -1479,7 +1478,6 @@ int Grow_reshape(char *devname, int fd, 
+ 		if (!quiet)
+ 			fprintf(stderr, Name ": component size of %s has been set to %lluK\n",
+ 				devname, size);
+-		changed = 1;
+ 	} else if (array.level != LEVEL_CONTAINER) {
+ 		size = get_component_size(fd)/2;
+ 		if (size == 0)
+Index: mdadm-3.2.1/Query.c
+===================================================================
+--- mdadm-3.2.1.orig/Query.c
++++ mdadm-3.2.1/Query.c
+@@ -35,7 +35,7 @@ int Query(char *dev)
+ 	int fd = open(dev, O_RDONLY);
+ 	int vers;
+ 	int ioctlerr;
+-	int superror, superrno;
++	int superror;
+ 	struct mdinfo info;
+ 	mdu_array_info_t array;
+ 	struct supertype *st = NULL;
+@@ -84,7 +84,6 @@ int Query(char *dev)
+ 	st = guess_super(fd);
+ 	if (st) {
+ 		superror = st->ss->load_super(st, fd, dev);
+-		superrno = errno;
+ 	} else
+ 		superror = -1;
+ 	close(fd);
+Index: mdadm-3.2.1/mdadm.c
+===================================================================
+--- mdadm-3.2.1.orig/mdadm.c
++++ mdadm-3.2.1/mdadm.c
+@@ -103,7 +103,7 @@ int main(int argc, char *argv[])
+ 	char *shortopt = short_options;
+ 	int dosyslog = 0;
+ 	int rebuild_map = 0;
+-	int auto_update_home = 0;
++	int __attribute__((__unused__)) auto_update_home = 0;
+ 	char *subarray = NULL;
+ 	char *remove_path = NULL;
+ 	char *udev_filename = NULL;
+Index: mdadm-3.2.1/mdmon.c
+===================================================================
+--- mdadm-3.2.1.orig/mdmon.c
++++ mdadm-3.2.1/mdmon.c
+@@ -351,7 +351,6 @@ static int mdmon(char *devname, int devn
+ 	struct sigaction act;
+ 	int pfd[2];
+ 	int status;
+-	int ignore;
+ 	pid_t victim = -1;
+ 	int victim_sock = -1;
+ 
+@@ -459,7 +458,6 @@ static int mdmon(char *devname, int devn
+ 	if (victim >= 0)
+ 		victim_sock = connect_monitor(container->devname);
+ 
+-	ignore = chdir("/");
+ 	if (!takeover && victim > 0 && victim_sock >= 0) {
+ 		if (fping_monitor(victim_sock) == 0) {
+ 			fprintf(stderr, "mdmon: %s already managed\n",
+@@ -507,10 +505,8 @@ static int mdmon(char *devname, int devn
+ 	close(0);
+ 	open("/dev/null", O_RDWR);
+ 	close(1);
+-	ignore = dup(0);
+ #ifndef DEBUG
+ 	close(2);
+-	ignore = dup(0);
+ #endif
+ 
+ 	do_manager(container);
+Index: mdadm-3.2.1/super1.c
+===================================================================
+--- mdadm-3.2.1.orig/super1.c
++++ mdadm-3.2.1/super1.c
+@@ -111,7 +111,6 @@ static unsigned int calc_sb_1_csum(struc
+ 	unsigned long long newcsum;
+ 	int size = sizeof(*sb) + __le32_to_cpu(sb->max_dev)*2;
+ 	unsigned int *isuper = (unsigned int*)sb;
+-	int i;
+ 
+ /* make sure I can count... */
+ 	if (offsetof(struct mdp_superblock_1,data_offset) != 128 ||
+@@ -123,7 +122,7 @@ static unsigned int calc_sb_1_csum(struc
+ 	disk_csum = sb->sb_csum;
+ 	sb->sb_csum = 0;
+ 	newcsum = 0;
+-	for (i=0; size>=4; size -= 4 ) {
++	for (; size>=4; size -= 4 ) {
+ 		newcsum += __le32_to_cpu(*isuper);
+ 		isuper++;
+ 	}
+@@ -387,13 +386,10 @@ static void examine_super1(struct supert
+ 	printf("   Array State : ");
+ 	for (d=0; d<__le32_to_cpu(sb->raid_disks) + delta_extra; d++) {
+ 		int cnt = 0;
+-		int me = 0;
+ 		unsigned int i;
+ 		for (i=0; i< __le32_to_cpu(sb->max_dev); i++) {
+ 			unsigned int role = __le16_to_cpu(sb->dev_roles[i]);
+ 			if (role == d) {
+-				if (i == __le32_to_cpu(sb->dev_number))
+-					me = 1;
+ 				cnt++;
+ 			}
+ 		}
+Index: mdadm-3.2.1/sysfs.c
+===================================================================
+--- mdadm-3.2.1.orig/sysfs.c
++++ mdadm-3.2.1/sysfs.c
+@@ -418,7 +418,7 @@ int sysfs_set_num(struct mdinfo *sra, st
+ int sysfs_uevent(struct mdinfo *sra, char *event)
+ {
+ 	char fname[50];
+-	int n;
++	int __attribute__((__unused__)) n;
+ 	int fd;
+ 
+ 	sprintf(fname, "/sys/block/%s/uevent",
meta/recipes-extended/mdadm/mdadm_3.2.1.bb +3 -2
index 937abad..80fe520 100644
@@ -8,9 +8,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=0636e73ff0215e8d672dc4c32c317bb3 \
                     file://mdmon.c;beginline=4;endline=18;md5=af7d8444d9c4d3e5c7caac0d9d34039d \
                     file://mdadm.h;beglinlne=4;endline=22;md5=462bc9936ac0d3da110191a3f9994161"
 
-PR = "r0"
+PR = "r1"
 
-SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2"
+SRC_URI = "${KERNELORG_MIRROR}/linux/utils/raid/mdadm/${BPN}-${PV}.tar.bz2 \
+	file://fix_for_compilation_with_gcc-4.6.0.patch"
 
 SRC_URI[md5sum] = "d1e2549202bd79d9e99f1498d1109530"
 SRC_URI[sha256sum] = "7f68f149c6c0e8893d0b9220ac255b46af08e6a6b81223cab57ed54d628ae125"
Signature · 1 line
1.7.3.4
#3 lore raw

PATCH 3/5 pax: fix for compiling with gcc 4.6.0

In reply to Nitin A Kamble

From: Nitin A Kamble <[email protected]>

---
 .../pax/pax/fix_for_compile_with_gcc-4.6.0.patch   |   25 ++++++++++++++++++++
 meta/recipes-extended/pax/pax_3.4.bb               |    5 ++-
 2 files changed, 28 insertions(+), 2 deletions(-)
 create mode 100644 meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch
meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch new file +25 -0
new file mode 100644
index 0000000..33554cc
@@ -0,0 +1,25 @@
+Upstream-Status="Pending"
+
+This patch fixes this compiler error with gcc 4.6.0
+
+Nitin A Kamble <[email protected]> 2011/05/08
+
+| fts.c: In function 'pax_fts_set':
+| fts.c:469:7: error: parameter 'sp' set but not used [-Werror=unused-but-set-parameter]
+| cc1: all warnings being treated as errors
+| 
+| make[2]: *** [fts.o] Error 1
+
+Index: pax-3.4/lib/fts.c
+===================================================================
+--- pax-3.4.orig/lib/fts.c
++++ pax-3.4/lib/fts.c
+@@ -466,7 +466,7 @@ name:		t = sp->fts_path + NAPPEND(p->fts
+ /* ARGSUSED */
+ int
+ fts_set(sp, p, instr)
+-	FTS *sp;
++	FTS __attribute__((__unused__)) *sp;
+ 	FTSENT *p;
+ 	int instr;
+ {
meta/recipes-extended/pax/pax_3.4.bb +3 -2
index b0f358a..e9c70d6 100644
@@ -10,9 +10,10 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=4b0b674dfdc56daa3832d4069b820ea0 \
                     file://lib/vis.h;endline=40;md5=b283f759abd4a5ad7e014b80f51fc053"
 
 SECTION = "base"
-PR = "r0"
+PR = "r1"
 
-SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2"
+SRC_URI = "ftp://ftp.suse.com/pub/people/kukuk/pax/pax-${PV}.tar.bz2 \
+	file://fix_for_compile_with_gcc-4.6.0.patch"
 
 SRC_URI[md5sum] = "fbd9023b590b45ac3ade95870702a0d6"
 SRC_URI[sha256sum] = "ac3c06048e02828077cf7757d3d142241429238893b91d529af29a2e8cc5623b"
Signature · 1 line
1.7.3.4
#4 lore raw

PATCH 4/5 systemtap: fix for compilation with gcc 4.6.0

In reply to Nitin A Kamble

From: Nitin A Kamble <[email protected]>

---
 .../fix_for_compilation_with_gcc-4.6.0.patch       |  119 ++++++++++++++++++++
 meta/recipes-kernel/systemtap/systemtap_git.bb     |    3 +-
 2 files changed, 121 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch
meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch new file +119 -0
new file mode 100644
index 0000000..5f60820
@@ -0,0 +1,119 @@
+Upstream-Status="Pending"
+
+Fix following compiler errors with gcc 4.6.0:
+Nitin A Kamble <[email protected]> 2011/05/09
+
+| tapsets.cxx: In member function 'void sdt_query::handle_probe_entry()':
+| tapsets.cxx:5295:8: error: variable 'kprobe_found' set but not used [-Werror=unused-but-set-variable]
+| tapsets.cxx: In member function 'virtual void hwbkpt_builder::build(systemtap_session&, probe*, probe_point*, const literal_map_t&, std::vector<derived_probe*>&)':
+| tapsets.cxx:7655:18: error: variable 'has_symbol_str' set but not used [-Werror=unused-but-set-variable]
+| cc1plus: all warnings being treated as errors
+| 
+| make[2]: *** [stap-tapsets.o] Error 1
+| translate.cxx: In member function 'virtual void c_unparser::visit_print_format(print_format*)':
+| translate.cxx:4431:6: error: variable 'width_ix' set but not used [-Werror=unused-but-set-variable]
+| cc1plus: all warnings being treated as errors
+| 
+| make[2]: *** [stap-translate.o] Error 1
+| common.c: In function 'fatal_handler':
+| common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| make[3]: *** [common.o] Error 1
+| make[3]: *** Waiting for unfinished jobs....
+| common.c: In function 'fatal_handler':
+| common.c:397:13: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+| mainloop.c: In function 'chld_proc':
+| mainloop.c:56:11: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
+| mainloop.c: In function 'stp_main_loop':
+| mainloop.c:623:17: error: variable 'rc' set but not used [-Werror=unused-but-set-variable]
+| cc1: all warnings being treated as errors
+| 
+
+Index: git/tapsets.cxx
+===================================================================
+--- git.orig/tapsets.cxx
++++ git/tapsets.cxx
+@@ -5292,7 +5292,6 @@ sdt_query::handle_probe_entry()
+   probe *new_base = convert_location();
+   probe_point *new_location = new_base->locations[0];
+ 
+-  bool kprobe_found = false;
+   bool need_debug_info = false;
+ 
+   Dwarf_Addr bias;
+@@ -5302,7 +5301,6 @@ sdt_query::handle_probe_entry()
+   if (have_kprobe())
+     {
+       convert_probe(new_base);
+-      kprobe_found = true;
+       // Expand the local variables in the probe body
+       sdt_kprobe_var_expanding_visitor svv (module_val,
+ 					    provider_name,
+@@ -7652,7 +7650,7 @@ hwbkpt_builder::build(systemtap_session 
+ {
+   string symbol_str_val;
+   int64_t hwbkpt_address, len;
+-  bool has_addr, has_symbol_str, has_write, has_rw, has_len;
++  bool has_addr, has_write, has_rw, has_len;
+ 
+   if (! (sess.kernel_config["CONFIG_PERF_EVENTS"] == string("y")))
+       throw semantic_error ("CONFIG_PERF_EVENTS not available on this kernel",
+@@ -7662,7 +7660,6 @@ hwbkpt_builder::build(systemtap_session 
+                             location->components[0]->tok);
+ 
+   has_addr = get_param (parameters, TOK_HWBKPT, hwbkpt_address);
+-  has_symbol_str = get_param (parameters, TOK_HWBKPT, symbol_str_val);
+   has_len = get_param (parameters, TOK_LENGTH, len);
+   has_write = (parameters.find(TOK_HWBKPT_WRITE) != parameters.end());
+   has_rw = (parameters.find(TOK_HWBKPT_RW) != parameters.end());
+Index: git/translate.cxx
+===================================================================
+--- git.orig/translate.cxx
++++ git/translate.cxx
+@@ -4428,7 +4428,7 @@ c_unparser::visit_print_format (print_fo
+ 	  continue;
+ 
+ 	/* Take note of the width and precision arguments, if any.  */
+-	int width_ix = -1, prec_ix= -1;
++	int __attribute((__unused__)) width_ix = -1, prec_ix= -1;
+ 	if (components[i].widthtype == print_format::width_dynamic)
+ 	  width_ix = arg_ix++;
+ 	if (components[i].prectype == print_format::prec_dynamic)
+Index: git/runtime/staprun/common.c
+===================================================================
+--- git.orig/runtime/staprun/common.c
++++ git/runtime/staprun/common.c
+@@ -394,7 +394,7 @@ void parse_modpath(const char *inpath)
+ #define ERR_MSG "\nUNEXPECTED FATAL ERROR in staprun. Please file a bug report.\n"
+ static void fatal_handler (int signum)
+ {
+-        int rc;
++        int __attribute__((__unused__)) rc;
+         char *str = strsignal(signum);
+         rc = write (STDERR_FILENO, ERR_MSG, sizeof(ERR_MSG));
+         rc = write (STDERR_FILENO, str, strlen(str));
+Index: git/runtime/staprun/mainloop.c
+===================================================================
+--- git.orig/runtime/staprun/mainloop.c
++++ git/runtime/staprun/mainloop.c
+@@ -53,7 +53,7 @@ static void *signal_thread(void *arg)
+ 
+ static void chld_proc(int signum)
+ {
+-  int32_t rc, btype = STP_EXIT;
++  int32_t __attribute__((__unused__)) rc, btype = STP_EXIT;
+   dbug(2, "chld_proc %d (%s)\n", signum, strsignal(signum));
+   pid_t pid = waitpid(-1, NULL, WNOHANG);
+   if (pid != target_pid)
+@@ -620,7 +620,7 @@ int stp_main_loop(void)
+       {
+         /* module asks us to start exiting, so send STP_EXIT */
+         dbug(2, "got STP_REQUEST_EXIT\n");
+-        int32_t rc, btype = STP_EXIT;
++        int32_t __attribute__((__unused__))rc, btype = STP_EXIT;
+         rc = write(control_channel, &btype, sizeof(btype));
+         break;
+       }
meta/recipes-kernel/systemtap/systemtap_git.bb +2 -1
index 4df0947..8ac4c14 100644
@@ -5,10 +5,11 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f"
 DEPENDS = "elfutils"
 
 SRCREV = "4ab3a1863bf4f472acae7a809bf2b38d91658aa8"
-PR = r0
+PR = "r1"
 PV = "1.4+git${SRCPV}"
 
 SRC_URI = "git://sources.redhat.com/git/systemtap.git;protocol=git \
+	file://fix_for_compilation_with_gcc-4.6.0.patch \
           "
 
 EXTRA_OECONF = "--prefix=${D} --with-libelf=${STAGING_DIR_TARGET} --without-rpm \
Signature · 1 line
1.7.3.4
#5 lore raw

PATCH 5/5 kexec-tools: fix compiler errors with gcc 4.6.0

In reply to Nitin A Kamble

From: Nitin A Kamble <[email protected]>

---
 .../fix_for_compiling_with_gcc-4.6.0.patch         |   40 ++++++++++++++++++++
 meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb     |    3 +-
 2 files changed, 42 insertions(+), 1 deletions(-)
 create mode 100644 meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch
meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch new file +40 -0
new file mode 100644
index 0000000..65cf051
@@ -0,0 +1,40 @@
+Upstream-Status="Pending"
+
+Fix following compiler warining/errors with gcc 4.6.0.
+Nitin A Kamble <[email protected]> 2011/05/09
+
+| kexec/kexec.c: In function 'my_exec':
+| kexec/kexec.c:818:6: warning: variable 'result' set but not used [-Wunused-but-set-variable]
+
+| ccache i586-poky-linux-gcc -march=i586 --sysroot=/build_disk/poky_build/build_gcc_4.6.0/tmp/sysroots/qemux86  --no-undefined -nostartfiles -nostdlib -nodefaultlibs -e purgatory_start -r -o purgatory/purgatory.ro purgatory/purgatory.o purgatory/printf.o purgatory/string.o purgatory/arch/i386/entry32-16.o purgatory/arch/i386/entry32-16-debug.o purgatory/arch/i386/entry32.o purgatory/arch/i386/setup-x86.o purgatory/arch/i386/stack.o purgatory/arch/i386/compat_x86_64.o purgatory/arch/i386/purgatory-x86.o purgatory/arch/i386/console-x86.o purgatory/arch/i386/vga.o purgatory/arch/i386/pic.o purgatory/arch/i386/crashdump_backup.o purgatory/sha256.o
+| i586-poky-linux-gcc: error: unrecognized option '--no-undefined'
+| make: *** [purgatory/purgatory.ro] Error 1
+| ERROR: oe_runmake failed
+
+
+Index: kexec-tools-2.0.2/kexec/kexec.c
+===================================================================
+--- kexec-tools-2.0.2.orig/kexec/kexec.c
++++ kexec-tools-2.0.2/kexec/kexec.c
+@@ -815,7 +815,7 @@ static int my_shutdown(void)
+  */
+ static int my_exec(void)
+ {
+-	int result;
++	int __attribute__((__unused__)) result;
+ 
+ 	result = kexec_reboot();
+ 	/* I have failed if I make it here */
+Index: kexec-tools-2.0.2/purgatory/Makefile
+===================================================================
+--- kexec-tools-2.0.2.orig/purgatory/Makefile
++++ kexec-tools-2.0.2/purgatory/Makefile
+@@ -56,7 +56,7 @@ $(PURGATORY): CPPFLAGS=$($(ARCH)_PURGATO
+ 			-I$(srcdir)/include \
+ 			-I$(shell $(CC) -print-file-name=include)
+ $(PURGATORY): LDFLAGS=$($(ARCH)_PURGATORY_EXTRA_CFLAGS)\
+-			--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
++			-Wl,--no-undefined -nostartfiles -nostdlib -nodefaultlibs \
+ 			-e purgatory_start -r
+ 
+ $(PURGATORY): $(PURGATORY_OBJS)
meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb +2 -1
index 0d15b5b..caed816 100644
@@ -2,7 +2,8 @@ require kexec-tools.inc
 export LDFLAGS = "-L${STAGING_LIBDIR}"
 EXTRA_OECONF = " --with-zlib=yes"
 
-PR = "r0"
+PR = "r1"
 
+SRC_URI += " file://fix_for_compiling_with_gcc-4.6.0.patch"
 SRC_URI[md5sum] = "bc401cf3262b25ff7c9a51fc76c8ab91"
 SRC_URI[sha256sum] = "549ab65c18a2229b6bf21b6875ca6bbe0e579bca08c3543ce6aaf8287a0b4188"
Signature · 1 line
1.7.3.4
#6 lore raw
In reply to Nitin A Kamble
Quoted 12 lines · Nitin A Kamble

From: Nitin A Kamble<[email protected]>

Pull URL: git://git.pokylinux.org/poky-contrib.git
Branch: nitin/misc
Browse: http://git.pokylinux.org/cgit.cgi/poky-contrib/log/?h=nitin/misc

Thanks,
Nitin A Kamble<[email protected]>
---

Quoted 9 lines

Khem Raj (1):
gcc-4.6.0: Apply linaro patches

Nitin A Kamble (4):
mdadm: compilation fix for gcc 4.6.0
pax: fix for compiling with gcc 4.6.0
systemtap: fix for compilation with gcc 4.6.0
kexec-tools: fix compiler errors with gcc 4.6.0

Nitin,

I noticed that you are using "=" instead of ": for the Upstream-status,
it should be ":" just like "Signed-off-by:", also please use "Uptream-status" capitalization. If you used "=" before, my apologies for not catching it last time.

Sau!

Quoted 31 lines
  meta/recipes-devtools/gcc/gcc-4.6.0.inc            |    4 +
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch  |   51 ++
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch  |   63 ++
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch  |   32 +
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch  |   28 +
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch  |  653 ++++++++++++++++++++
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch  |  126 ++++
  .../gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch  |  177 ++++++
  .../gcc/gcc-4_6-branch-linaro-backports.inc        |    9 +
  .../mdadm/fix_for_compilation_with_gcc-4.6.0.patch |  174 ++++++
  meta/recipes-extended/mdadm/mdadm_3.2.1.bb         |    5 +-
  .../pax/pax/fix_for_compile_with_gcc-4.6.0.patch   |   25 +
  meta/recipes-extended/pax/pax_3.4.bb               |    5 +-
  .../fix_for_compiling_with_gcc-4.6.0.patch         |   40 ++
  meta/recipes-kernel/kexec/kexec-tools_2.0.2.bb     |    3 +-
  .../fix_for_compilation_with_gcc-4.6.0.patch       |  119 ++++
  meta/recipes-kernel/systemtap/systemtap_git.bb     |    3 +-
  17 files changed, 1511 insertions(+), 6 deletions(-)

create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106720.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106723.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106729.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106731.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106733.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106737.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4.6.0/linaro/gcc-4.6-linaro-r106738.patch create mode 100644 meta/recipes-devtools/gcc/gcc-4_6-branch-linaro-backports.inc create mode 100644 meta/recipes-extended/mdadm/mdadm/fix_for_compilation_with_gcc-4.6.0.patch create mode 100644 meta/recipes-extended/pax/pax/fix_for_compile_with_gcc-4.6.0.patch create mode 100644 meta/recipes-kernel/kexec/kexec-tools/fix_for_compiling_with_gcc-4.6.0.patch create mode 100644 meta/recipes-kernel/systemtap/systemtap/fix_for_compilation_with_gcc-4.6.0.patch