Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-14310

Customizing the C++ compiler with --cxx but not customizing --cc should be a build error

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Minor - P4 Minor - P4
    • 2.8.0-rc5
    • Affects Version/s: None
    • Component/s: Build
    • None
    • Minor Change
    • ALL
    • BUILD 1

      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.

            Assignee:
            jonathan.reams@mongodb.com Jonathan Reams
            Reporter:
            andrew.morrow@mongodb.com Andrew Morrow (Inactive)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: