Modify

Ticket #8256 (accepted enhancement)

Opened 5 years ago

Last modified 2 months ago

patch to allow ICU to build on Haiku

Reported by: scottmc2@… Owned by: srl
Priority: assess Milestone: UNSCH
Component: build_c Keywords:
Cc: Project (C/J): ICU4C
Review: Sensitive: no
Weeks: Xref:

Description

Haiku uses ICU, and has a patch to allow for building it. We would like to get our patch cleaned up and applied upstream but could use some guidance on this. Here's a link to our open trac ticket for this: http://ports.haiku-files.org/ticket/402 And a link to the current patch: http://ports.haiku-files.org/browser/haikuports/trunk/dev-libs/icu/patches/icu-4.4.1.patch

Attachments

Change History

comment:1 Changed 4 years ago by yoshito

  • Owner changed from somebody to srl

comment:2 Changed 3 years ago by markus

  • Project (C/J) changed from all to ICU4C
  • Sensitive unset
  • Component changed from unknown to build_c

comment:3 Changed 9 months ago by pulkomandy@…

Hi, Current patch available here: http://bb.haikuports.org/haikuports/raw/dc6079731828f6a6db160ee6ef5a9a84bc58611d/dev-libs/icu/patches/icu-54.1.patchset

Some hacks to support gcc2 (guarded by GNUC == 2):

  • making inner classes friend of the outer class so they can access it,
  • replacing "using parent::method" with redeclaration of the methods,
  • Use the "c9x" standard as gcc2 didn't know c99 yet
  • Attribute "visibility" is not supported
  • gcc2 can't figure out some static_casts, replaced with C-style casts
  • C++ limits and ostream includes are not available
  • U_OVERRIDE_CXX_ALLOCATION doesn't work
  • std::left is missing, but ios::left can be used.
  • undefine U_DISABLE_RENAMING as aliasing namespaces doesn't work

Some fixes not specific to gcc2:

  • -DSTDC_ISO_10646 does not need to be added to haiku flas as it is already there
  • Disabled configure checks for tzset and tzname, as these are implemented using ICU on Haiku, so calling them from inside ICU will deadlock. Also disabled in putilimp.h (both changes are needed).

comment:4 follow-up: ↓ 5 Changed 9 months ago by markus

I would prefer not to hack current ICU code so it works with the quirks of such an ancient and obsolete compiler, especially when so many files get littered with #if __GNUC__ == 2.

See the gcc version discussion in http://en.wikipedia.org/wiki/Haiku_(operating_system)#Compatibility_with_BeOS

comment:5 in reply to: ↑ 4 Changed 9 months ago by srl

Replying to markus:

I would prefer not to hack current ICU code so it works with the quirks of such an ancient and obsolete compiler, especially when so many files get littered with #if __GNUC__ == 2.

See the gcc version discussion in http://en.wikipedia.org/wiki/Haiku_(operating_system)#Compatibility_with_BeOS

Right. So we need to split out the patches that are gcc2 specific. I do think we should factor how <iostream> etc is included into a separate file, that may fix the udbginfo bug also.

There's another issue here, and that is the time zone detectoin. We should offer a switch to tell icu not to try to call into the host time zone code at all, even if configure detects something. This could affect other OS consumers, in simplifying the #defines they have to set.

comment:6 Changed 2 months ago by srl

  • Status changed from new to accepted

comment:7 Changed 2 months ago by markus

  • version 4.4 deleted
View

Add a comment

Modify Ticket

Action
as accepted
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.