Opened 14 years ago

Closed 14 years ago

Last modified 12 years ago

#412 closed defect (fixed)

Compiler flag -fwrapv is not known to GCC 3.3.5

Reported by: Christian Kellermann Owned by: felix winkelmann
Priority: major Milestone: 4.9.0
Component: build system Version: 4.6.x
Keywords: compiler flags build system Cc:
Estimated difficulty:

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/

Attachments (1)

openbsd-3.3.5.diff (594 bytes) - added by Christian Kellermann 14 years ago.
diff to disable flag when building on openbsd

Download all attachments as: .zip

Change History (8)

comment:1 Changed 14 years ago by Christian Kellermann

This has been introduced by

commit 52cad50d492e2e599bb845dbcfc514274eea5aac
Author: felix <felix@…>
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.

comment:2 Changed 14 years ago by felix winkelmann

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).

comment:3 Changed 14 years ago by felix winkelmann

Christian, does the system run ok when you remove this flag?

Changed 14 years ago by Christian Kellermann

Attachment: openbsd-3.3.5.diff added

diff to disable flag when building on openbsd

comment:4 Changed 14 years ago by Christian Kellermann

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.

comment:5 Changed 14 years ago by felix winkelmann

Resolution: fixed
Status: newclosed

Thanks, Christian. Patch is applied (experimental).

comment:6 Changed 13 years ago by felix winkelmann

Milestone: 4.7.04.8.0

Milestone 4.7.0 deleted

comment:7 Changed 12 years ago by felix winkelmann

Milestone: 4.8.04.9.0

Milestone 4.8.0 deleted

Note: See TracTickets for help on using tickets.