Summary
Compiler flag -fwrapv is not known to GCC 3.3.5
Metadata
- Id: 658eb9a75e3ed070d4202b739a65fafa0804b90f
- Trac id: 412
- Type: defect
- Reporter: ckeen
- Owner: felix
- Cc:
- Status: closed
- Component: build system
- Estimated difficulty:
- Resolution: fixed
- Priority: major
- Milestone: 4.9.0
- Version: 4.6.x
- Changetime: 2012-09-24 21:47:48 UTC
- Created: 2010-10-08 20:17:26 UTC
- Keywords: compiler flags build system
Attachments
- 658eb9a75e3ed070d4202b739a65fafa0804b90f/attachments/openbsd-3.3.5.diff
Description
This breaks the build on OpenBSD. (Yes the compiler is ancient). Which is the recommended gcc version that should be used? OpenBSD has a newer GCC in its ports (4.2.x 4.3.x) so it is no problem if this fact is set in stone (aka the readme) somewhere. Or have I missed it? Removing this flag from the makefile of course fixes the issue.
What I gathered from other sources on the net is that versions above or equal to 4.2.4 work ok with it, while 4.1 versions do have issues. Then again maybe it is just the linux kernel. Source: https://patchwork.kernel.org/patch/35097/
Changes and comments
[2010-10-08 20:19:38 UTC] ckeen wrote:
This has been introduced by
commit 52cad50d492e2e599bb845dbcfc514274eea5aac Author: felix <felix@call-with-current-continuation.org> Date: Thu Sep 16 04:40:25 2010 -0400
added -fwrapv to gcc options
Sorry for not catching this earlier. I have setup a cron job that does a daily build now.
[2010-10-08 23:41:49 UTC] felix wrote:
Well, I'm not sure what to do. Would it be acceptable to require 4.2 or higher? As I understand, this option enables "normal" overflow of integer arithmetic (2s complement), which I think (just think) is required for the fixnum-overflow detection (Gambit uses this flag and I recall readinf somewhere on its mailing list about the flag being "required for correctness", whatever that means).
[2010-10-11 09:21:12 UTC] felix wrote:
Christian, does the system run ok when you remove this flag?
[2010-10-12 21:59:39 UTC] ckeen attached openbsd-3.3.5.diff (description=diff to disable flag when building on openbsd)
[2010-10-12 22:00:06 UTC] ckeen wrote:
Attached is a patch that excludes the flag when building on OpenBSD. Maybe a check against the compiler version is better though...
Tested against 4.6.2 it seems to work, all tests run fine.
[2010-10-18 09:48:06 UTC] felix changed status from new to closed
[2010-10-18 09:48:06 UTC] felix set resolution to fixed
[2010-10-18 09:48:06 UTC] felix wrote:
Thanks, Christian. Patch is applied (experimental).
[2011-06-01 09:00:41 UTC] felix changed milestone from 4.7.0 to 4.8.0
[2011-06-01 09:00:41 UTC] felix wrote:
Milestone 4.7.0 deleted
[2012-09-24 21:47:48 UTC] felix changed milestone from 4.8.0 to 4.9.0
[2012-09-24 21:47:48 UTC] felix wrote:
Milestone 4.8.0 deleted