Fix pch generation when linker flags used with GCC#16109
Fix pch generation when linker flags used with GCC#16109opencv-pushbot merged 1 commit intoopencv:3.4from pixelb:gcc-9-pch
Conversation
|
Can't reproduce with GCC 9.2.1 (Fedora 31). Please add more information about your build environment, dump exact compiler message and related compiler's build options (through |
|
With: GCC 9.2.0, cmake 3.15.2 [ 11%] Generating precomp.hpp.gch/opencv_core_Release.gch |
|
Thank you for update! Looks like, linker flag "-Wl,-z,relro" confuses GCC. It is not GCC 9 specific, there is output of GCC 8.3.1: "-c" fixes problem again. As a bugfix this patch should go into 3.4 branch first. We will merge changes from 3.4 into master regularly (weekly/bi-weekly). So, please:
Note: no needs to re-open PR, apply changes "inplace". |
-c is required to avoid linking (and the associated missing "main" message) when linker flags like "-Wl,-z,relro" are passed to GCC
-c is required to avoid linking (and the associated missing "main" message)