Commit a8b8d657 authored by Simon Marlow's avatar Simon Marlow
Browse files

osElfTarget should default to False (#5733)

Another portabilty regression: before Platform we used to use elf_OBJ_FORMAT:

 #if linux_TARGET_OS || freebsd_TARGET_OS || openbsd_TARGET_OS || solaris2_TARGET_OS
 #define elf_OBJ_FORMAT 1

which defaults to undefined on unknown platforms.  Defaulting to
non-ELF is correct, it just means that we won't rely on ELF-specific
functionality.  I've added a comment to explain that.
parent 8387f019
......@@ -14,8 +14,6 @@ module Platform (
import Panic
-- | Contains enough information for the native code generator to emit
-- code for this platform.
data Platform
......@@ -89,5 +87,8 @@ osElfTarget OSNetBSD = True
osElfTarget OSSolaris2 = True
osElfTarget OSDarwin = False
osElfTarget OSMinGW32 = False
osElfTarget OSUnknown = panic "Don't know if OSUnknown is elf"
osElfTarget OSUnknown = False
-- Defaulting to False is safe; it means don't rely on any
-- ELF-specific functionality. It is important to have a default for
-- portability, otherwise we have to answer this question for every
-- new platform we compile on (even unreg).
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment