From 45a14a01c43e45d25215daf0ef689f537e181e30 Mon Sep 17 00:00:00 2001 From: midipix Date: Jun 09 2021 06:02:36 +0000 Subject: build system: cfgtest_library_presence(): added freestanding code snippet. --- diff --git a/sofort/cfgtest/cfgtest.sh b/sofort/cfgtest/cfgtest.sh index 1e3d707..4a50e8f 100644 --- a/sofort/cfgtest/cfgtest.sh +++ b/sofort/cfgtest/cfgtest.sh @@ -596,7 +596,15 @@ cfgtest_library_presence() cfgtest_prolog 'lib module' '(see config.log)' fi - cfgtest_code_snippet='int main(void){return 0;}' + if [ "$mb_cfgtest_environment" = 'freestanding' ]; then + if [ -z "ccenv_cc_underscore" ]; then + cfgtest_code_snippet='int start(void){return 0;}' + else + cfgtest_code_snippet='int _start(void){return 0;}' + fi + else + cfgtest_code_snippet='int main(void){return 0;}' + fi cfgtest_common_init 'lib'