From 783b023dd3780e964dc1d965b86537d26e89c106 Mon Sep 17 00:00:00 2001 From: PChemGuy <39730837+pchemguy@users.noreply.github.com> Date: Thu, 27 May 2021 20:30:47 +0300 Subject: [PATCH] ICU-21627 - Fix Makefile bugs The two libraries are in the wrong order causing the static build to fail (at least on Windows). There are three more Makefile's (in tests and samples) with the same issue. However, those have no apparent effect on the build process (it completes successfully), so I did not fix them. --- icu4c/source/config/mh-mingw | 20 ++++++++++++-------- icu4c/source/config/mh-mingw64 | 20 ++++++++++++-------- icu4c/source/io/Makefile.in | 2 +- 3 files changed, 25 insertions(+), 17 deletions(-) diff --git a/icu4c/source/config/mh-mingw b/icu4c/source/config/mh-mingw index 30f6e5be81a..f621a41bde6 100644 --- a/icu4c/source/config/mh-mingw +++ b/icu4c/source/config/mh-mingw @@ -37,6 +37,10 @@ endif ## https://msdn.microsoft.com/en-us/library/aa383745.aspx CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 +## Do not use static prefix +STATIC_PREFIX = +STATIC_PREFIX_WHEN_USED = + ## Flags for position independent code SHAREDLIBCFLAGS = SHAREDLIBCXXFLAGS = @@ -101,14 +105,14 @@ LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" -#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_LX="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_CTESTFW="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_TOOLUTIL="-l$(ICUPREFIX)tu$(ICULIBSUFFIX)" +#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +ICULIBS_DT = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_IO = -l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_UC = -l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_LX = -l$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_CTESTFW = -l$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_TOOLUTIL = -l$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) #SH# #SH## ICULIBS is the set of libraries your application should link #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. diff --git a/icu4c/source/config/mh-mingw64 b/icu4c/source/config/mh-mingw64 index fb64c562604..f32e85c9c77 100644 --- a/icu4c/source/config/mh-mingw64 +++ b/icu4c/source/config/mh-mingw64 @@ -37,6 +37,10 @@ endif ## https://msdn.microsoft.com/en-us/library/aa383745.aspx CPPFLAGS += -DWINVER=0x0601 -D_WIN32_WINNT=0x0601 +## Do not use static prefix +STATIC_PREFIX = +STATIC_PREFIX_WHEN_USED = + ## Flags for position independent code SHAREDLIBCFLAGS = SHAREDLIBCXXFLAGS = @@ -101,14 +105,14 @@ LIBICU = $(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX) #SH#ICULIBS_COMMON_LIB_NAME="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}${ICULIBSUFFIX_VERSION}.${SO}" #SH#ICULIBS_COMMON_LIB_NAME_A="${LIBICU}${COMMON_STUBNAME}${ICULIBSUFFIX}.${A}" -#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_DT="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_I18N="-l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_LX="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_IO="-l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_UC="-l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_CTESTFW="-l$(STATIC_PREFIX_WHEN_USED)$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)" -ICULIBS_TOOLUTIL="-l$(ICUPREFIX)tu$(ICULIBSUFFIX)" +#SH#ICULIBS_DATA="-l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION)" +ICULIBS_DT = -l$(ICUPREFIX)$(DATA_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_I18N = -l$(ICUPREFIX)$(I18N_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_IO = -l$(ICUPREFIX)$(IO_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_UC = -l$(ICUPREFIX)$(COMMON_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_LX = -l$(ICUPREFIX)$(LAYOUTEX_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_CTESTFW = -l$(ICUPREFIX)$(CTESTFW_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) +ICULIBS_TOOLUTIL = -l$(ICUPREFIX)$(TOOLUTIL_STUBNAME)$(ICULIBSUFFIX)$(ICULIBSUFFIX_VERSION) #SH# #SH## ICULIBS is the set of libraries your application should link #SH## with usually. Many applications will want to add ${ICULIBS_I18N} as well. diff --git a/icu4c/source/io/Makefile.in b/icu4c/source/io/Makefile.in index 9bf9359eadd..7a7302d6af1 100644 --- a/icu4c/source/io/Makefile.in +++ b/icu4c/source/io/Makefile.in @@ -58,7 +58,7 @@ CXXFLAGS += $(LIBCXXFLAGS) CPPFLAGS += -I$(srcdir) -I$(top_srcdir)/common -I$(top_srcdir)/i18n $(LIBCPPFLAGS) $(CPPFLAGSICUIO) DEFS += -DU_IO_IMPLEMENTATION LDFLAGS += $(LDFLAGSICUIO) -LIBS = $(LIBICUUC) $(LIBICUI18N) $(DEFAULT_LIBS) +LIBS = $(LIBICUI18N) $(LIBICUUC) $(DEFAULT_LIBS) SOURCES = $(shell cat $(srcdir)/sources.txt) OBJECTS = $(SOURCES:.cpp=.o)