Ghc 7.2.1 does not build anymore on NetBSD
|Reported by:||adegroot||Owned by:||igloo|
|Type of failure:||Building GHC failed||Test Case:|
|Related Tickets:||Differential Rev(s):|
While ghc 7.0.4 builds fine, changes between 7.0.4 and 7.2.1 breaks the build on NetBSD. The first patch fixes the build problem on NetBSD, I think it is mostly clean.
The second patch fixes some linker warning on NetBSD. It is probably incorrect in the generic case, so I would like your advice on it. The issue is that NetBSD keeps binary compatibilities by renaming functions incompatible with old NetBSD binaries in header files and if proper header files are not included, the linker complains above warning message like :
warning: reference to compatibility gettimeofday(); include <sys/time.h> to generate correct reference
This also happens when Haskell program calls FFI function that is renamed in some header file,
So the second patch provides some FFI wrappers for such functions in C files with proper header files included.
With this two patches, I'm able to pass most of the test on a NetBSD-5.99.55 / x86. There are still a few failures, but it need more investigations.