Bug 786504 - build failure, error: dereferencing type-punned pointer will break strict-aliasing rules
Summary: build failure, error: dereferencing type-punned pointer will break strict-ali...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: gdb
Version: rawhide
Hardware: powerpc
OS: Linux
high
high
Target Milestone: ---
Assignee: Jan Kratochvil
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-02-01 16:02 UTC by Karsten Hopp
Modified: 2013-01-20 15:37 UTC (History)
4 users (show)

Fixed In Version: gdb-7.4.50.20120120-11.fc17
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-01-20 15:37:23 UTC
Type: ---


Attachments (Terms of Use)

Description Karsten Hopp 2012-02-01 16:02:41 UTC
Description of problem:
gdb fails to build on PPC:
gcc -O2 -g -pipe -Wall -Wp,-D_FORTIFY_SOURCE=2 -fexceptions -fstack-protector --param=ssp-buffer-size=4  -m32    -I. -I../../gdb -I../../gdb/common -I../../gdb/config -DLOCALEDIR="\"/usr/share/locale\"" -DHAVE_CONFIG_H -I../../gdb/../include/opcode -I../../gdb/../opcodes/..  -I../bfd -I../../gdb/../bfd -I../../gdb/../include -I../libdecnumber -I../../gdb/../libdecnumber  -I../../gdb/gnulib -Ignulib   -DTUI=1  -I/usr/include/python2.7 -I/usr/include/python2.7 -Wall -Wdeclaration-after-statement -Wpointer-arith -Wformat-nonliteral -Wno-pointer-sign -Wno-unused -Wunused-value -Wno-switch -Wno-char-subscripts -Wno-unused -Werror -c -o proc-service.o -MT proc-service.o -MMD -MP -MF .deps/proc-service.Tpo ../../gdb/proc-service.c
../../gdb/ppc-linux-nat.c: In function 'fetch_register':
../../gdb/ppc-linux-nat.c:598:9: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
../../gdb/ppc-linux-nat.c: In function 'store_register':
../../gdb/ppc-linux-nat.c:1078:8: error: dereferencing type-punned pointer will break strict-aliasing rules [-Werror=strict-aliasing]
cc1: all warnings being treated as errors
make[2]: *** [ppc-linux-nat.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: Leaving directory `/builddir/build/BUILD/gdb-7.4.50.20120120/build-ppc-redhat-linux-gnu/gdb'

Version-Release number of selected component (if applicable):
gdb-7.4.50.20120120


Steps to Reproduce:
1. ppc-koji build --scratch f17 gdb-7.4.50.20120120-10.fc17.src.rpm
2.
3.
  
Actual results:
http://ppc.koji.fedoraproject.org/koji/taskinfo?taskID=365055

Comment 1 Jan Kratochvil 2012-02-08 19:12:53 UTC
Don't you have some PPC machine newer than RHEL-6?
I cannot find any in Brno Wiki
and https://beaker.engineering.redhat.com/reserveworkflow/ also does not provide any ppc Rawhide or recent Fedora one (last one is F-12 which I did not try).

I do not want spending time building new GCC myself.

Comment 3 Jan Kratochvil 2012-02-09 18:20:09 UTC
[patch] ppc-linux-nat.c: Fix gcc-4.7 aliasing warnings
http://sourceware.org/ml/gdb-patches/2012-02/msg00151.html


Note You need to log in before you can comment on or make changes to this bug.