From f44951d3af6850c52845d10474795be6b097748a Mon Sep 17 00:00:00 2001 From: Vilas Bhat Date: Mon, 15 Apr 2024 17:32:27 +0000 Subject: [PATCH] 16k: build: Enable TARGET_NO_BIONIC_PAGE_SIZE_MACRO by default on Android V targets This relands commit 35839ec1a33f0d2a314d7dc475bffc2cf3d3913c and also includes `PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO` override for several targets. The latter is required in order to fix failing tests due to mismatch in the `VSR_VENDOR_API_LEVEL` value between test and device targets. Bug: 333124272 Bug: 310232825 Change-Id: I12db4b78b02aa4a58c7355852dc2ff5ae395592c --- core/config.mk | 5 ++++- target/product/aosp_arm64.mk | 2 ++ target/product/aosp_x86_64.mk | 2 ++ target/product/module_arm64.mk | 2 ++ target/product/module_arm64only.mk | 2 ++ target/product/module_x86_64.mk | 2 ++ target/product/module_x86_64only.mk | 2 ++ 7 files changed, 16 insertions(+), 1 deletion(-) diff --git a/core/config.mk b/core/config.mk index daefa70f57..22ec2922ee 100644 --- a/core/config.mk +++ b/core/config.mk @@ -420,9 +420,12 @@ endif .KATI_READONLY := TARGET_MAX_PAGE_SIZE_SUPPORTED # Boolean variable determining if AOSP relies on bionic's PAGE_SIZE macro. -TARGET_NO_BIONIC_PAGE_SIZE_MACRO := false ifdef PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO TARGET_NO_BIONIC_PAGE_SIZE_MACRO := $(PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO) +else ifeq ($(call math_lt,$(VSR_VENDOR_API_LEVEL),35),true) + TARGET_NO_BIONIC_PAGE_SIZE_MACRO := false +else + TARGET_NO_BIONIC_PAGE_SIZE_MACRO := true endif .KATI_READONLY := TARGET_NO_BIONIC_PAGE_SIZE_MACRO diff --git a/target/product/aosp_arm64.mk b/target/product/aosp_arm64.mk index d3514a50de..d9446153c4 100644 --- a/target/product/aosp_arm64.mk +++ b/target/product/aosp_arm64.mk @@ -72,3 +72,5 @@ PRODUCT_NAME := aosp_arm64 PRODUCT_DEVICE := generic_arm64 PRODUCT_BRAND := Android PRODUCT_MODEL := AOSP on ARM64 + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/target/product/aosp_x86_64.mk b/target/product/aosp_x86_64.mk index 3040dd3473..4344f50cae 100644 --- a/target/product/aosp_x86_64.mk +++ b/target/product/aosp_x86_64.mk @@ -74,3 +74,5 @@ PRODUCT_NAME := aosp_x86_64 PRODUCT_DEVICE := generic_x86_64 PRODUCT_BRAND := Android PRODUCT_MODEL := AOSP on x86_64 + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/target/product/module_arm64.mk b/target/product/module_arm64.mk index 2e8c8a7f8b..634a03dca1 100644 --- a/target/product/module_arm64.mk +++ b/target/product/module_arm64.mk @@ -19,3 +19,5 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) PRODUCT_NAME := module_arm64 PRODUCT_DEVICE := module_arm64 + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/target/product/module_arm64only.mk b/target/product/module_arm64only.mk index c0769bfa15..822ac247c0 100644 --- a/target/product/module_arm64only.mk +++ b/target/product/module_arm64only.mk @@ -19,3 +19,5 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) PRODUCT_NAME := module_arm64only PRODUCT_DEVICE := module_arm64only + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/target/product/module_x86_64.mk b/target/product/module_x86_64.mk index 20f443a1e8..9bd0264f36 100644 --- a/target/product/module_x86_64.mk +++ b/target/product/module_x86_64.mk @@ -19,3 +19,5 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit.mk) PRODUCT_NAME := module_x86_64 PRODUCT_DEVICE := module_x86_64 + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true diff --git a/target/product/module_x86_64only.mk b/target/product/module_x86_64only.mk index b0d72bfe2b..056fb9097c 100644 --- a/target/product/module_x86_64only.mk +++ b/target/product/module_x86_64only.mk @@ -19,3 +19,5 @@ $(call inherit-product, $(SRC_TARGET_DIR)/product/core_64_bit_only.mk) PRODUCT_NAME := module_x86_64only PRODUCT_DEVICE := module_x86_64only + +PRODUCT_NO_BIONIC_PAGE_SIZE_MACRO := true