mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-31 20:40:09 +01:00
pvr: Force compile error on GNU void pointer arithmetic
This GNU extension caused a bug where a void pointer was modified then interpreted as uint32_t* (instead of the other way round). Force a compile error to (hopefully) prevent this from happening again. Signed-off-by: Matt Coster <matt.coster@imgtec.com> Reviewed-by: Karmjit Mahil <Karmjit.Mahil@imgtec.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25327>
This commit is contained in:
parent
140b3e1f8f
commit
22bca4a14f
6 changed files with 9 additions and 2 deletions
|
|
@ -34,6 +34,6 @@ libpowervr_common = static_library(
|
|||
inc_src,
|
||||
inc_imagination,
|
||||
],
|
||||
c_args : [no_override_init_args],
|
||||
c_args : [imagination_c_args, no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
)
|
||||
|
|
|
|||
|
|
@ -19,6 +19,10 @@
|
|||
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
# SOFTWARE.
|
||||
|
||||
imagination_c_args = cc.get_supported_arguments(
|
||||
'-Werror=pointer-arith',
|
||||
)
|
||||
|
||||
inc_imagination = include_directories([
|
||||
'.',
|
||||
'common',
|
||||
|
|
|
|||
|
|
@ -63,7 +63,7 @@ libpowervr_rogue = shared_library(
|
|||
inc_include,
|
||||
inc_src,
|
||||
],
|
||||
c_args : [no_override_init_args],
|
||||
c_args : [imagination_c_args, no_override_init_args],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
dependencies : [idep_mesautil, idep_nir, idep_vulkan_runtime, dep_csbgen],
|
||||
install : true,
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ rogue_compiler = executable(
|
|||
inc_src,
|
||||
inc_rogue,
|
||||
],
|
||||
c_args : [imagination_c_args],
|
||||
build_by_default : with_imagination_tools,
|
||||
install : false,
|
||||
)
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ pvr_deps = [
|
|||
]
|
||||
|
||||
pvr_flags = [
|
||||
imagination_c_args,
|
||||
no_override_init_args,
|
||||
]
|
||||
|
||||
|
|
|
|||
|
|
@ -43,6 +43,7 @@ libpowervr_pds = static_library(
|
|||
inc_imagination,
|
||||
],
|
||||
c_args : [
|
||||
imagination_c_args,
|
||||
no_override_init_args,
|
||||
],
|
||||
gnu_symbol_visibility : 'hidden',
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue