default to -r on gbuild for performance (assumed esp. on make 3.82)
[LibreOffice.git] / icu / icu4c-aix.patch
blobaedaae12adbd034bc2e598d05d49d75d28f857e8
1 --- misc/icu/source/config/mh-aix-gcc 2009-01-15 01:46:10.000000000 -0600
2 +++ misc/build/icu/source/config/mh-aix-gcc 2010-06-24 20:58:16.000000000 -0500
3 @@ -1,10 +1,7 @@
4 ## -*-makefile-*-
5 -## Copyright (c) 2003-2009 IBM, Ken Foskey, and others. All rights reserved.
6 -##
7 -## Aix-specific setup (for gcc)
8 -##
9 -## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability).
10 -## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1
11 +## Linux-specific setup
12 +## Copyright (c) 1999-2006, International Business Machines Corporation and
13 +## others. All Rights Reserved.
15 # Certain files don't compile in -ansi mode (e.g. umutex.c, toolutil.c, and cdatatst.c)
16 CFLAGS += -D_ALL_SOURCE
17 @@ -13,84 +10,30 @@
18 GEN_DEPS.c= $(CC) -E -MM $(DEFS) $(CPPFLAGS)
19 GEN_DEPS.cc= $(CXX) -E -MM $(DEFS) $(CPPFLAGS)
21 -## Commands to link
22 -## We need to use the C++ linker, even when linking C programs, since
23 -## our libraries contain C++ code (C++ static init not called)
24 -LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
25 -LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS)
27 -## Shared library options
28 -LD_SOOPTIONS= -Wl,-bsymbolic
30 -## Commands to make a shared library
31 -SHLIB.c= $(AIX_PREDELETE) $(CC) $(CFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
32 -SHLIB.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) -shared -Wl,-bexpall $(LD_SOOPTIONS)
33 +## Flags for position independent code
34 +SHAREDLIBCFLAGS = -fPIC
35 +SHAREDLIBCXXFLAGS = -fPIC
36 +SHAREDLIBCPPFLAGS = -DPIC
38 +## Additional flags when building libraries and with threads
39 +THREADSCPPFLAGS = -D_REENTRANT -D_THREAD_SAFE
40 +LIBCPPFLAGS =
42 ## Compiler switch to embed a runtime search path
43 -LD_RPATH= -I
44 -LD_RPATH_PRE=
46 -## enable the shared lib loader
47 -LDFLAGS += -Wl,-bbigtoc
48 +LD_RPATH=
49 +LD_RPATH_PRE=
51 ## These are the library specific LDFLAGS
52 LDFLAGSICUDT=-nodefaultlibs -nostdlib
54 -## We need to delete things prior to linking, or else we'll get
55 -## SEVERE ERROR: output file in use .. on AIX.
56 -## But, shell script version should NOT delete target as we don't
57 -## have $@ in that context. (SH = only shell script, icu-config)
58 -AIX_PREDELETE=rm -f $@ ;
59 -#SH# AIX_PREDELETE=
61 ## Environment variable to set a runtime search path
62 LDLIBRARYPATH_ENVVAR = LIBPATH
64 -## Override Versioned target for a shared library.
65 -FINAL_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION).$(SO)
66 -MIDDLE_SO_TARGET= $(basename $(SO_TARGET))$(SO_TARGET_VERSION_MAJOR).$(SO)
67 -SHARED_OBJECT = $(notdir $(FINAL_SO_TARGET:.$(SO)=.$(SOBJ)))
68 -SHARED_OBJECT_NO_VERSION = $(basename $(SO_TARGET)).$(SOBJ)
70 -# The following is for Makefile.inc's use.
71 -ICULIBSUFFIX_VERSION = $(LIB_VERSION_MAJOR)
73 -# this one is for icudefs.mk's use
74 -ifeq ($(ENABLE_SHARED),YES)
75 -SO_TARGET_VERSION_SUFFIX = $(SO_TARGET_VERSION_MAJOR)
76 -endif
78 -## Compiler switch to embed a library name. Not present on AIX.
79 -LD_SONAME =
81 -## The type of assembly needed when pkgdata is used for generating shared libraries.
82 -GENCCODE_ASSEMBLY=-a xlc
84 ## Shared object suffix
85 -SOBJ= so
86 -# without the -brtl option, the library names use .a. AIX is funny that way.
87 -SO= a
88 -A= a
89 +SO = so
91 ## Non-shared intermediate object suffix
92 -STATIC_O = o
94 -## Special AIX rules
96 -## Build archive from shared object
97 -%.a : %.so
98 - ln -f $< $(SHARED_OBJECT_NO_VERSION)
99 - $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION)
100 - rm -f $(SHARED_OBJECT_NO_VERSION)
101 -$(LIBDIR)/%.a : %.so
102 - ln -f $< $(SHARED_OBJECT_NO_VERSION)
103 - $(AR) $(ARFLAGS) $@ $(SHARED_OBJECT_NO_VERSION)
104 - rm -f $(SHARED_OBJECT_NO_VERSION)
106 -## Build import list from export list
107 -%.e : %.exp
108 - @echo "Building an import list for $<"
109 - @$(SHELL) -ec "echo '#! $*.a($*.so)' | cat - $< > $@"
110 +STATIC_O = ao
112 ## Compilation rules
113 %.$(STATIC_O): $(srcdir)/%.c