summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authormidipix <writeonce@midipix.org>2021-06-09 05:59:30 +0000
committermidipix <writeonce@midipix.org>2021-06-09 05:59:30 +0000
commitc2598a4b1f21c5f8228ce85f6fb6b64ecb34e3bf (patch)
treec98f206c0018c9fb59c2c2de20c31651138f4004
parentf3f1d37b0f5b2b2fb5ea7701468acd3cf7666d68 (diff)
downloadslibtool-c2598a4b1f21c5f8228ce85f6fb6b64ecb34e3bf.tar.bz2
slibtool-c2598a4b1f21c5f8228ce85f6fb6b64ecb34e3bf.tar.xz
build system: cfgtest_library_presence(): added freestanding code snippet.
-rw-r--r--sofort/cfgtest/cfgtest.sh10
1 files changed, 9 insertions, 1 deletions
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'