rtlbootstrap.mk contains definitions of two platform-specific variables: RTL_OS and RTL_ARCH. It is created by running sal/rtl/source/macro.hxx through preprocessor (with the exception of Windows, where the values are written directly; see sal/CustomTarget_generated.mk). What should be done is to map the platform tests in sal/rtl/source/macro.hxx (plus the additional Windows ones) onto platform tests in configure.in (the case block that starts at line 2985 ATM). This needs some care, because I doubt it very much there is one-to-one correspondence between the checks. The two new variables then need to be added to config_host.mk.in, all references to rtlbootstrap.mk removed (because they are always available now through config_host.mk) and the code in sal removed.
With two macro added to Library_sal.mk -DTHIS_OS=$(RTL_OS) -DTHIS_ARCH=$(RTL_ARCH), macro.hxx can be removed completely.
Surely we then should use -DRTL_OS=$(RTL_OS) -DRTL_ARCH=$(RTL_ARCH), much less confusing.
I'm diving deeper in it and facing with follow problem during the mapping in configure.in how can the follow sub-defines be determined (without preprocessing of macro.hxx): IS_LP64, OSL_BIGENDIAN and __ARM_EABI__. This knowledge is needed to set RTL_ARCH in the right way. here we go: [...] #elif defined SPARC #if defined IS_LP64 # define THIS_ARCH "SPARC64" #else # define THIS_ARCH "SPARC" #endif [...] #elif defined MIPS # ifdef OSL_BIGENDIAN # define THIS_ARCH "MIPS_EB" # else # define THIS_ARCH "MIPS_EL" # endif #elif defined ARM # ifdef __ARM_EABI__ # define THIS_ARCH "ARM_EABI" # else # define THIS_ARCH "ARM_OABI" # endif Thanks David
David Ostrovsky committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=eadcfa4e276aad610c674dd3eabc0956cb669d9b fdo#50162 merge rtlbootstrap.mk into configure.in
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript SkillCpp TopicCleanup ) [NinjaEdit]