Bug 50162 - merge rtlbootstrap.mk into configure.in
Summary: merge rtlbootstrap.mk into configure.in
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: LibreOffice (show other bugs)
(earliest affected)
Master old -3.6
Hardware: All All
: medium minor
Assignee: DavidO
Whiteboard: target:3.6.0
Keywords: difficultyBeginner, easyHack, skillCpp, skillScript, topicCleanup
Depends on:
Blocks: 50163
  Show dependency treegraph
Reported: 2012-05-20 23:12 UTC by David Tardon
Modified: 2015-12-15 23:19 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Note You need to log in before you can comment on or make changes to this bug.
Description David Tardon 2012-05-20 23:12:20 UTC
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.
Comment 1 DavidO 2012-05-21 00:01:32 UTC
With two macro added to Library_sal.mk -DTHIS_OS=$(RTL_OS) -DTHIS_ARCH=$(RTL_ARCH), macro.hxx can be removed completely.
Comment 2 Don't use this account, use tml@iki.fi 2012-05-21 00:48:31 UTC
Surely we then should use -DRTL_OS=$(RTL_OS) -DRTL_ARCH=$(RTL_ARCH), much less confusing.
Comment 3 DavidO 2012-05-21 06:22:54 UTC
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):

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"
#    define THIS_ARCH "SPARC"

#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
Comment 4 Not Assigned 2012-05-23 22:25:18 UTC
David Ostrovsky committed a patch related to this issue.
It has been pushed to "master":


fdo#50162 merge rtlbootstrap.mk into configure.in
Comment 5 Robinson Tryon (qubit) 2015-12-15 23:19:15 UTC
Migrating Whiteboard tags to Keywords: (EasyHack DifficultyBeginner SkillScript SkillCpp TopicCleanup )