|
From: George R. <gr...@us...> - 2001-09-18 21:27:10
|
I looked at your patch, and I have a few comments. * UBool should be used instead of bool_t because the bool_t size is undefined. I have removed the bool_t definition in ICU for you. We (ICU) had a long discussion about this a long time ago. * I fixed the appendHex problem by defining appendHex with an int32_t type for the digits parameter. * ICU never appends the compiler name to a library name. This is due to several portability concerns. This change will not go into ICU. * The Makefiles are automatically generated from the various Makefile.in and mh-* files when you use configure. So I found it extrememly difficult to find the real changes. Could you give me a patch with changes to just Makefile.in and mh-* files? * Do realize that some information in the mh-* files has changed due to some changes in the build process. Even though everything should build fine, some tests fail to run completely. Could you submit an mh file for the current CVS snapshot? * I'm intersted in what failed when you increased the optimization level. Maybe you could tell me? Thanks for the patch! George Rhoten IBM Globalization Center of Competency/ICU Cupertino, CA, USA Sent by: icu...@ww... To: ic...@ww... cc: Subject: KAI C++ Linux patch Here is a patch that will allow you to build ICU 1.8.1 using KAI C++ 4.0f on Linux. I've tested this on Red Hat 7.1 and Slackware 8.0. Applying The Patch Since I don't know anything about autoconf and configure, I just configured ICU normally, generating make files for gcc. Then I manually tweaked the make files so that KCC would be used instead of gcc. I added a file, source/config/mh-kcc, to help make life easier. Here are the steps for applying this patch: 1. Extract icu-1.8.1.tgz. 2. Go to the ICU source directory and change file permissions according to the ICU documentation. 3. Execute "runConfigureICU LinuxRedHat6.0". 4. While still in the source directory execute "zcat kcc-linux.patch.gz | patch -p1". Please qualify the path to the patch file if need be. 5. Now you can run "make check" and everything should be happy. Beware the warnings that are generated. Due to KCC's extremely strict adherence to standards, it will generate an amazing number of warnings. Most of them seem to relate to unreferenced local variables and mixing enum types. 6. Note that for libraries that contain C++ definitions, "_KCC" is appended to the library's name. Thus, libicuuc.so becomes libicuuc_KCC.so. This allows both gcc and KCC ones to coexist on one machine. Notes * For the most part I only had to change make files. However I did have to change a few source code files for this to work. Here's what I changed. common/unicode/umachine.h: I had to change the definition of the type bool_t. There is a very weird bug in KCC where it causes link failures if bool_t is defined as "signed char". Therefore, I had to conditionalize the definition of bool_t making it "char" if the compiler is KCC. (Note that there is a very minor bug in ICU here. The type bool_t is defined, but it is never used. To my mind it would be logical to define UBool in terms of bool_t.) common/cpputils.h: I added a uprv_arrayCopy() function that works with bool_t[] arrays. The current suite of array copiers don't work when UBool and bool_t are not defined in terms of something like int8_t. test/intltest/intltest.(h|cpp): The weird signed char bug reared its head again here, so I had to change IntlTest::appendHex(). * If you have an existing ICU development environment, you can add the KCC libraries to it by doing the following: 1. Copy the patched version of common/unicode/umachine.h to the ICU include directory. 2. Copy libicuuc_KCC.so.18.1 and its symbolic links and libicui18n_KCC.so.18.1 and its symbolic links to the ICU lib directory. That will allow you to use the environment with either gcc or KCC. * Please do not increase the KCC optimizaiton level above "1". I've tried all of them, and anything higher than "1" produces extremely flaky binaries. Enjoy, Will Mason ===== "Academic debates are heated because there is so little at stake." --Anonymous __________________________________________________ Terrorist Attacks on U.S. - How can you help? Donate cash, emergency relief information http://dailynews.yahoo.com/fc/US/Emergency_Information/ |