patch applied (ghc): Change our #defines to work on FreeBSD too

Ben Lippmeier benl at ouroborus.net
Tue Jun 1 04:35:10 EDT 2010


This patch broke the Solaris build. On sparky and our local machine we're now getting:

/opt/gcc-vanilla/4.1.2/bin/gcc -E  -DPROFILING -DTHREADED_RTS -DDEBUG    -Wall -Wextra -Wstrict-prototypes  -Wmissing-prototypes  -Wmissing-declarations -Winline -Waggregate-return -Wpointer-arith -Wmissing-noreturn -Wnested-externs -Wredundant-decls  -Iincludes -Irts -DCOMPILING_RTS -DUSE_LIBFFI_FOR_ADJUSTORS  -fno-strict-aliasing -fno-common -Ilibffi/build/include       -fomit-frame-pointer -DRtsWay=\"rts_v\" -Wno-strict-prototypes  -Wno-strict-prototypes -MM rts/Adjustor.c -MF rts/dist/build/.depend-v-p-l-debug-thr-thr_debug-thr_l-thr_p.c_asm.bit

In file included from /usr/include/iso/math_iso.h:11,
                 from /opt/gcc-vanilla/4.1.2/bin/../lib/gcc/sparc-sun-solaris2.10/4.1.2/include/math.h:26,
                 from includes/Stg.h:62,
                 from includes/Rts.h:23,
                 from rts/Adjustor.c:40:
/opt/gcc-vanilla/4.1.2/bin/../lib/gcc/sparc-sun-solaris2.10/4.1.2/include/sys/feature_tests.h:345:2: error: #error "Compiler or options invalid; UNIX 03 and POSIX.1-2001 applications 	require the use of c99"
gmake[1]: *** [rts/dist/build/.depend-v-p-l-debug-thr-thr_debug-thr_l-thr_p.c_asm] Error 1
gmake: *** [all] Error 2


Is there any reason not to just enable -std=c99?

Ben.


On 24/05/2010, at 10:24 PM, Simon Marlow wrote:

> Mon May 24 03:58:28 PDT 2010  Simon Marlow <marlowsd at gmail.com>
>  * Change our #defines to work on FreeBSD too
>  With glibc, things like _POSIX_C_SOURCE and _ISOC99_SOURCE are
>  additive, but on FreeBSD they are mutually exclusive.  However, it
>  turns out we only need to define _POSIX_C_SOURCE and _XOPEN_SOURCE to
>  get all the C99 stuff we need too, so there's no need for any #ifdefs.
> 
>  Submitted by: Gabor PALI <pgj at FreeBSD.org>
> 
>    M ./rts/PosixSource.h -6 +2
> 
> View patch online:
> http://darcs.haskell.org/cgi-bin/darcsweb.cgi?r=ghc;a=darcs_commitdiff;h=20100524105828-12142-ebcb8ea7b2e60214d640d8a96761fce526201bc7.gz
> 
> _______________________________________________
> Cvs-ghc mailing list
> Cvs-ghc at haskell.org
> http://www.haskell.org/mailman/listinfo/cvs-ghc



More information about the Cvs-ghc mailing list