Bug 113825 - [patch] [libc] [ggated] Fix -STABLE build with -fno-strict-aliasing
Summary: [patch] [libc] [ggated] Fix -STABLE build with -fno-strict-aliasing
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: bin (show other bugs)
Version: 6.2-STABLE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords: patch
Depends on:
Blocks:
 
Reported: 2007-06-18 17:10 UTC by John Merryweather Cooper
Modified: 2022-10-17 12:34 UTC (History)
1 user (show)

See Also:


Attachments
patch-csup (3.55 KB, text/plain)
2007-06-19 12:01 UTC, John Merryweather Cooper
no flags Details
patch-ggated (2.41 KB, text/plain)
2007-06-19 12:01 UTC, John Merryweather Cooper
no flags Details
patch-ip6fw (2.55 KB, text/plain)
2007-06-19 12:01 UTC, John Merryweather Cooper
no flags Details
patch-rpc (2.75 KB, text/plain)
2007-06-19 12:01 UTC, John Merryweather Cooper
no flags Details
patch-rpc-auth (2.55 KB, text/plain)
2007-06-19 12:01 UTC, John Merryweather Cooper
no flags Details
patch-csup (3.01 KB, patch)
2007-06-23 10:15 UTC, John Merryweather Cooper
no flags Details | Diff
patch-ggated (2.32 KB, patch)
2007-06-23 10:15 UTC, John Merryweather Cooper
no flags Details | Diff
patch-ip6fw (2.34 KB, patch)
2007-06-23 10:15 UTC, John Merryweather Cooper
no flags Details | Diff
patch-rpc (2.44 KB, patch)
2007-06-23 10:15 UTC, John Merryweather Cooper
no flags Details | Diff
patch-rpc-auth (2.35 KB, patch)
2007-06-23 10:15 UTC, John Merryweather Cooper
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description John Merryweather Cooper 2007-06-18 17:10:05 UTC

When building world after recently CVSup'ing, the build stops with the following error

cc -O -pipe -march=pentium4 -I/usr/src/lib/libc/include -I/usr/src/lib/libc/../../include -I/usr/src/lib/libc/i386 -D__DBINTERFACE_PRIVATE -I/usr/src/lib/libc/../../contrib/gdtoa -DINET6 -I/usr/obj/usr/src/lib/libc -I/usr/src/lib/libc/resolv -DPOSIX_MISTAKE -I/usr/src/lib/libc/locale -DBROKEN_DES -DPORTMAP -DDES_BUILTIN -I/usr/src/lib/libc/rpc -DHESIOD -Wsystem-headers -Werror -Wall -Wno-format-y2k -Wno-uninitialized -c /usr/src/lib/libc/rpc/getpublickey.c
In file included from /usr/src/lib/libc/rpc/getpublickey.c:178:
/usr/src/lib/libc/rpc/getpublickey.c: In function `getpublickey':
/usr/src/lib/libc/rpc/getpublickey.c:70: warning: passing arg 1 of `__getpublickey_real' discards qualifiers from pointer target type
*** Error code 1

Stop in /usr/src/lib/libc.
*** Error code 1

Stop in /usr/src/lib.
*** Error code 1

Stop in /usr/src.
*** Error code 1

Fix: 

either the -Werror flag needs to be pulled of this compile, or a fix to the underlying casting is necessary.
How-To-Repeat: 

# cd /usr/src
# make buildworld
Comment 1 John Merryweather Cooper 2007-06-19 12:01:51 UTC
Patches attached.  With these patches, make buildworld runs to 
completion with CFLAGS=-O -pipe.

jmc
Comment 2 Gavin Atkinson freebsd_committer freebsd_triage 2007-06-19 12:08:32 UTC
State Changed
From-To: open->closed


Please report kernel compile failures on the appropriate mailing list, 
in this case, freebsd-stable.  Build failures tend to get fixed very 
quickly due to the high number of developers who track the latest code, 
and the automated tinderboxes that continually run builds.
Comment 3 Gavin Atkinson freebsd_committer freebsd_triage 2007-06-19 17:48:55 UTC
State Changed
From-To: closed->open


Reopen, closed in error.  Turns out (through private email) that this 
is a failure to build when -fno-strict-aliasing is specified, which 
the submitter has now supplied patches to fix.
Comment 4 John Merryweather Cooper 2007-06-23 10:15:27 UTC
Unified diff versions of the patches.

jmc
Comment 5 John Merryweather Cooper 2007-11-19 17:04:53 UTC
Note that some of these fixes in the patches would have equal utility applied to -CURRENT breakage on TINDERBOX because of -Werror.

jmc
Comment 6 Eitan Adler freebsd_committer freebsd_triage 2018-05-20 23:51:47 UTC
For bugs matching the following conditions:
- Status == In Progress
- Assignee == "bugs@FreeBSD.org"
- Last Modified Year <= 2017

Do
- Set Status to "Open"
Comment 7 Trenton Schulz 2020-09-19 19:30:51 UTC
This PR seems to be overcome by events. I just tried a buildworld with -fno-strict-aliasing and it completed without any compilation errors.
Comment 8 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:34:45 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>