You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by Niklas Nielsen <ni...@qni.dk> on 2013/11/02 03:27:58 UTC

Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/
-----------------------------------------------------------

Review request for mesos, Benjamin Hindman and Vinod Kone.


Repository: mesos-git


Description
-------

This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).

Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.


Diffs
-----

  configure.ac ac3f7f7 

Diff: https://reviews.apache.org/r/15193/diff/


Testing
-------

make check


Thanks,

Niklas Nielsen


Re: Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

Posted by Niklas Nielsen <ni...@qni.dk>.

> On Nov. 4, 2013, 6:23 p.m., Ben Mahler wrote:
> > Can you easily guard that whole check to occur only for gcc? (When using clang we don't want the same version check).
> 
> Niklas Nielsen wrote:
>     Good point. Clang will claim to be a GCC 4.2.1 with dumpversion.
>     
>     We could have something as simple as:
>     
>     gcc --version|grep clang > /dev/null
>     if test $? == 0; then 
>     # This is a clang compiler
>     # ...
>     else
>     # This is a real GCC
>     # ...
>     fi

Actually, after looking at the switch statement (which tests for GCC version 4.4* and 4.8*) it seems redundant to check whether it is a clang compiler. LLVM GCC frontend and Clang announce themselves as version 4.2.1 and that will probably stay that way, so I think we are good for now with the 'gcc' to '${CC}' change.
If you still think we should have the clang check, I do have a patch ready with that included.


- Niklas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/#review28125
-----------------------------------------------------------


On Nov. 2, 2013, 2:27 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15193/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 2:27 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).
> 
> Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.
> 
> 
> Diffs
> -----
> 
>   configure.ac ac3f7f7 
> 
> Diff: https://reviews.apache.org/r/15193/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

Posted by Ben Mahler <be...@gmail.com>.

> On Nov. 4, 2013, 6:23 p.m., Ben Mahler wrote:
> > Can you easily guard that whole check to occur only for gcc? (When using clang we don't want the same version check).
> 
> Niklas Nielsen wrote:
>     Good point. Clang will claim to be a GCC 4.2.1 with dumpversion.
>     
>     We could have something as simple as:
>     
>     gcc --version|grep clang > /dev/null
>     if test $? == 0; then 
>     # This is a clang compiler
>     # ...
>     else
>     # This is a real GCC
>     # ...
>     fi
> 
> Niklas Nielsen wrote:
>     Actually, after looking at the switch statement (which tests for GCC version 4.4* and 4.8*) it seems redundant to check whether it is a clang compiler. LLVM GCC frontend and Clang announce themselves as version 4.2.1 and that will probably stay that way, so I think we are good for now with the 'gcc' to '${CC}' change.
>     If you still think we should have the clang check, I do have a patch ready with that included.
> 
> Ben Mahler wrote:
>     Cool thanks for checking, I think being explicit would be nice, but yes let's do that in a separate patch. I'll get this committed for you shortly, thanks!

Done, please mark as submitted!


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/#review28125
-----------------------------------------------------------


On Nov. 2, 2013, 2:27 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15193/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 2:27 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).
> 
> Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.
> 
> 
> Diffs
> -----
> 
>   configure.ac ac3f7f7 
> 
> Diff: https://reviews.apache.org/r/15193/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

Posted by Ben Mahler <be...@gmail.com>.

> On Nov. 4, 2013, 6:23 p.m., Ben Mahler wrote:
> > Can you easily guard that whole check to occur only for gcc? (When using clang we don't want the same version check).
> 
> Niklas Nielsen wrote:
>     Good point. Clang will claim to be a GCC 4.2.1 with dumpversion.
>     
>     We could have something as simple as:
>     
>     gcc --version|grep clang > /dev/null
>     if test $? == 0; then 
>     # This is a clang compiler
>     # ...
>     else
>     # This is a real GCC
>     # ...
>     fi
> 
> Niklas Nielsen wrote:
>     Actually, after looking at the switch statement (which tests for GCC version 4.4* and 4.8*) it seems redundant to check whether it is a clang compiler. LLVM GCC frontend and Clang announce themselves as version 4.2.1 and that will probably stay that way, so I think we are good for now with the 'gcc' to '${CC}' change.
>     If you still think we should have the clang check, I do have a patch ready with that included.

Cool thanks for checking, I think being explicit would be nice, but yes let's do that in a separate patch. I'll get this committed for you shortly, thanks!


- Ben


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/#review28125
-----------------------------------------------------------


On Nov. 2, 2013, 2:27 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15193/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 2:27 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).
> 
> Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.
> 
> 
> Diffs
> -----
> 
>   configure.ac ac3f7f7 
> 
> Diff: https://reviews.apache.org/r/15193/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

Posted by Niklas Nielsen <ni...@qni.dk>.

> On Nov. 4, 2013, 6:23 p.m., Ben Mahler wrote:
> > Can you easily guard that whole check to occur only for gcc? (When using clang we don't want the same version check).

Good point. Clang will claim to be a GCC 4.2.1 with dumpversion.

We could have something as simple as:

gcc --version|grep clang > /dev/null
if test $? == 0; then 
# This is a clang compiler
# ...
else
# This is a real GCC
# ...
fi


- Niklas


-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/#review28125
-----------------------------------------------------------


On Nov. 2, 2013, 2:27 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15193/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 2:27 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).
> 
> Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.
> 
> 
> Diffs
> -----
> 
>   configure.ac ac3f7f7 
> 
> Diff: https://reviews.apache.org/r/15193/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>


Re: Review Request 15193: Use $CC compiler instead of 'gcc' for version dump.

Posted by Ben Mahler <be...@gmail.com>.
-----------------------------------------------------------
This is an automatically generated e-mail. To reply, visit:
https://reviews.apache.org/r/15193/#review28125
-----------------------------------------------------------

Ship it!


Can you easily guard that whole check to occur only for gcc? (When using clang we don't want the same version check).

- Ben Mahler


On Nov. 2, 2013, 2:27 a.m., Niklas Nielsen wrote:
> 
> -----------------------------------------------------------
> This is an automatically generated e-mail. To reply, visit:
> https://reviews.apache.org/r/15193/
> -----------------------------------------------------------
> 
> (Updated Nov. 2, 2013, 2:27 a.m.)
> 
> 
> Review request for mesos, Benjamin Hindman and Vinod Kone.
> 
> 
> Repository: mesos-git
> 
> 
> Description
> -------
> 
> This has caused problems in settings where the desired compiler isn't the system bundled GCC (as in Mac OS X Mavericks builds where we have been using specific versions of GCC).
> 
> Review #14164 is re-enabled for $(CC) instead of 'gcc' and lets us compile with GCC 4.8 on Mavericks instead of down-grading to 4.7.
> 
> 
> Diffs
> -----
> 
>   configure.ac ac3f7f7 
> 
> Diff: https://reviews.apache.org/r/15193/diff/
> 
> 
> Testing
> -------
> 
> make check
> 
> 
> Thanks,
> 
> Niklas Nielsen
> 
>