[SERVER-14310] Customizing the C++ compiler with --cxx but not customizing --cc should be a build error Created: 19/Jun/14  Updated: 03/Mar/15  Resolved: 08/Jan/15

Status: Closed
Project: Core Server
Component/s: Build
Affects Version/s: None
Fix Version/s: 2.8.0-rc5

Type: Bug Priority: Minor - P4
Reporter: Andrew Morrow (Inactive) Assignee: Jonathan Reams
Resolution: Done Votes: 1
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Backwards Compatibility: Minor Change
Operating System: ALL
Steps To Reproduce:
Sprint: BUILD 1
Participants:

 Description   

We require that a C compiler be set to compile certain files (notably, gperftools-2.0/src/base/dynamic_annotations.c).

If a build system user customizes a C++ compiler with --cxx, but not a C compiler with --cc, we fall back to using the C++ compiler as the C compiler, and then dynamic_annotations fails to build.

Additionally, if C++11 mode has been forced 'on', then the C compiler configure check for c99 will fail since -std=c99 is not a valid option to the C++ compiler, yielding a confusing error message. Worse, if C++11 mode is in 'auto' mode, then the failed -std=c99 check will cause things to build in C++03 mode.

If the user customizes --cxx, they should be required to customize --cc.



 Comments   
Comment by Githook User [ 08/Jan/15 ]

Author:

{u'username': u'jbreams', u'name': u'Jonathan Reams', u'email': u'jbreams@mongodb.com'}

Message: SERVER-14310 Customizing the C++ compiler with --cxx but not customizing --cc should be a build error
Branch: master
https://github.com/mongodb/mongo/commit/0d3f90da143ade30ce876eeb104b104e20264e7f

Generated at Thu Feb 08 03:34:27 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.