From 00606bb4a9570e9258b12b97246b77a288b66680 Mon Sep 17 00:00:00 2001 From: "Steven R. Loomis" Date: Mon, 9 Jun 2003 22:35:07 +0000 Subject: [PATCH] ICU-2707 remove targets before linking on aix X-SVN-Rev: 12388 --- icu4c/source/config/mh-aix | 18 +++++++++++++----- icu4c/source/config/mh-aix-va | 17 ++++++++++++----- 2 files changed, 25 insertions(+), 10 deletions(-) diff --git a/icu4c/source/config/mh-aix b/icu4c/source/config/mh-aix index 4ed7d8a9e08..59b161b8515 100644 --- a/icu4c/source/config/mh-aix +++ b/icu4c/source/config/mh-aix @@ -3,7 +3,7 @@ ## Copyright (c) 1999-2002, International Business Machines Corporation and ## others. All Rights Reserved. ## -## $Id: mh-aix,v 1.32 2002/05/31 19:18:29 srl Exp $ +## $Id: mh-aix,v 1.33 2003/06/09 22:35:07 srl Exp $ ## ## Please note: AIX does NOT have library versioning per se (there is no 'SONAME' capability). ## So, we are using 'windows' style library names, that is, libicuuc20.1.so instead of libicuuc.so.20.1 @@ -18,15 +18,23 @@ CXXFLAGS += -qroconst LDFLAGS += -brtl +## We need to delete things prior to linking, or else we'll get +## SEVERE ERROR: output file in use .. on AIX. +## But, shell script version should NOT delete target as we don't +## have $@ in that context. (SH = only shell script, icu-config) +AIX_PREDELETE=rm -f $@ ; +#SH# AIX_PREDELETE= + + ## Commands to link ## We need to use the C++ linker, even when linking C programs, since ## our libraries contain C++ code (C++ static init not called) -LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) +LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) +LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) ## Commands to make a shared library -SHLIB.c= $(AIX_SHLIB) -p 5000 $(LDFLAGS) -SHLIB.cc= $(AIX_SHLIB) -p 5000 $(LDFLAGS) +SHLIB.c= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS) +SHLIB.cc= $(AIX_PREDELETE) $(AIX_SHLIB) -p 5000 $(LDFLAGS) ## Compiler switch to embed a runtime search path LD_RPATH= -I diff --git a/icu4c/source/config/mh-aix-va b/icu4c/source/config/mh-aix-va index e5bee89db2f..c40763ab708 100644 --- a/icu4c/source/config/mh-aix-va +++ b/icu4c/source/config/mh-aix-va @@ -3,7 +3,7 @@ ## Copyright (c) 1999-2002, International Business Machines Corporation and ## others. All Rights Reserved. ## -## $Id: mh-aix-va,v 1.26 2002/08/01 03:28:53 srl Exp $ +## $Id: mh-aix-va,v 1.27 2003/06/09 22:35:07 srl Exp $ ## Commands to generate dependency files GEN_DEPS.c= $(CC) -E -M $(DEFS) $(CPPFLAGS) @@ -17,18 +17,25 @@ CXXFLAGS += -qproto -qroconst LDFLAGS += -brtl -bh:5 +## We need to delete things prior to linking, or else we'll get +## SEVERE ERROR: output file in use .. on AIX. +## But, shell script version should NOT delete target as we don't +## have $@ in that context. (SH = only shell script, icu-config) +AIX_PREDELETE=rm -f $@ ; +#SH# AIX_PREDELETE= + ## Commands to link ## We need to use the C++ linker, even when linking C programs, since ## our libraries contain C++ code (C++ static init not called) -LINK.c= $(CXX) $(CXXFLAGS) $(LDFLAGS) -LINK.cc= $(CXX) $(CXXFLAGS) $(LDFLAGS) +LINK.c= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) +LINK.cc= $(AIX_PREDELETE) $(CXX) $(CXXFLAGS) $(LDFLAGS) ## Commands to make a shared library ## -G means -berok -brtl -bnortllib -bnosymbolic -bnoautoexp ## -bh:8 means halt on errors or worse. We don't display warnings about ## duplicate inline symbols. -SHLIB.c= $(CXX) -qmkshrobj -G $(LDFLAGS) -SHLIB.cc= $(CXX) -qmkshrobj -G $(LDFLAGS) +SHLIB.c= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS) +SHLIB.cc= $(AIX_PREDELETE) $(CXX) -qmkshrobj -G $(LDFLAGS) ## Compiler switch to embed a runtime search path LD_RPATH= -I