From c2292711f6b33b1d99736057e3ca1ddfc9b63162 Mon Sep 17 00:00:00 2001 From: Kevin Day Date: Wed, 4 Sep 2024 19:10:56 -0500 Subject: [PATCH] Update: Add android build support. --- data/build/settings | 14 +++++++++----- data/build/settings.controller | 14 +++++++++----- data/build/settings.init | 14 +++++++++----- data/build/stand_alone/settings.controller | 20 ++++++++++++-------- data/build/stand_alone/settings.init | 20 ++++++++++++-------- 5 files changed, 51 insertions(+), 31 deletions(-) diff --git a/data/build/settings b/data/build/settings index 9505c85..ed15f3a 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 gcc gcc_13 test fanalyzer coverage thread threadless +modes android clang coverage gcc gcc_13 fanalyzer individual individual_thread level monolithic test thread threadless modes_default monolithic thread gcc build_compiler gcc @@ -115,12 +116,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 @@ -131,3 +134,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.controller b/data/build/settings.controller index 2bdb765..ac617d5 100644 --- a/data/build/settings.controller +++ b/data/build/settings.controller @@ -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 gcc gcc_13 test fanalyzer coverage thread threadless +modes android clang coverage gcc gcc_13 fanalyzer 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/settings.init b/data/build/settings.init index be3fbff..c9627f3 100644 --- a/data/build/settings.init +++ b/data/build/settings.init @@ -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 gcc gcc_13 test fanalyzer coverage thread threadless +modes android clang coverage gcc gcc_13 fanalyzer 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.controller b/data/build/stand_alone/settings.controller index 2e3f65e..fde087a 100644 --- a/data/build/stand_alone/settings.controller +++ b/data/build/stand_alone/settings.controller @@ -6,13 +6,14 @@ # fake -s data/build/stand_alone/settings.controller clean build # # Modes: -# - 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. -# - test: Compile for a test, such as unit testing. -# - thread: Compile with thread support. -# - threadless: Compile without thread support. +# - 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. +# - test: Compile for a test, such as unit testing. +# - thread: Compile with thread support. +# - threadless: Compile without thread support. # build_name controller @@ -24,7 +25,7 @@ version_micro 0 version_file micro version_target minor -modes clang coverage fanalyzer gcc test thread threadless +modes android clang coverage fanalyzer gcc test thread threadless modes_default thread gcc build_compiler gcc @@ -141,12 +142,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-thread -pthread flags-clang -Wno-logical-op-parentheses flags-gcc_13 -fstrict-flex-arrays=3 @@ -157,3 +160,4 @@ flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ flags_library -fPIC flags_object -fPIC flags_program -fPIE +flags_program-android -fPIE -Wl,-z,relro diff --git a/data/build/stand_alone/settings.init b/data/build/stand_alone/settings.init index 7b14c52..7cfca6f 100644 --- a/data/build/stand_alone/settings.init +++ b/data/build/stand_alone/settings.init @@ -6,13 +6,14 @@ # fake -s data/build/stand_alone/settings.init clean build # # Modes: -# - 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. -# - test: Compile for a test, such as unit testing. -# - thread: Compile with thread support. -# - threadless: Compile without thread support. +# - 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. +# - test: Compile for a test, such as unit testing. +# - thread: Compile with thread support. +# - threadless: Compile without thread support. # build_name init @@ -24,7 +25,7 @@ version_micro 0 version_file micro version_target minor -modes clang coverage fanalyzer gcc test thread threadless +modes android clang coverage fanalyzer gcc test thread threadless modes_default thread gcc build_compiler gcc @@ -141,12 +142,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-thread -pthread flags-clang -Wno-logical-op-parentheses flags-gcc_13 -fstrict-flex-arrays=3 @@ -157,3 +160,4 @@ flags-coverage -O0 --coverage -fprofile-abs-path -fprofile-dir=build/coverage/ flags_library -fPIC flags_object -fPIC flags_program -fPIE +flags_program-android -fPIE -Wl,-z,relro -- 1.8.3.1