[Cmake-commits] CMake branch, next, updated. v3.3.1-2869-g89b5d89

Brad King brad.king at kitware.com
Fri Sep 11 13:54:28 EDT 2015


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "CMake".

The branch, next has been updated
       via  89b5d899740196524b0d024ba46293fc4fb8aeda (commit)
       via  97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4 (commit)
      from  1248582c79708e3e63a495582cbf548cdcd86b6c (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=89b5d899740196524b0d024ba46293fc4fb8aeda
commit 89b5d899740196524b0d024ba46293fc4fb8aeda
Merge: 1248582 97ffbcd
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 11 13:54:27 2015 -0400
Commit:     CMake Topic Stage <kwrobot at kitware.com>
CommitDate: Fri Sep 11 13:54:27 2015 -0400

    Merge topic 'fix-implicit-lib-redhat-hardened-ld' into next
    
    97ffbcd8 CMakeParseImplicitLinkInfo: Do not match "VAR=..." as link line (#15737)


http://cmake.org/gitweb?p=cmake.git;a=commitdiff;h=97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4
commit 97ffbcd8a4be25bbc661c68cb7d866bf9d5008d4
Author:     Brad King <brad.king at kitware.com>
AuthorDate: Fri Sep 11 13:50:34 2015 -0400
Commit:     Brad King <brad.king at kitware.com>
CommitDate: Fri Sep 11 13:50:34 2015 -0400

    CMakeParseImplicitLinkInfo: Do not match "VAR=..." as link line (#15737)
    
    When compiling with
    
      LDFLAGS='-Wl,-z,relro -specs=/usr/lib/rpm/redhat/redhat-hardened-ld'
    
    the compiler output includes a line like
    
      COLLECT_GCC_OPTIONS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' ...
    
    that our link line regex matches due to an argument ending in "-ld".
    Since it is not really the link line no implicit link information is
    dectected.  Exclude "VAR=..." lines from consideration as link lines to
    fix this.

diff --git a/Modules/CMakeParseImplicitLinkInfo.cmake b/Modules/CMakeParseImplicitLinkInfo.cmake
index 8abc465..59092bd 100644
--- a/Modules/CMakeParseImplicitLinkInfo.cmake
+++ b/Modules/CMakeParseImplicitLinkInfo.cmake
@@ -31,7 +31,7 @@ function(CMAKE_PARSE_IMPLICIT_LINK_INFO text lib_var dir_var fwk_var log_var obj
   # Construct a regex to match linker lines.  It must match both the
   # whole line and just the command (argv[0]).
   set(linker_regex "^( *|.*[/\\])(${linker}|([^/\\]+-)?ld|collect2)[^/\\]*( |$)")
-  set(linker_exclude_regex "collect2 version ")
+  set(linker_exclude_regex "collect2 version |^[A-Za-z0-9_]+=")
   set(log "${log}  link line regex: [${linker_regex}]\n")
   string(REGEX REPLACE "\r?\n" ";" output_lines "${text}")
   foreach(line IN LISTS output_lines)
diff --git a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
index 055b183..da614e9 100644
--- a/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
+++ b/Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in
@@ -105,6 +105,13 @@ set(linux64_test2_libs "c;/opt/sun/sunstudio12/prod/lib/amd64/libc_supp.a")
 set(linux64_test2_dirs "/opt/sun/sunstudio12/prod/lib/amd64;/lib64;/usr/lib64")
 list(APPEND platforms linux64_test2)
 
+# -specs=redhat-hardened-ld
+set(linux64_test3_text "COLLECT_GCC_OPTIONS='-specs=/usr/lib/rpm/redhat/redhat-hardened-ld' '-v' '-O2' '-g' '-pipe' '-Wall' '-Werror=format-security' '-fexceptions' '-fstack-protector-strong' '--param' 'ssp-buffer-size=4' '-grecord-gcc-switches' '-specs=/usr/lib/rpm/redhat/redhat-hardened-cc1' '-m64' '-mtune=generic' '-I' '/usr/lib64/gfortran/modules' '-o' 'a.out' '-rdynamic' '-shared-libgcc' '-march=x86-64' '-pie'
+ /usr/libexec/gcc/x86_64-redhat-linux/5.1.1/collect2 -plugin /usr/libexec/gcc/x86_64-redhat-linux/5.1.1/liblto_plugin.so -plugin-opt=/usr/libexec/gcc/x86_64-redhat-linux/5.1.1/lto-wrapper -plugin-opt=-fresolution=/tmp/ccNzxFD8.res -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lquadmath -plugin-opt=-pass-through=-lm -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc -plugin-opt=-pass-through=-lc -plugin-opt=-pass-through=-lgcc_s -plugin-opt=-pass-through=-lgcc --build-id --no-add-needed --eh-frame-hdr --hash-style=gnu -m elf_x86_64 -export-dynamic -dynamic-linker /lib64/ld-linux-x86-64.so.2 -z now -pie -o a.out /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/Scrt1.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/crti.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/crtbeginS.o -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1 -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64 -L/lib/../lib64 -L/usr/lib/../lib64 -L/usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../.. -z relro dummy.o -lgfortran -lm -lgcc_s -lgcc -lquadmath -lm -lgcc_s -lgcc -lc -lgcc_s -lgcc /usr/lib/gcc/x86_64-redhat-linux/5.1.1/crtendS.o /usr/lib/gcc/x86_64-redhat-linux/5.1.1/../../../../lib64/crtn.o")
+set(linux64_test3_libs "gfortran;m;quadmath;m;c")
+set(linux64_test3_dirs "/usr/lib/gcc/x86_64-redhat-linux/5.1.1;/usr/lib64;/lib64;/usr/lib")
+list(APPEND platforms linux64_test3)
+
 #-----------------------------------------------------------------------------
 # Mac
 

-----------------------------------------------------------------------

Summary of changes:
 Modules/CMakeParseImplicitLinkInfo.cmake       |    2 +-
 Tests/CMakeTests/ImplicitLinkInfoTest.cmake.in |    7 +++++++
 2 files changed, 8 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
CMake


More information about the Cmake-commits mailing list