qt5base-lts/mkspecs/features
Tor Arne Vestbø 8a42502682 iOS: Change main-wrapper logic to not require changing the user's main
Instead of using a define to rename the user's main() function during
compilation, we leave the user code alone, and inject our wrapper one
step earlier in the process, at the application entry point 'start'.

This entry point is provided by crt1.o, which is normally linked into
the application automatically. The start() function sets up some state
and then calls main(), but we change the start() function to instead
call our main wrapper.

Instead of shipping our own crt1 binary/sources, we make a copy of
the appropriate crt1.o at build time, and modify its symbol table in
place. This is unproblematic as long as we keep the same length for
the wrapper function name, as the symbol names are just entries in
the global string table of the object file.

The result is that for the regular Qt use-case the user won't see
any changes to their main function, and we have more control over
the startup sequence. For the hybrid use-case, we no longer rely
on the fragile solution of having our back-up 'main' symbol in
a single translation unit, which would break eg with --load_all,
and we don't need to provide a dummy 'qt_user_main' symbol.

OSX 10.8 and iOS 6.0 introduced a new load command called LC_MAIN,
which places the state setup in the shared dyld, and then just
calls main() directly. Once we bump the minimum deployment target
to iOS 6.0 we can start using this loader instead of LC_UNIXTHREAD,
but for now we force the classic loader using the -no_new_main flag.

There's also a bug in the ld64 linker provided by the current Xcode
toolchains that results in the -e linker flag (to set the entry
point) having no effect, but hopefully this bug has been fixed
(or Apple has switched to the LLVM lld linker) by the time we
bump our deployment target.

