patches/binutils-04-non-constant_initializer_op.diff
author markwright
Sun, 14 Oct 2007 13:45:28 +0000
changeset 546 7976e6fd6450
child 8249 994ab7add44e
permissions -rw-r--r--
2007-10-14 Mark Wright <[email protected]> * SFEgcc.spec: Bump to 4.2.2. * SFEbinutils.spec: Bump to 2.18. Comment patch2, as already applied to 2.18. Add patch4 and patch5. Add export CPP="cc -E -Xs". * patches/binutils-04-non-constant_initializer_op.diff: (new) patch to avoid: "elf.c", line 854: non-constant initializer: op "?" * patches/spec-files-extra/patches/binutils-05-lm.diff: (new) patch to add -lm to gprof link

--- binutils-2.18-orig/bfd/bfd-in.h	2007-08-06 19:59:14.000000000 +0000
+++ binutils-2.18/bfd/bfd-in.h	2007-10-14 09:49:53.043842758 +0000
@@ -48,7 +48,7 @@
    comma and then the length of the string.  Doing this by hand
    is error prone, so using this macro is safer.  The macro will
    also safely handle the case where a NULL is passed as the arg.  */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+#define STRING_COMMA_LEN(STR) (STR), ((sizeof(STR) > 0) ? sizeof (STR) - 1 : 0)
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
    to create the arguments to another macro, since the preprocessor
    will mis-count the number of arguments to the outer macro (by not
--- binutils-2.18-orig/bfd/bfd-in2.h	2007-08-06 19:59:15.000000000 +0000
+++ binutils-2.18/bfd/bfd-in2.h	2007-10-14 09:49:26.509636374 +0000
@@ -55,7 +55,7 @@
    comma and then the length of the string.  Doing this by hand
    is error prone, so using this macro is safer.  The macro will
    also safely handle the case where a NULL is passed as the arg.  */
-#define STRING_COMMA_LEN(STR) (STR), ((STR) ? sizeof (STR) - 1 : 0)
+#define STRING_COMMA_LEN(STR) (STR), ((sizeof(STR) > 0) ? sizeof (STR) - 1 : 0)
 /* Unfortunately it is not possible to use the STRING_COMMA_LEN macro
    to create the arguments to another macro, since the preprocessor
    will mis-count the number of arguments to the outer macro (by not