From 546c42e42643a209d893d5291c26c3f8ef7102a3 Mon Sep 17 00:00:00 2001 From: Michal Klocek Date: Thu, 16 May 2019 21:58:06 +0200 Subject: Fix linker too long argument list For yocto builds linker can get quite long path since all archives are listed as absolute paths. This can end up as "execvp: /bin/sh: Argument list too long" Use rsp files also for archives. Change-Id: I096e2f35ed72b68261bf465e84baddd1f78cd917 Reviewed-by: Allan Sandfeld Jensen --- src/core/core_module.pro | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/src/core/core_module.pro b/src/core/core_module.pro index e2fa3494d..10169a49e 100644 --- a/src/core/core_module.pro +++ b/src/core/core_module.pro @@ -25,14 +25,17 @@ isEmpty(NINJA_LIBS): error("Missing library files from QtWebEngineCore linking p NINJA_OBJECTS = $$eval($$list($$NINJA_OBJECTS)) # Do manual response file linking for macOS and Linux -RSP_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}.rsp -for(object, NINJA_OBJECTS): RSP_CONTENT += $$object -write_file($$RSP_FILE, RSP_CONTENT) -macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_FILE) -linux:LIBS_PRIVATE += @$$RSP_FILE +RSP_OBJECT_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_o.rsp +for(object, NINJA_OBJECTS): RSP_O_CONTENT += $$object +write_file($$RSP_OBJECT_FILE, RSP_O_CONTENT) +RSP_ARCHIVE_FILE = $$OUT_PWD/$$getConfigDir()/$${TARGET}_a.rsp +for(archive, NINJA_ARCHIVES): RSP_A_CONTENT += $$archive +write_file($$RSP_ARCHIVE_FILE, RSP_A_CONTENT) +macos:LIBS_PRIVATE += -Wl,-filelist,$$shell_quote($$RSP_OBJECT_FILE) +linux:LIBS_PRIVATE += @$${RSP_OBJECT_FILE} # QTBUG-58710 add main rsp file on windows -win32:QMAKE_LFLAGS += @$$RSP_FILE -linux: LIBS_PRIVATE += -Wl,--start-group $$NINJA_ARCHIVES -Wl,--end-group +win32:QMAKE_LFLAGS += @$${RSP_OBJECT_FILE} +linux: LIBS_PRIVATE += -Wl,--start-group @$${RSP_ARCHIVE_FILE} -Wl,--end-group else: LIBS_PRIVATE += $$NINJA_ARCHIVES LIBS_PRIVATE += $$NINJA_LIB_DIRS $$NINJA_LIBS # GN's LFLAGS doesn't always work across all the Linux configurations we support. -- cgit v1.2.3