Change-Id: Ie0ba869c13ddc5277dc95c539aebaeb60e949dc2
Reviewed-by: Tor Arne Vestbø <tor.arne.vestbo@digia.com>
2013-09-11 21:50:55 +02:00
..
data Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-09-10 23:22:23 +02:00
ios iOS: Change main-wrapper logic to not require changing the user's main 2013-09-11 21:50:55 +02:00
mac Merge remote-tracking branch 'origin/release' into stable 2013-06-25 23:25:35 +02:00
qpa Hide Harfbuzz from the outer world 2013-03-13 14:46:26 +01:00
unix gdb_dwarf_index: Use a sed call that's more POSIX-compliant. 2013-08-12 22:29:30 +02:00
win32 ANGLE: Fix static build. 2013-02-25 10:34:11 +01:00
android.prf Introducing the Qt Android port 2013-03-05 08:31:23 +01:00
build_pass.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
c++11.prf Enable C++11 on OSX when using Clang 2013-04-05 14:23:23 +02:00
cmake_functions.prf Move the cmakeRelativePath function to cmake_functions. 2013-07-24 11:54:18 +02:00
configure.prf iOS: Wrap Xcode projects in Makefile for convenience and subdirs support 2013-08-13 01:38:54 +02:00
create_cmake.prf Merge "Merge remote-tracking branch 'origin/stable' into dev" into refs/staging/dev 2013-09-10 23:22:23 +02:00
ctest_testcase_common.prf Use the compilers used by Qt for the CMake tests. 2013-07-19 12:32:14 +02:00
ctest_testcase_installed.prf Only run the cmake test in the install location if not already done. 2013-07-15 21:56:51 +02:00
ctest_testcase.prf Always use forward slashes in paths passed to cmake. 2013-07-10 13:05:01 +02:00
dbusadaptors.prf de-duplicate dbusadaptors.prf vs. dbusinterfaces.prf 2012-08-04 00:52:38 +02:00
dbuscommon.pri Give the extra compiler a unique name for the vcproj generation 2013-08-20 06:35:04 +02:00
dbusinterfaces.prf de-duplicate dbusadaptors.prf vs. dbusinterfaces.prf 2012-08-04 00:52:38 +02:00
declarative_debug.prf Rename quick1_debug back to declarative_debug 2012-10-04 03:03:00 +02:00
default_post.prf Fix interaction between sdk.prf and silent.prf 2013-03-14 19:49:38 +01:00
default_pre.prf remove some unnecessary CONFIG additions 2012-12-17 14:08:17 +01:00
designer_defines.prf dispose of library-bound feature files 2012-06-19 16:39:52 +02:00
device_config.prf add some docu about the project loading sequence 2012-12-13 09:10:45 +01:00
egl.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
exceptions_off.prf turn off exceptions by default where they aren't required 2012-05-17 05:14:26 +02:00
exceptions.prf turn off exceptions by default where they aren't required 2012-05-17 05:14:26 +02:00
exclusive_builds.prf Include PRECOMPILED_DIR in dirs fixed by fixExclusiveOutputDirs() 2013-04-03 18:04:37 +02:00
gcov.prf Integrate gcov support into Qt build system. 2013-08-07 13:38:07 +02:00
include_source_dir.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
incredibuild_xge.prf remove pointless conditionals+branches 2012-09-19 19:54:44 +02:00
java.prf Fix bootstrap class path warning (java) 2013-08-22 09:46:36 +02:00
lex.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
link_pkgconfig.prf add support for PKGCONFIG_PRIVATE 2012-08-07 16:40:07 +02:00
moc.prf Fix whitespace issues in *.prf 2013-03-22 19:52:26 +01:00
no_debug_info.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
opengles1.prf Add a new qmake feature to support OpenGL ES 1 apps 2012-02-28 22:35:24 +01:00
qml1_module.prf mark a bunch of features as internal 2012-12-12 21:48:02 +01:00
qml1_plugin.prf mark a bunch of features as internal 2012-12-12 21:48:02 +01:00
qml_debug.prf Rename the 'declarative debug support' to 'qml debug support' 2012-03-31 16:33:04 +02:00
qml_module.prf broaden the effect of CONFIG+=force_independent somewhat 2013-03-15 18:02:09 +01:00
qml_plugin.prf mkspecs/qml_plugin: adding -nonrelocatable flag to qmldump call 2013-06-10 23:29:36 +02:00
qmltestcase.prf Distinguish between 'mac' and 'macx' qmake scopes 2013-03-05 20:59:45 +01:00
qt_android_deps.prf use correct variable for library base path 2013-06-10 21:12:20 +02:00
qt_app.prf split qt_app.prf out of qt_tool.prf 2013-04-26 19:15:25 +02:00
qt_build_config.prf groundwork for making "configure -nomake tools" sane 2013-04-26 19:15:17 +02:00
qt_build_paths.prf reshuffle path setup 2013-06-10 21:12:24 +02:00
qt_common.prf Fix -Wno-error=deprecated for GCC and Clang 2013-09-04 00:05:12 +02:00
qt_config.prf update some comments relating to forwarding module pri files 2013-06-10 21:12:17 +02:00
qt_docs_targets.prf mark a bunch of features as internal 2012-12-12 21:48:02 +01:00
qt_docs.prf Merge branch 'stable' into dev 2013-07-11 16:42:01 +02:00
qt_example_installs.prf add -compile-examples configure option 2013-05-26 10:09:58 +02:00
qt_functions.prf Merge remote-tracking branch 'origin/stable' into dev 2013-09-07 16:18:32 +02:00
qt_headersclean.prf headersclean: process private modules correctly 2013-07-03 15:31:13 +02:00
qt_installs.prf install host libraries into -hostprefix 2013-05-13 21:54:40 +02:00
qt_module_headers.prf reshuffle path setup 2013-06-10 21:12:24 +02:00
qt_module_pris.prf make requirement for -private suffix explicit, take 2 2013-07-05 11:36:22 +02:00
qt_module.prf don't install non-framework headers in addition to frameworks, take 2 2013-09-02 17:58:28 +02:00
qt_parts.prf make src/ subdir optional 2013-04-26 19:15:21 +02:00
qt_plugin.prf Teach CMake about Qt 5 plugins. 2013-09-10 14:38:18 +02:00
qt_targets.prf Update copyright year in Digia's license headers 2013-01-18 09:07:35 +01:00
qt_tool.prf export QT_TOOL_ENV to the tool module pri file 2013-08-27 19:12:06 +02:00
qt.prf take advantage of new safety regarding build config resolution 2013-02-18 15:52:39 +01:00
resolve_config.prf add QT_CONFIG's static/shared to CONFIG on startup 2013-02-18 15:52:43 +01:00
resolve_target.prf Distinguish between 'mac' and 'macx' qmake scopes 2013-03-05 20:59:45 +01:00
resources.prf fix rcc & uic .depend_commands 2013-06-15 21:39:34 +02:00
silent.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
simd.prf Merge branch 'stable' into dev 2013-07-11 16:42:01 +02:00
spec_post.prf Add osx and darwin scopes to qmake. 2013-07-11 18:26:45 +02:00
spec_pre.prf add some docu about the project loading sequence 2012-12-13 09:10:45 +01:00
testcase_targets.prf factor out testcase_targets.prf 2012-12-03 15:56:28 +01:00
testcase.prf assemble the tool commands at use time, after all 2013-06-15 21:39:12 +02:00
testcocoon.prf fix host vs. makefile directory separator mess 2012-07-28 00:09:45 +02:00
testlib_defines.prf auto-generate module pris 2012-06-19 16:40:06 +02:00
uic.prf fix rcc & uic .depend_commands 2013-06-15 21:39:34 +02:00
use_c_linker.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
vxworks.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
warn_off.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
warn_on.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00
wayland-scanner.prf Fix wayland-scanner to work with CONFIG+=silent 2013-07-20 15:54:27 +02:00
yacc.prf Initial import from the monolithic Qt. 2011-04-27 12:05:43 +02:00