Issue 16151

Summary: icu: Need -fPIC for when building static libs to be linked into shared
Product: Build Tools Reporter: khendricks
Component: codeAssignee: hjs <hans-joachim.lankenau>
Status: CLOSED FIXED QA Contact: issues@tools <issues>
Severity: Trivial    
Priority: P3 CC: issues
Version: OOo 1.1 RC   
Target Milestone: ---   
Hardware: Other   
OS: Linux, all   
Issue Type: DEFECT Latest Confirmation in: ---
Developer Difficulty: ---

Description khendricks 2003-06-27 13:26:38 UTC
Hi,  
 
icu no longer handles building the static libs with -fPIC as it once did in OOo 643.  
That part of the patch got lost somehow.  
  
We need to  force -fPIC even when building static libs if they will be compiled into  
shared libs later in the build.  
  
So I have used dmake create_patch to add this tidbit to the icu-2.2.patch  
   
*** misc/icu/source/config/mh-linux     2002-01-24 12:35:04.000000000 -0500  
--- misc/build/icu/source/config/mh-linux       2003-06-21 12:39:04.000000000   
-0400  
***************  
*** 10,15 ****  
--- 10,18 ----  
  GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)  
  
  ## Flags for position independent code  
+ STATICCFLAGS = -fPIC  
+ STATICCXXFLAGS = -fPIC  
+ STATICCPPFLAGS = -DPIC  
  SHAREDLIBCFLAGS = -fPIC  
  SHAREDLIBCXXFLAGS = -fPIC  
  SHAREDLIBCPPFLAGS = -DPIC  
***************  
  
This will not hurt linux x86 and is neede by linux sparc, linux s390, linux ppc,  
 linux x86-64, etc    
  
Please commit to cws_srx645_ooo11rc if possible? 
 
Thanks 
  
Kevin
Comment 1 hjs 2003-06-27 14:06:15 UTC
patch committed to ooo11rc. please verify
Comment 2 khendricks 2003-06-27 14:10:39 UTC
Hi, 
 
Updated the icu-2.2.patch and sure enough the fix is there! 
 
This has to be the fastest bug on record! 
 
I am now verifying this. 
 
Thanks 
 
Kevin 
 
Comment 3 khendricks 2003-06-27 14:11:01 UTC
Hi, 
 
Closing.