code coverage for JavaScript

Bug #42 - Patches fix configure errors on OSX Lion with clang - int main should return a value

Submitted by: 2bits
Date submitted: 2012-04-13 02:24:22 UTC
Status: Open
Building on OSX Lion 10.7.3 with XCode-4.3.2.  Apple does not include gcc
anymore, and the default compiler is clang.  Reporting this for Homebrew.
There are four issues:

1) Hard coded gcc & g++ in js/configure.gnu breaks when the compiler is clang
and the CFLAGS that are valid for clang only get passed to the gcc conftest.
You can see the result here: https://gist.github.com/2367877

2,3,4) js/configure has three places where an extra


crept into the conftests, which then doesn't return a value.  That is an error 
using clang when main is specified as 'int main' and causes the conftest to
fail for sizeof void, alignment of void, and sizeof double.

All four still exist in HEAD.

I've uploaded my patch for 2,3,4 to my repo on github here:
I realize the proper patch would involve configure.in, but this is a working
patch for stable.  Homebrew doesn't like to autoreconf for something like that.
There may be more instances where a value is not returned, but only these three
affect OSX.  So those are the only items patched.

For #1, that's harder for me to craft for all operating systems, as I don't 
know how you pass CC and CXX around or why you are not getting them from 
configure in the top level directory or from the variables passed to 
js/configure.  See the gist for the js/configure arguments to see what I mean.
For Homebrew, we are doing an inreplace on those variables before starting the 

Add a comment

Your name:
Your email address (optional - will never be displayed):
Attachment (optional - maximum 64 KiB):
Copyright © 2008 Silicon Forks siliconforks.com