bmcweb: ignore cast-align error for protobuf headers Protobuf generated C++ code on 32-bit architectures (e.g., ARMv7-a) casts `google::protobuf::Message*` (4-byte alignment) to concrete message types containing 64-bit fields (8-byte alignment requirement) using `reinterpret_cast`. Because bmcweb enables `-Wcast-align` and `-Werror`, this causes compilation errors when building bmcweb targets (e.g., pacemaker) that include tlbmc protobuf headers on 32-bit platforms. Append `-Wno-error=cast-align` to CXXFLAGS to prevent these alignment warnings from failing the build. Tested: - platform5: http://fusion2/fbd4f274-0561-31e5-b132-a3fc4365536d - platform15: http://fusion2/cc372ad5-f7a4-3def-9c11-2828b9a09562 - platform18: http://fusion2/42c37380-6793-3ae1-9166-549b840cfc8b - platform17: http://fusion2/26070480-54cb-3279-afb8-cf147e9c3051 - platform11+ext: http://fusion2/6794dea6-088e-343b-a45e-c9911e809924 - platform11: http://fusion2/3c008d0c-f51c-3c60-99b1-9caa4604f710 - platform25: http://fusion2/f611d1b8-d45f-32cc-a6b0-fe9b2bf10224 Google-Bug-Id: 481049523 Google-Bug-Id: 482101011 Change-Id: I471fb13673614bffe23e129d4ce18103063b8e1c Signed-off-by: Willy Tu <wltu@google.com>
diff --git a/recipes-phosphor/interfaces/bmcweb_%.bbappend b/recipes-phosphor/interfaces/bmcweb_%.bbappend index 8a47669..c8734a3 100644 --- a/recipes-phosphor/interfaces/bmcweb_%.bbappend +++ b/recipes-phosphor/interfaces/bmcweb_%.bbappend
@@ -1,5 +1,7 @@ require gbmcweb.inc +CXXFLAGS:append = " -Wno-error=cast-align" + FILESEXTRAPATHS:prepend:gbmc := "${THISDIR}/${PN}:" RDEPENDS:${PN}:append:gbmc = " phosphor-software-manager-updater"