]> granicus.if.org Git - icu/commitdiff
ICU-20526 fix pkgdata where LD_SONAME has a trailing space
authorSteven R. Loomis <srloomis@us.ibm.com>
Wed, 3 Apr 2019 19:35:22 +0000 (12:35 -0700)
committerSteven R. Loomis <srl295@gmail.com>
Fri, 5 Apr 2019 17:53:59 +0000 (10:53 -0700)
- added PKGDATA_TRAILING_SPACE to all of the pkgdataMakefile.in file.
- NOTE: Users who create their own pkgdata.inc / icupkg.inc files may need
   to recreate this PKGDATA_TRAILING_SPACE behavior.

- used the above variable, normally undefined, in mh-* files that need a trailing space

- Also, fixed use of system() in pkgdata.cpp per ICU-20538
This was causing pkgdata to return a zero status even on clang
failure, masking this issue.

(cherry picked from commit 83a0542b5b52a30b7af736f5ef6b0405f6582867)

icu4c/source/config/mh-darwin
icu4c/source/config/mh-solaris
icu4c/source/config/mh-solaris-gcc
icu4c/source/config/pkgdataMakefile.in
icu4c/source/data/pkgdataMakefile.in
icu4c/source/extra/uconv/pkgdataMakefile.in
icu4c/source/test/testdata/pkgdataMakefile.in
icu4c/source/tools/pkgdata/pkgdata.cpp

index e4ad46230491bc33e93a7917aa306a21d88f3948..dc708f617487ebe5260caaf064b2d9a526c30f89 100644 (file)
@@ -31,9 +31,9 @@ SHLIB.cc=     $(CXX) -dynamiclib -dynamic $(CXXFLAGS) $(LDFLAGS) $(LD_SOOPTIONS)
 
 ## Compiler switches to embed a library name and version information
 ifeq ($(ENABLE_RPATH),YES)
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET))
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(libdir)/$(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE)
 else
-LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET))
+LD_SONAME = -Wl,-compatibility_version -Wl,$(SO_TARGET_VERSION_MAJOR) -Wl,-current_version -Wl,$(SO_TARGET_VERSION) -install_name $(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE)
 endif
 
 ## Compiler switch to embed a runtime search path
index 3d7e6fe79f445764694d84de0edee4d0e7942b1e..5e2abcfeb59beee91a65b930d93f005298b42da4 100644 (file)
@@ -56,7 +56,7 @@ LD_RPATH_PRE=   -R
 #LIBRARY_PATH_PREFIX=/usr/lib/lwp:
 
 ## Compiler switch to embed a library name
-LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
+LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE)
 
 ## Shared object suffix
 SO=            so
index 63db4f0287422eb224b72ee53ceaeb33400e3837..d55d9cca0cd281391e0db983f75e044c1b248a7c 100644 (file)
@@ -25,7 +25,7 @@ LD_RPATH=       -R'$$'ORIGIN
 LD_RPATH_PRE=   -R
 
 ## Compiler switch to embed a library name
-LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET))
+LD_SONAME = -h $(notdir $(MIDDLE_SO_TARGET)) $(PKGDATA_TRAILING_SPACE)
 
 ## Shared library options
 LD_SOOPTIONS= -Wl,-Bsymbolic
index 7bf24cc6b185835a7e1b97c37fd2eb3015546dd0..f6fe1984dcbaec09b96f9b00f753c3313b7f1dd7 100644 (file)
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
 
 OUTPUTFILE=pkgdata.inc
 MIDDLE_SO_TARGET=
+PKGDATA_TRAILING_SPACE=" "
 
 all : clean 
        @echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE)
@@ -36,7 +37,6 @@ all : clean
        @echo RANLIB=$(RANLIB) >> $(OUTPUTFILE)
        @echo INSTALL_CMD=$(INSTALL-L) >> $(OUTPUTFILE)
 
-
 clean : 
        $(RMV) $(OUTPUTFILE)
 
index 4e21d03ce16d60428b64f6420fd922cb5eb445ce..721ba1612f80e8eb2db1324fbc3a0102844e0107 100644 (file)
@@ -16,6 +16,7 @@ include $(top_builddir)/icudefs.mk
 
 OUTPUTFILE=icupkg.inc
 MIDDLE_SO_TARGET=
+PKGDATA_TRAILING_SPACE=" "
 
 all : clean 
        @echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE)
@@ -36,7 +37,6 @@ all : clean
        @echo RANLIB=$(RANLIB) >> $(OUTPUTFILE)
        @echo INSTALL_CMD=$(INSTALL) >> $(OUTPUTFILE)
 
-
 clean : 
        $(RMV) $(OUTPUTFILE)
 
index c5916f2a148f802ffd6e9cc73aee383eebd4ecc8..f8a684fc28099a70cc9cefa556c3775371e8286a 100644 (file)
@@ -14,9 +14,9 @@ top_builddir = ../..
 ## All the flags and other definitions are included here.
 include $(top_builddir)/icudefs.mk
 
-MIDDLE_SO_TARGET=
-
 OUTPUTFILE=pkgdata.inc
+MIDDLE_SO_TARGET=
+PKGDATA_TRAILING_SPACE=" "
 
 all : clean 
        @echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE)
index c5916f2a148f802ffd6e9cc73aee383eebd4ecc8..f8a684fc28099a70cc9cefa556c3775371e8286a 100644 (file)
@@ -14,9 +14,9 @@ top_builddir = ../..
 ## All the flags and other definitions are included here.
 include $(top_builddir)/icudefs.mk
 
-MIDDLE_SO_TARGET=
-
 OUTPUTFILE=pkgdata.inc
+MIDDLE_SO_TARGET=
+PKGDATA_TRAILING_SPACE=" "
 
 all : clean 
        @echo GENCCODE_ASSEMBLY_TYPE=$(GENCCODE_ASSEMBLY) >> $(OUTPUTFILE)
index aa0153d35cb3b9cdb308ee0bc970b14a61e4d2bc..226e4b3f6b773848f632b97f75e56cd3c1d98b13 100644 (file)
@@ -504,7 +504,6 @@ main(int argc, char* argv[]) {
     if (o.files != NULL) {
         pkg_deleteList(o.files);
     }
-
     return result;
 }
 
@@ -544,6 +543,7 @@ normal_command_mode:
     int result = system(cmd);
     if (result != 0) {
         fprintf(stderr, "-- return status = %d\n", result);
+        result = 1; // system() result code is platform specific.
     }
 
     if (cmd != cmdBuffer && cmd != command) {