aarch64: silence GCS warnings on shared libraries for -z gcs=implicit
Dynamic library incompatibilities should not be reported when no GCS
option is provided (defaults to '-z gcs=implicit') and no explicit
diagnostic is provided via '-z gcs-report-dynamic'.
Binary Linux distributions do not rebuild all packages from scratch
when rolling out a new feature or creating a new release; only
modified packages get rebuilt. In the context of GCS deployment, this
meant that some packages were rebuilt with GCS enabled while their
dependencies were not yet GCS-compatible, resulting in warnings. These
warnings caused build failures for packages that treat linker warnings
as errors. Those errors slowed down the GCS deployment, and Linux
distribution maintainers requested that no GCS option provided should
be equivalent to '-z gcs=implicit -z gcs-report-dynamic=none'.
In contrast, '-z gcs=always' should continue to report such issues by
default. Warnings can still be disabled or promoted to errors by
explicitly setting '-z gcs-report-dynamic' to respectively 'none' or
'error'.
This patch preserves the existing behaviour for '-z gcs=never', changes
the default behaviour of '-z gcs=implicit' or no GCS option, and removed
the inheritance mechanism between '-z gcs-report' and '-z gcs-report-dynamics'.
The expected behaviour with the different possible combinations is as
follows:
* -z gcs=never:
No diagnostic messages are emitted.
* -z gcs=implicit:
No diagnostic messages are emitted for input static objects.
However, if all the input static objects are marked for GCS, the
output object will also be marked for GCS.
In this case the output is marked with GCS, '-z gcs-report-dynamic'
defaults to 'none' and no diagnostics are emitted. Diagnostics can
be enabled by explicitly providing the option.
* -z gcs=always:
Warning diagnostics for both static and dynamic input objects are
enabled by default. The two options are independent of one another,
and the diagnostic level can be adjusted for each by explicitly
providing the desired level to '-z gcs-report-dynamic' and '-z
gcs-report'.
The patch also updates the existing tests, removes redundant test cases,
and adds new tests covering cases with no report option provided, or
report options explicitly set.
42 files changed