Bug 50162

Summary: merge rtlbootstrap.mk into configure.in
Product: LibreOffice Reporter: David Tardon <dtardon>
Component: LibreofficeAssignee: DavidO <d.ostrovsky>
Status: RESOLVED FIXED QA Contact:
Severity: minor    
Priority: medium CC: d.ostrovsky, tml
Version: Master old -3.6   
Hardware: All   
OS: All   
Whiteboard: EasyHack DifficultyBeginner SkillScript SkillCpp TopicCleanup target:3.6.0
i915 platform: i915 features:
Bug Depends on:    
Bug Blocks: 50163    

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):

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
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":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=eadcfa4e276aad610c674dd3eabc0956cb669d9b

fdo#50162 merge rtlbootstrap.mk into configure.in

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.