Changeset 83223 in vbox for trunk/src/VBox/Main/webservice
- Timestamp:
- Mar 6, 2020 2:41:03 PM (5 years ago)
- Location:
- trunk/src/VBox/Main/webservice
- Files:
-
- 2 added
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Main/webservice/Makefile.kmk
r83214 r83223 198 198 199 199 200 # GCC 9.2 doesn't cope well with the split files (internal error), so 201 # don't do it there. 202 if !defined(VBOX_WITHOUT_SPLIT_SOAPC) && !defined(VBOX_WITH_SPLIT_SOAPC) && $(VBOX_GCC_VERSION_CXX) >= 90200 203 VBOX_WITHOUT_SPLIT_SOAPC := 1 200 # GCC 9.2 doesn't cope ver well with the split soapC.cpp files (internal error). 201 # Seemingly, the issue goes away when we strip inline functions from soapH.h. 202 ifdef VBOX_WITHOUT_NOINLINE_SOAPH 203 if !defined(VBOX_WITHOUT_SPLIT_SOAPC) && !defined(VBOX_WITH_SPLIT_SOAPC) && $(VBOX_GCC_VERSION_CXX) >= 90200 204 $(info Triggering VBOX_WITHOUT_SPLIT_SOAPC because of VBOX_GCC_VERSION_CXX=$(VBOX_GCC_VERSION_CXX) and VBOX_WITHOUT_NOINLINE_SOAPH) 205 VBOX_WITHOUT_SPLIT_SOAPC := 1 206 endif 204 207 endif 205 208 … … 216 219 ifdef VBOX_GSOAP_INSTALLED 217 220 ifndef VBOX_ONLY_SDK 221 # 222 # soapC and soapH-noinline file splitter. 223 # 224 BLDPROGS += split-soapC 225 split-soapC_TEMPLATE = VBoxBldProg 226 split-soapC_SOURCES = split-soapC.cpp 227 218 228 # 219 229 # vboxsoap - Library used by both the programs (save build time). … … 230 240 vboxsoap_CXXFLAGS.win += -wd4702 # soapc-4.cpp(16) : warning C4702: unreachable code 231 241 ifn1of ($(KBUILD_TARGET), win) 232 vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses $(VBOX_GCC_Wno-literal-suffix) $(VBOX_GCC_Wno-stringop-overflow) $(VBOX_GCC_Wno-stringop-truncation) 242 vboxsoap_CXXFLAGS += -Wno-shadow -Wno-parentheses $(VBOX_GCC_Wno-literal-suffix) \ 243 $(VBOX_GCC_Wno-stringop-overflow) $(VBOX_GCC_Wno-stringop-truncation) \ 244 $(VBOX_GCC_Wno-vla) -Wno-format -Wno-deprecated-declarations 233 245 ifn1of ($(KBUILD_TYPE), debug) # Save time+memory by using -O0 instead of -O2. 234 246 vboxsoap_CXXFLAGS += -O0 ## @todo this could be interesting for g++ (not clang++): -fcprop-registers … … 247 259 $(VBOXWEB_OUT_DIR)/soapC.cpp 248 260 else 249 BLDPROGS += split-soapC250 split-soapC_TEMPLATE = VBoxBldProg251 split-soapC_SOURCES = split-soapC.cpp252 253 261 vboxsoap_SOURCES = \ 254 262 $(VBOXWEB_OUT_DIR)/soapC-1.cpp \ … … 281 289 $(VBOXWEB_OUT_DIR)/soapC-28.cpp \ 282 290 $(VBOXWEB_OUT_DIR)/soapC-29.cpp 283 vboxsoap_CXXFLAGS += \ 284 $(VBOX_GCC_Wno-vla) \ 285 $(if-expr $(KBUILD_TARGET) == "win",,-Wno-format) \ 286 $(if-expr $(KBUILD_TARGET) == "win",,-Wno-deprecated-declarations) 291 endif 292 ifndef VBOX_WITHOUT_NOINLINE_SOAPH 293 vboxsoap_SOURCES += \ 294 $(VBOXWEB_OUT_DIR)/soapH-noinline-1.cpp \ 295 $(VBOXWEB_OUT_DIR)/soapH-noinline-2.cpp \ 296 $(VBOXWEB_OUT_DIR)/soapH-noinline-3.cpp \ 297 $(VBOXWEB_OUT_DIR)/soapH-noinline-4.cpp \ 298 $(VBOXWEB_OUT_DIR)/soapH-noinline-5.cpp \ 299 $(VBOXWEB_OUT_DIR)/soapH-noinline-6.cpp \ 300 $(VBOXWEB_OUT_DIR)/soapH-noinline-7.cpp \ 301 $(VBOXWEB_OUT_DIR)/soapH-noinline-8.cpp \ 302 $(VBOXWEB_OUT_DIR)/soapH-noinline-9.cpp \ 303 $(VBOXWEB_OUT_DIR)/soapH-noinline-10.cpp \ 304 $(VBOXWEB_OUT_DIR)/soapH-noinline-11.cpp \ 305 $(VBOXWEB_OUT_DIR)/soapH-noinline-12.cpp 287 306 endif 288 307 vboxsoap_CLEAN := $(vboxsoap_SOURCES) # lazy bird … … 302 321 # Necessary with gcc 9.2.1 for some reason: 303 322 $(VBOX_GSOAP_CXX_SOURCES)_CXXFLAGS += -Wno-deprecated-declarations 304 305 306 323 endif 307 324 … … 770 787 ## @todo change this to state explicitly what will be generated? 771 788 772 # generate server and client code from gsoap pseudo-C header file 789 # 790 # Generate server and client code from gsoap pseudo-C header file. 791 # 792 # Options for soapcpp2: 793 # -2: generate SOAP 1.2 calls 794 # -L: don't generate soapClientLib/soapServerLib 795 # -w: don't generate WSDL and schema files 796 # -x: don't generate sample XML files (VBOXWEB_SOAPCPP2_SKIP_FILES). 797 # 773 798 $(VBOXWEB_OUT_DIR)/gsoap_generate_all_ts \ 774 799 + $(VBOXWEB_OUT_DIR)/soapH.h \ 800 $(if-expr !defined(VBOX_WITHOUT_NOINLINE_SOAPH),\ 801 + $(VBOXWEB_OUT_DIR)/soapH-noinline-1.cpp \ 802 + $(VBOXWEB_OUT_DIR)/soapH-noinline-2.cpp \ 803 + $(VBOXWEB_OUT_DIR)/soapH-noinline-3.cpp \ 804 + $(VBOXWEB_OUT_DIR)/soapH-noinline-4.cpp \ 805 + $(VBOXWEB_OUT_DIR)/soapH-noinline-5.cpp \ 806 + $(VBOXWEB_OUT_DIR)/soapH-noinline-6.cpp \ 807 + $(VBOXWEB_OUT_DIR)/soapH-noinline-7.cpp \ 808 + $(VBOXWEB_OUT_DIR)/soapH-noinline-8.cpp \ 809 + $(VBOXWEB_OUT_DIR)/soapH-noinline-9.cpp \ 810 + $(VBOXWEB_OUT_DIR)/soapH-noinline-10.cpp \ 811 + $(VBOXWEB_OUT_DIR)/soapH-noinline-11.cpp \ 812 + $(VBOXWEB_OUT_DIR)/soapH-noinline-12.cpp,) \ 775 813 + $(VBOXWEB_SOAP_CLIENT_H) \ 776 814 + $(VBOXWEB_OUT_DIR)/soapC.cpp \ 777 815 + $(VBOXWEB_OUT_DIR)/soapClient.cpp \ 778 816 + $(VBOXWEB_OUT_DIR)/soapServer.cpp \ 779 : $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed \ 817 : $(VBOXWEB_GSOAPH_FROM_GSOAP) $(VBOXWEB_GSOAPH_FROM_XSLT) $(VBOX_NSMAP) \ 818 $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed \ 819 $(VBOX_PATH_WEBSERVICE)/soap-header-to-inline-source-file.sed \ 820 $(VBOX_PATH_WEBSERVICE)/soap-header-strip-inline.sed \ 821 $$(split-soapC_1_TARGET) \ 780 822 $(RECOMPILE_ON_MAKEFILE_CURRENT) | $$(dir $$@) 781 823 $(call MSG_GENERATE,,lots of files,$(GSOAPH_RELEVANT)) … … 786 828 $(SED) -f $(VBOX_PATH_WEBSERVICE)/stdsoap2.sed --output "$(VBOXWEB_SOAP_CLIENT_H)" "$(VBOXWEB_SOAP_CLIENT_H).tmp" 787 829 $(RM) -f "$(VBOXWEB_SOAP_CLIENT_H).tmp" 830 endif 831 ifndef VBOX_WITHOUT_NOINLINE_SOAPH 832 $(MV) -f -- "$(VBOXWEB_OUT_DIR)/soapH.h" "$(VBOXWEB_OUT_DIR)/soapH.h.tmp" 833 $(SED) -f $(VBOX_PATH_WEBSERVICE)/soap-header-to-inline-source-file.sed \ 834 --output "$(VBOXWEB_OUT_DIR)/soapH-noinline.cpp" \ 835 "$(VBOXWEB_OUT_DIR)/soapH.h.tmp" 836 $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapH-noinline.cpp $(VBOXWEB_OUT_DIR)/soapH-noinline- 12 837 $(SED) -f $(VBOX_PATH_WEBSERVICE)/soap-header-strip-inline.sed \ 838 --output "$(VBOXWEB_OUT_DIR)/soapH.h" \ 839 "$(VBOXWEB_OUT_DIR)/soapH.h.tmp" 840 $(RM) -f -- "$(VBOXWEB_OUT_DIR)/soapH.h.tmp" "$(VBOXWEB_OUT_DIR)/soapH-noinline.cpp" 788 841 endif 789 842 $(APPEND) $@ done … … 808 861 $(PATH_TARGET_SOAPDEMOHEADERS)/soapvboxBindingObject.h: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts 809 862 810 # soapcpp2 -2: generate SOAP 1.2 calls 811 # soapcpp2 -S: server-side code only 812 # soapcpp2 -L: don't generate soapClientLib/soapServerLib 813 # soapcpp2 -w: don't generate WSDL and schema files 814 # soapcpp2 -x: don't generate sample XML files 863 hack: $(VBOXWEB_OUT_DIR)/gsoap_copy_all_ts 815 864 816 865 ifndef VBOX_WITHOUT_SPLIT_SOAPC … … 850 899 : $(VBOXWEB_OUT_DIR)/soapC.cpp $$(split-soapC_1_TARGET) | $$(dir $$@) 851 900 $(RM) -f -- $(wildcard $(VBOXWEB_OUT_DIR)/soapC-?.cpp $(VBOXWEB_OUT_DIR)/soapC-??.cpp) 852 $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapC.cpp $(VBOXWEB_OUT_DIR) 29901 $(split-soapC_1_TARGET) $(VBOXWEB_OUT_DIR)/soapC.cpp $(VBOXWEB_OUT_DIR)/soapC- 29 853 902 endif # !VBOX_WITHOUT_SPLIT_SOAPC 854 903 -
trunk/src/VBox/Main/webservice/split-soapC.cpp
r82968 r83223 1 /* $Id$ */ 1 2 /** @file 2 * File splitter: splits soapC.cpp into manageable pieces. It is somewhat 3 * intelligent and avoids splitting inside functions or similar places. 3 * Splits soapC.cpp and soapH-noinline.cpp into more manageable portions. 4 4 */ 5 5 … … 16 16 */ 17 17 18 19 /********************************************************************************************************************************* 20 * Header Files * 21 *********************************************************************************************************************************/ 18 22 #include <iprt/types.h> 23 #include <iprt/path.h> 19 24 #include <sys/types.h> 20 25 #include <stdio.h> … … 24 29 25 30 26 char *readfileIntoBuffer(const char *pszFile, size_t *pcbFile)31 static char *readfileIntoBuffer(const char *pszFile, size_t *pcbFile) 27 32 { 28 33 FILE *pFileIn = fopen(pszFile, "rb"); … … 69 74 if (argc != 4) 70 75 { 71 fprintf(stderr, "split-soapC: Must be started with exactly threearguments,\n"72 "1) the input file, 2) the directory where to put the output filesand\n"73 "3) the number chunks to create. \n");76 fprintf(stderr, "split-soapC: Must be started with exactly four arguments,\n" 77 "1) the input file, 2) the output filename prefix and\n" 78 "3) the number chunks to create."); 74 79 return RTEXITCODE_SYNTAX; 75 80 } … … 116 121 /* construct output filename */ 117 122 char szFilename[1024]; 118 sprintf(szFilename, "%s /soapC-%lu.cpp", argv[2], ++cFiles);123 sprintf(szFilename, "%s%lu.cpp", argv[2], ++cFiles); 119 124 szFilename[sizeof(szFilename)-1] = '\0'; 120 printf("info: soapC-%lu.cpp\n", cFiles); 125 126 size_t offName = strlen(szFilename); 127 while (offName > 0 && !RTPATH_IS_SEP(szFilename[offName - 1])) 128 offName -= 1; 129 printf("info: %s\n", &szFilename[offName]); 121 130 122 131 /* create output file */
Note:
See TracChangeset
for help on using the changeset viewer.