From d30de0900080b278df87945e7b231421d5b467af Mon Sep 17 00:00:00 2001 From: Oswald Buddenhagen Date: Mon, 8 Oct 2018 17:07:59 +0200 Subject: qmake: remove support for static archive splitting this was introduced in 2002 supposedly for qnx4, but doesn't appear to have actually been used ever. remove it, as it's in the way now. Change-Id: I54dcabb61e1d3609a1e7a9fa4ff4b25509cfdb7a Reviewed-by: Liang Qi Reviewed-by: BogDan Vatra Reviewed-by: Simon Hausmann --- qmake/generators/unix/unixmake.cpp | 24 -------------- qmake/generators/unix/unixmake2.cpp | 64 ++++++++----------------------------- 2 files changed, 14 insertions(+), 74 deletions(-) diff --git a/qmake/generators/unix/unixmake.cpp b/qmake/generators/unix/unixmake.cpp index 4fe1a54501..fdc911211a 100644 --- a/qmake/generators/unix/unixmake.cpp +++ b/qmake/generators/unix/unixmake.cpp @@ -300,35 +300,11 @@ UnixMakefileGenerator::init() } init2(); - project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_LIBS"; ProString target = project->first("TARGET"); int slsh = target.lastIndexOf(Option::dir_sep); if (slsh != -1) target.chopFront(slsh + 1); project->values("LIB_TARGET").prepend(target); - if(!project->isEmpty("QMAKE_MAX_FILES_PER_AR")) { - bool ok; - int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(&ok); - ProStringList ar_sublibs, objs = project->values("OBJECTS"); - if(ok && max_files > 5 && max_files < (int)objs.count()) { - QString lib; - for(int i = 0, obj_cnt = 0, lib_cnt = 0; i != objs.size(); ++i) { - if((++obj_cnt) >= max_files) { - if(lib_cnt) { - lib.sprintf("lib%s-tmp%d.a", - project->first("QMAKE_ORIG_TARGET").toLatin1().constData(), lib_cnt); - ar_sublibs << lib; - obj_cnt = 0; - } - lib_cnt++; - } - } - } - if(!ar_sublibs.isEmpty()) { - project->values("QMAKE_AR_SUBLIBS") = ar_sublibs; - project->values("QMAKE_INTERNAL_PRL_LIBS") << "QMAKE_AR_SUBLIBS"; - } - } } QStringList diff --git a/qmake/generators/unix/unixmake2.cpp b/qmake/generators/unix/unixmake2.cpp index ab946fa439..88bbb49516 100644 --- a/qmake/generators/unix/unixmake2.cpp +++ b/qmake/generators/unix/unixmake2.cpp @@ -690,56 +690,20 @@ UnixMakefileGenerator::writeMakeParts(QTextStream &t) QString destdir_r = project->first("DESTDIR").toQString(); QString destdir_d = escapeDependencyPath(destdir_r); QString destdir = escapeFilePath(destdir_r); - allDeps = ' ' + destdir_d + depVar("TARGET") - + varGlue("QMAKE_AR_SUBLIBS", ' ' + destdir_d, ' ' + destdir_d, ""); - t << "staticlib: " << destdir_d << "$(TARGET)\n\n"; - if(project->isEmpty("QMAKE_AR_SUBLIBS")) { - t << destdir_d << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") - << " $(OBJECTS) $(OBJCOMP) " << depVar("POST_TARGETDEPS") << "\n\t"; - if(!destdir.isEmpty()) - t << mkdir_p_asstring(destdir, false) << "\n\t"; - if (!project->isEmpty("QMAKE_PRE_LINK")) - t << var("QMAKE_PRE_LINK") << "\n\t"; - t << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" - << var("QMAKE_AR_CMD") << "\n"; - if(!project->isEmpty("QMAKE_POST_LINK")) - t << "\t" << var("QMAKE_POST_LINK") << "\n"; - if(!project->isEmpty("QMAKE_RANLIB")) - t << "\t$(RANLIB) " << destdir << "$(TARGET)\n"; - } else { - int max_files = project->first("QMAKE_MAX_FILES_PER_AR").toInt(); - ProStringList objs = project->values("OBJECTS") + project->values("OBJCOMP"), - libs = project->values("QMAKE_AR_SUBLIBS"); - libs.prepend("$(TARGET)"); - for (ProStringList::Iterator libit = libs.begin(), objit = objs.begin(); - libit != libs.end(); ++libit) { - ProStringList build; - for(int cnt = 0; cnt < max_files && objit != objs.end(); ++objit, cnt++) - build << (*objit); - QString ar; - ProString lib = destdir + escapeFilePath(*libit); - if((*libit) == "$(TARGET)") { - t << destdir_d << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") - << ' ' << depVar("POST_TARGETDEPS") << valList(escapeDependencyPaths(build)) << "\n\t"; - ar = project->first("QMAKE_AR_CMD").toQString(); - ar.replace(QLatin1String("$(OBJECTS)"), escapeFilePaths(build).join(' ')); - } else { - t << destdir_d << escapeDependencyPath(*libit) << ": " - << valList(escapeDependencyPaths(build)) << "\n\t"; - ar = "$(AR) " + lib + ' ' + escapeFilePaths(build).join(' '); - } - if(!destdir.isEmpty()) - t << mkdir_p_asstring(destdir, false) << "\n\t"; - if (!project->isEmpty("QMAKE_PRE_LINK")) - t << var("QMAKE_PRE_LINK") << "\n\t"; - t << "-$(DEL_FILE) " << lib << "\n\t" - << ar << "\n"; - if(!project->isEmpty("QMAKE_POST_LINK")) - t << "\t" << var("QMAKE_POST_LINK") << "\n"; - if(!project->isEmpty("QMAKE_RANLIB")) - t << "\t$(RANLIB) " << lib << "\n"; - } - } + allDeps = ' ' + destdir_d + depVar("TARGET"); + t << "staticlib: " << destdir_d << "$(TARGET)\n\n" + << destdir_d << depVar("TARGET") << ": " << depVar("PRE_TARGETDEPS") + << " $(OBJECTS) $(OBJCOMP) " << depVar("POST_TARGETDEPS") << "\n\t"; + if (!destdir.isEmpty()) + t << mkdir_p_asstring(destdir, false) << "\n\t"; + if (!project->isEmpty("QMAKE_PRE_LINK")) + t << var("QMAKE_PRE_LINK") << "\n\t"; + t << "-$(DEL_FILE) " << destdir << "$(TARGET)\n\t" + << var("QMAKE_AR_CMD") << "\n"; + if (!project->isEmpty("QMAKE_POST_LINK")) + t << "\t" << var("QMAKE_POST_LINK") << "\n"; + if (!project->isEmpty("QMAKE_RANLIB")) + t << "\t$(RANLIB) " << destdir << "$(TARGET)\n"; t << endl << endl; } -- cgit v1.2.3