Uploaded image for project: 'C Driver'
  1. C Driver
  2. CDRIVER-3134

Append wrapping driver platform data before CFLAGS and LDFLAGS

    • Type: Icon: Improvement Improvement
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 1.15.0
    • Affects Version/s: None
    • Component/s: libmongoc
    • Labels:

      PHPC-1378 presents a case where PHP platform information is getting cut off due to user-specified CFLAGS and LDFLAGS taking precedence in the handshake document (limited to 512 bytes). While PHP could avoid setting these constants in its own build configuration, that wouldn't apply to deployments where libmongoc is used as a system library. I would like to propose deferring CFLAG/LDFLAG appending until after the wrapping driver's own platform info.

      This would require some reordering of the handshake construction, given that the platform string is first initialized during _mongoc_handshake_init, which is likely before a wrapping driver would have a chance to call mongoc_handshake_data_append.

      Note: "posix", "stdc", and compiler info are also appended to the platform string before a wrapping driver's data; however, I'm not too concerned with those fields as their values should be short (unlike CFLAGS and LDFLAGS, which can easily exceed a handshake's size limit).

            Assignee:
            haris.sheikh@mongodb.com Haris Sheikh (Inactive)
            Reporter:
            jmikola@mongodb.com Jeremy Mikola
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: