public inbox for git-commits@fedoraproject.org
help / color / mirror / Atom feed
From: Andrew Burgess <aburgess@redhat.com>
To: git-commits@fedoraproject.org
Subject: [rpms/gdb] gdb-17.2-rebase-f44: remove gdb-bfd-aliasing.patch file
Date: Sun, 28 Jun 2026 00:00:51 GMT	[thread overview]
Message-ID: <178260485193.1.7874797335596519929.rpms-gdb-056260a6097d@fedoraproject.org> (raw)

            A new commit has been pushed.

            Repo   : rpms/gdb
            Branch : gdb-17.2-rebase-f44
            Commit : 056260a6097de7e95ec295c3e9c8e6e3d372a73d
            Author : Andrew Burgess <aburgess@redhat.com>
            Date   : 2022-12-09T19:12:35+00:00
            Stats  : +3/-196 in 2 file(s)
            URL    : https://src.fedoraproject.org/rpms/gdb/c/056260a6097de7e95ec295c3e9c8e6e3d372a73d?branch=gdb-17.2-rebase-f44

            Log:
            remove gdb-bfd-aliasing.patch file

The patch 'gdb-bfd-aliasing.patch' is no longer applied as part of the
Fedora GDB build, since this commit to the Fedora GDB repository:

  commit c0cbb1aae415ec62d69892124ab3fd4b084034fb
  Date:   Sat Mar 19 21:26:41 2016 +0100

      .spec cleanup: Drop strict-aliasing GCC bug workaround (from RH BZ 1315191).

I propose that we remove this file from the repository.

---
diff --git a/gdb-bfd-aliasing.patch b/gdb-bfd-aliasing.patch
deleted file mode 100644
index 0b06c14..0000000
--- a/gdb-bfd-aliasing.patch
+++ /dev/null
@@ -1,196 +0,0 @@
-http://sourceware.org/ml/binutils/2016-03/msg00119.html
-Subject: [patch] aout+coff: Fix strict-aliasing rules error
-
-
---IJpNTDwzlM2Ie8A6
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline
-
-Hi,
-
-https://bugzilla.redhat.com/show_bug.cgi?id=1315191 by Dan Horak
-gcc (GCC) 6.0.0 20160308 (experimental)
-gcc-6.0.0-0.15.fc24
-gcc-6.0.0-0.15.fc25
-It did compile with:
-gcc-6.0.0-0.14.fc24
-
-aoutx.h:2504:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       int type_code = aout_symbol (symbol)->type & 0xff;
-       ^~~
-coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-   coffsymbol (section->symbol)->native = native;
-   ^~~~~~~~~~
-
-Full log attached.
-
-This fix is probably wrong as it drops the type safety.  But ({ statements as
-expressions }) are probably not allowed in GDB.
-
-
-Jan
-
---IJpNTDwzlM2Ie8A6
-Content-Type: text/plain; charset=us-ascii
-Content-Disposition: inline; filename=1
-
-bfd/
-2016-03-08  Jan Kratochvil  <jan.kratochvil@redhat.com>
-
-	Fix strict-aliasing rules compilation error.
-	* libaout.h (aout_symbol): Remove type safe indirection.
-	* libcoff-in.h (coffsymbol): Likewise.
-	* libcoff.h: Regenerate.
-
-diff --git a/bfd/libaout.h b/bfd/libaout.h
-index 8b70a9f..b60c40c 100644
---- a/bfd/libaout.h
-+++ b/bfd/libaout.h
-@@ -448,9 +448,7 @@ struct  aout_data_struct
- #define obj_aout_sym_hashes(bfd)           (adata (bfd).sym_hashes)
- #define obj_aout_dynamic_info(bfd)         (adata (bfd).dynamic_info)
- 
--/* We take the address of the first element of an asymbol to ensure that the
--   macro is only ever applied to an asymbol.  */
--#define aout_symbol(asymbol) ((aout_symbol_type *)(&(asymbol)->the_bfd))
-+#define aout_symbol(asymbol) ((aout_symbol_type *) (asymbol))
- 
- /* Information we keep for each a.out section.  This is currently only
-    used by the a.out backend linker.  */
-diff --git a/bfd/libcoff-in.h b/bfd/libcoff-in.h
-index 80f999d..fa1e9ac 100644
---- a/bfd/libcoff-in.h
-+++ b/bfd/libcoff-in.h
-@@ -188,9 +188,7 @@ struct xcoff_tdata
- 
- #define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
- 
--/* We take the address of the first element of an asymbol to ensure that the
--   macro is only ever applied to an asymbol.  */
--#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
-+#define coffsymbol(asymbol) ((coff_symbol_type *) (asymbol))
- 
- /* Tdata for sections in XCOFF files.  This is used by the linker.  */
- 
-diff --git a/bfd/libcoff.h b/bfd/libcoff.h
-index bbed3e0..8ce525b 100644
---- a/bfd/libcoff.h
-+++ b/bfd/libcoff.h
-@@ -192,9 +192,7 @@ struct xcoff_tdata
- 
- #define xcoff_data(abfd) ((abfd)->tdata.xcoff_obj_data)
- 
--/* We take the address of the first element of an asymbol to ensure that the
--   macro is only ever applied to an asymbol.  */
--#define coffsymbol(asymbol) ((coff_symbol_type *)(&((asymbol)->the_bfd)))
-+#define coffsymbol(asymbol) ((coff_symbol_type *) (asymbol))
- 
- /* Tdata for sections in XCOFF files.  This is used by the linker.  */
- 
-
---IJpNTDwzlM2Ie8A6
-Content-Type: text/plain; charset=iso-2022-jp
-Content-Disposition: inline; filename=2
-
-libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT aout32.lo -MD -MP -MF .deps/aout32.Tpo -c aout32.c -o aout32.o
-In file included from aout32.c:24:0:
-aoutx.h: In function ^[$B!F^[(Baout_32_write_syms^[$B!G^[(B:
-aoutx.h:1871:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    H_PUT_16 (abfd, aout_symbol (g)->desc,  nsp.e_desc);
-    ^~~~~~~~
-aoutx.h:1872:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    H_PUT_8  (abfd, aout_symbol (g)->other, nsp.e_other);
-    ^~~~~~~
-aoutx.h:1873:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    H_PUT_8  (abfd, aout_symbol (g)->type,  nsp.e_type);
-    ^~~~~~~
-aoutx.h: In function ^[$B!F^[(Baout_32_get_symbol_info^[$B!G^[(B:
-aoutx.h:2504:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       int type_code = aout_symbol (symbol)->type & 0xff;
-       ^~~
-aoutx.h:2515:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       ret->stab_other = (unsigned) (aout_symbol (symbol)->other & 0xff);
-       ^~~
-aoutx.h:2516:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       ret->stab_desc = (unsigned) (aout_symbol (symbol)->desc & 0xffff);
-       ^~~
-aoutx.h: In function ^[$B!F^[(Baout_32_print_symbol^[$B!G^[(B:
-aoutx.h:2537:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-         (unsigned) (aout_symbol (symbol)->desc & 0xffff),
-         ^
-aoutx.h:2538:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-         (unsigned) (aout_symbol (symbol)->other & 0xff),
-         ^
-aoutx.h:2539:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-         (unsigned) (aout_symbol (symbol)->type));
-         ^
-aoutx.h:2549:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    (unsigned) (aout_symbol (symbol)->desc & 0xffff),
-    ^
-aoutx.h:2550:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    (unsigned) (aout_symbol (symbol)->other & 0xff),
-    ^
-aoutx.h:2551:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    (unsigned) (aout_symbol (symbol)->type & 0xff));
-    ^
-cc1: all warnings being treated as errors
-libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT pei-i386.lo -MD -MP -MF .deps/pei-i386.Tpo -c pei-i386.c -o pei-i386.o
-In file included from coff-i386.c:614:0,
-                 from pei-i386.c:45:
-coffcode.h: In function ^[$B!F^[(Bcoff_new_section_hook^[$B!G^[(B:
-coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-   coffsymbol (section->symbol)->native = native;
-   ^~~~~~~~~~
-cc1: all warnings being treated as errors
-libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT coffgen.lo -MD -MP -MF .deps/coffgen.Tpo -c coffgen.c -o coffgen.o
-coffgen.c: In function ^[$B!F^[(Bcoff_get_lineno^[$B!G^[(B:
-coffgen.c:1510:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-   return coffsymbol (symbol)->lineno;
-   ^~~~~~
-coffgen.c: In function ^[$B!F^[(Bcoff_get_symbol_info^[$B!G^[(B:
-coffgen.c:2034:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-   if (coffsymbol (symbol)->native != NULL
-   ^~
-coffgen.c:2035:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       && coffsymbol (symbol)->native->fix_value
-       ^~
-coffgen.c:2036:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       && coffsymbol (symbol)->native->is_sym)
-       ^~
-coffgen.c:2037:5: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-     ret->value = coffsymbol (symbol)->native->u.syment.n_value -
-     ^~~
-coffgen.c: In function ^[$B!F^[(Bcoff_print_symbol^[$B!G^[(B:
-coffgen.c:2059:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-         coffsymbol (symbol)->native ? "n" : "g",
-         ^~~~~~~~~~
-coffgen.c:2060:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-         coffsymbol (symbol)->lineno ? "l" : " ");
-         ^~~~~~~~~~
-coffgen.c:2064:7: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-       if (coffsymbol (symbol)->native)
-       ^~
-coffgen.c:2068:4: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    combined_entry_type *combined = coffsymbol (symbol)->native;
-    ^~~~~~~~~~~~~~~~~~~
-coffgen.c:2070:11: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-    struct lineno_cache_entry *l = coffsymbol (symbol)->lineno;
-           ^~~~~~~~~~~~~~~~~~
-coffgen.c:2191:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-      coffsymbol (symbol)->native ? "n" : "g",
-      ^~~~~~~~~~
-coffgen.c:2192:6: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-      coffsymbol (symbol)->lineno ? "l" : " ",
-      ^~~~~~~~~~
-cc1: all warnings being treated as errors
-libtool: compile:  gcc -DHAVE_CONFIG_H -I. -I. -I. -I./../include -DHAVE_x86_64_elf64_vec -DHAVE_i386_elf32_vec -DHAVE_iamcu_elf32_vec -DHAVE_x86_64_elf32_vec -DHAVE_i386_aout_linux_vec -DHAVE_i386_pei_vec -DHAVE_x86_64_pei_vec -DHAVE_l1om_elf64_vec -DHAVE_k1om_elf64_vec -DHAVE_elf64_le_vec -DHAVE_elf64_be_vec -DHAVE_elf32_le_vec -DHAVE_elf32_be_vec -DHAVE_plugin_vec -DBINDIR=\"/usr/local/bin\" -W -Wall -Wstrict-prototypes -Wmissing-prototypes -Wshadow -Werror -I./../zlib -g -O2 -MT pei-x86_64.lo -MD -MP -MF .deps/pei-x86_64.Tpo -c pei-x86_64.c -o pei-x86_64.o
-In file included from coff-x86_64.c:741:0,
-                 from pei-x86_64.c:763:
-coffcode.h: In function ^[$B!F^[(Bcoff_new_section_hook^[$B!G^[(B:
-coffcode.h:1817:3: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
-   coffsymbol (section->symbol)->native = native;
-   ^~~~~~~~~~
-cc1: all warnings being treated as errors
-
---IJpNTDwzlM2Ie8A6--
-

diff --git a/gdb.spec b/gdb.spec
index 662681b..ddb58c5 100644
--- a/gdb.spec
+++ b/gdb.spec
@@ -1196,6 +1196,9 @@ fi
 
 %changelog
 * Fri Dec 9 2022 Andrew Burgess <aburgess@redhat.com>
+- Remove gdb-bfd-aliasing.patch.
+
+* Fri Dec 9 2022 Andrew Burgess <aburgess@redhat.com>
 - Remove gdb-entryval-crash-1of3.patch, gdb-entryval-crash-2of3.patch,
   and gdb-entryval-crash-3of3.patch.
 

                 reply	other threads:[~2026-06-28  0:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=178260485193.1.7874797335596519929.rpms-gdb-056260a6097d@fedoraproject.org \
    --to=aburgess@redhat.com \
    --cc=git-commits@fedoraproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox