binutils/binutils-2.17.50.0.12-build-fixes.patch
2007-03-01 09:30:46 +00:00

30 lines
963 B
Diff

2006-02-14 Jakub Jelinek <jakub@redhat.com>
ld/testsuite/
* ld-shared/main.c (main): Prevent warnings about unused p.
* ld-elfcomm/common1b.c (dummy1): Add __attribute__((__used__)) for
GCC 3.3+.
--- ld/testsuite/ld-shared/main.c.jj 2001-07-11 15:48:54.000000000 +0200
+++ ld/testsuite/ld-shared/main.c 2006-02-14 10:07:08.000000000 +0100
@@ -40,6 +40,8 @@ main ()
{
int (*p) ();
+ p = (void *) 0;
+ (void) p;
printf ("mainvar == %d\n", mainvar);
printf ("overriddenvar == %d\n", overriddenvar);
printf ("shlibvar1 == %d\n", shlibvar1);
--- ld/testsuite/ld-elfcomm/common1b.c.jj 2003-04-15 11:38:10.000000000 +0200
+++ ld/testsuite/ld-elfcomm/common1b.c 2006-02-14 10:11:19.000000000 +0100
@@ -1,3 +1,7 @@
-static char dummy1 = 'X';
+static char dummy1
+#if defined __GNUC__ && (__GNUC__ >= 4 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3))
+ __attribute__((__used__))
+#endif
+ = 'X';
char foo1 [] = "Aligned at odd byte.";
char foo2 [4];