From 109c4d89da6c8361a09f5d6595b139548f987798 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Thu, 5 Sep 2024 20:28:22 -0500 Subject: [PATCH] Update: Add android build support. --- data/build/settings | 14 +++++++++----- data/build/settings.control | 14 +++++++++----- data/build/stand_alone/settings.control | 6 +++++- 3 files changed, 23 insertions(+), 11 deletions(-) diff --git a/data/build/settings b/data/build/settings index d5ca4f4..35e9961 100644 --- a/data/build/settings +++ b/data/build/settings @@ -1,15 +1,16 @@ # fss-0001 # # Modes: -# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases. -# - individual_thread: This is required when compiling in individual mode with "thread" mode. -# - level: Compile using per level libraries. -# - monolithic: Compile using per monolithic libraries. +# - android: Compile on an android system (using Termux; may need modification depending on the android system). # - clang: Use CLang rather than the default, which is generally GCC. # - coverage: Compile for building coverage. # - fanalyzer: Compile using GCC's -fanalyzer compile time option. # - gcc: Use GCC specific settings. # - gcc_13: Use GCC version 13 or greater specific settings. +# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases. +# - individual_thread: This is required when compiling in individual mode with "thread" mode. +# - level: Compile using per level libraries. +# - monolithic: Compile using per monolithic libraries. # - test: Compile for a test, such as unit testing. # - thread: Compile with thread support. # - threadless: Compile without thread support. @@ -23,7 +24,7 @@ version_micro 0 version_file micro version_target minor -modes individual individual_thread level monolithic clang coverage fanalyzer gcc gcc_13 test thread threadless +modes android clang coverage fanalyzer gcc gcc_13 individual individual_thread level monolithic test thread threadless modes_default monolithic thread gcc build_compiler gcc @@ -78,12 +79,14 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L #defines -D_di_libcap_ defines -D_libcap_legacy_only_ +defines-android -D_di_f_thread_attribute_affinity_get_ -D_di_f_thread_attribute_affinity_set_ -D_di_f_thread_attribute_concurrency_get_ -D_di_f_thread_attribute_concurrency_set_ -D_di_f_thread_attribute_default_get_ -D_di_f_thread_attribute_default_set_ -D_di_f_thread_cancel_ -D_di_f_thread_cancel_state_set_ -D_di_f_thread_cancel_test_ -D_di_f_thread_join_try_ -D_di_f_thread_join_timed_ -D_pthread_mutex_prioceiling_unsupported_ -D_di_f_thread_semaphore_file_close_ -D_di_f_thread_semaphore_file_open_ -D_di_f_thread_semaphore_file_delete_ -D_di_f_thread_cancel_type_set_ defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ defines-threadless -D_di_thread_support_ flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces flags -fstack-clash-protection -fno-delete-null-pointer-checks flags -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now +flags-android -Wno-implicit-function-declaration -Wl,-z,norelro flags-clang -Wno-logical-op-parentheses flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ flags-fanalyzer -fanalyzer @@ -94,3 +97,4 @@ flags-thread -pthread flags_library -fPIC flags_object -fPIC flags_program -fPIE +flags_program-android -fPIE -Wl,-z,relro diff --git a/data/build/settings.control b/data/build/settings.control index 0d0f399..95b0b85 100644 --- a/data/build/settings.control +++ b/data/build/settings.control @@ -1,15 +1,16 @@ # fss-0001 # # Modes: -# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases. -# - individual_thread: This is required when compiling in individual mode with "thread" mode. -# - level: Compile using per level libraries. -# - monolithic: Compile using per monolithic libraries. +# - android: Compile on an android system (using Termux; may need modification depending on the android system). # - clang: Use CLang rather than the default, which is generally GCC. # - coverage: Compile for building coverage. # - fanalyzer: Compile using GCC's -fanalyzer compile time option. # - gcc: Use GCC specific settings. # - gcc_13: Use GCC version 13 or greater specific settings. +# - individual: Compile using per project (individual) libraries, does not handle thread or threadless cases. +# - individual_thread: This is required when compiling in individual mode with "thread" mode. +# - level: Compile using per level libraries. +# - monolithic: Compile using per monolithic libraries. # - test: Compile for a test, such as unit testing. # - thread: Compile with thread support. # - threadless: Compile without thread support. @@ -23,7 +24,7 @@ version_micro 0 version_file micro version_target minor -modes individual individual_thread level monolithic clang coverage fanalyzer gcc gcc_13 test thread threadless +modes android clang coverage fanalyzer gcc gcc_13 individual individual_thread level monolithic test thread threadless modes_default monolithic thread gcc build_compiler gcc @@ -77,12 +78,14 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L #defines -D_di_libcap_ defines -D_libcap_legacy_only_ +defines-android -D_di_f_thread_attribute_affinity_get_ -D_di_f_thread_attribute_affinity_set_ -D_di_f_thread_attribute_concurrency_get_ -D_di_f_thread_attribute_concurrency_set_ -D_di_f_thread_attribute_default_get_ -D_di_f_thread_attribute_default_set_ -D_di_f_thread_cancel_ -D_di_f_thread_cancel_state_set_ -D_di_f_thread_cancel_test_ -D_di_f_thread_join_try_ -D_di_f_thread_join_timed_ -D_pthread_mutex_prioceiling_unsupported_ -D_di_f_thread_semaphore_file_close_ -D_di_f_thread_semaphore_file_open_ -D_di_f_thread_semaphore_file_delete_ -D_di_f_thread_cancel_type_set_ defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ defines-threadless -D_di_thread_support_ flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces flags -fstack-clash-protection -fno-delete-null-pointer-checks flags -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now +flags-android -Wno-implicit-function-declaration -Wl,-z,norelro flags-clang -Wno-logical-op-parentheses flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ flags-fanalyzer -fanalyzer @@ -93,3 +96,4 @@ flags-thread -pthread flags_library -fPIC flags_object -fPIC flags_program -fPIE +flags_program-android -fPIE -Wl,-z,relro diff --git a/data/build/stand_alone/settings.control b/data/build/stand_alone/settings.control index 21f7738..555a190 100644 --- a/data/build/stand_alone/settings.control +++ b/data/build/stand_alone/settings.control @@ -6,6 +6,7 @@ # fake -s data/build/stand_alone/settings.control clean build # # Modes: +# - android: Compile on an android system (using Termux; may need modification depending on the android system). # - clang: Use Clang rather than the default, which is generally GCC. # - coverage: Compile for building coverage. # - fanalyzer: Compile using GCC's -fanalyzer compile time option. @@ -25,7 +26,7 @@ version_micro 0 version_file micro version_target minor -modes clang coverage fanalyzer gcc gcc_13 test thread threadless +modes android clang coverage fanalyzer gcc gcc_13 test thread threadless modes_default thread gcc build_compiler gcc @@ -107,12 +108,14 @@ environment LANG LC_ALL LC_COLLATE LC_CTYPE LC_FASTMSG LC_MESSAGES LC_MONETARY L defines -include sources/c/config.h -I sources/c/ #defines -D_di_libcap_ defines -D_libcap_legacy_only_ +defines-android -D_di_f_thread_attribute_affinity_get_ -D_di_f_thread_attribute_affinity_set_ -D_di_f_thread_attribute_concurrency_get_ -D_di_f_thread_attribute_concurrency_set_ -D_di_f_thread_attribute_default_get_ -D_di_f_thread_attribute_default_set_ -D_di_f_thread_cancel_ -D_di_f_thread_cancel_state_set_ -D_di_f_thread_cancel_test_ -D_di_f_thread_join_try_ -D_di_f_thread_join_timed_ -D_pthread_mutex_prioceiling_unsupported_ -D_di_f_thread_semaphore_file_close_ -D_di_f_thread_semaphore_file_open_ -D_di_f_thread_semaphore_file_delete_ -D_di_f_thread_cancel_type_set_ defines-thread -D_pthread_attr_unsupported_ -D_pthread_sigqueue_unsupported_ defines-threadless -D_di_thread_support_ flags -O2 -g -fdiagnostics-color=always -Wno-logical-not-parentheses -Wno-parentheses -Wno-missing-braces flags -fstack-clash-protection -fno-delete-null-pointer-checks flags -Wl,-z,nodlopen -Wl,-z,noexecstack -Wl,-z,relro -Wl,-z,now +flags-android -Wno-implicit-function-declaration -Wl,-z,norelro flags-clang -Wno-logical-op-parentheses flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ flags-fanalyzer -fanalyzer @@ -123,3 +126,4 @@ flags-thread -pthread flags_library -fPIC flags_object -fPIC flags_program -fPIE +flags_program-android -fPIE -Wl,-z,relro -- 1.8.3.1