Notes |
|
(0021193)
|
Ivar Gaitan
|
2010-06-30 04:51
|
|
|
|
(0021383)
|
Brad King
|
2010-07-13 10:01
|
|
What "--help" output does each version of ld provide? Does the output also appear through "gcc --help" or "gcc -v --help"? Perhaps we can detect whether the response file syntax is supported. |
|
|
(0021662)
|
Ivar Gaitan
|
2010-08-05 10:11
|
|
With respect to '@FILE' they give identical outputs.
"gcc --help" doesn't mention it and "gcc -v --help" just echos the ld.exe help output.
======
C:\...\mingw\mingw32\bin>ld_2.16.exe --help
Usage: ld_2.16.exe [options] file...
Options:
[...]
@FILE Read options from FILE
C:\...\mingw\mingw32\bin>ld_2.20.exe --help
Usage: ld_2.20.exe [options] file...
Options:
[...]
@FILE Read options from FILE |
|
|
(0021664)
|
Brad King
|
2010-08-05 10:32
|
|
So the ld 2.16 help says that the option is supported, but it does not work? |
|
|
(0021665)
|
Ivar Gaitan
|
2010-08-05 10:34
|
|
Yes, just double checked.
C:\...\mingw\mingw32\bin>ld_2.16.exe -v
GNU ld version 2.16.91 20060119 |
|
|
(0021666)
|
Brad King
|
2010-08-05 10:50
|
|
Okay, take a look at Modules/Platform/Windows-GNU.cmake for the code
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 1)
set(CMAKE_${lang}_RESPONSE_FILE_LINK_FLAG "-Wl,@")
Try adding this:
execute_process(
COMMAND ld -v
OUTPUT_VARIABLE _help
ERROR_VARIABLE _help
)
if("${_help}" MATCHES "GNU ld .* 2\\.1[1-6]")
set(CMAKE_${lang}_USE_RESPONSE_FILE_FOR_OBJECTS 0)
endif() |
|
|
(0021685)
|
Ivar Gaitan
|
2010-08-06 05:58
|
|
|
|
(0021686)
|
Brad King
|
2010-08-06 09:42
|
|
|