[Git][ghc/ghc][master] configure: Find C++ probing when GCC version is the latest but G++ is old #23118

Marge Bot (@marge-bot) gitlab at gitlab.haskell.org
Fri Oct 11 07:54:19 UTC 2024



Marge Bot pushed to branch master at Glasgow Haskell Compiler / GHC


Commits:
78ad81ec by Cristiano Moraes at 2024-10-11T03:53:55-04:00
configure: Find C++ probing when GCC version is the latest but G++ is old #23118
- - - - -


1 changed file:

- m4/fp_find_cxx_std_lib.m4


Changes:

=====================================
m4/fp_find_cxx_std_lib.m4
=====================================
@@ -61,10 +61,11 @@ EOF
         try_libs() {
             dnl Try to link a plain object with CC manually
             AC_MSG_CHECKING([for linkage against '${3}'])
-            if "$CC" -o actest actest.o ${1} 2>/dev/null; then
+            dnl Ensures that CC uses same library path of CXX.
+            p="`"$CXX" --print-file-name ${2}`"
+            d="`dirname "$p"`"
+            if "$CC" -o actest actest.o ${1} -L"$d" 2>/dev/null; then
                 CXX_STD_LIB_LIBS="${3}"
-                p="`"$CXX" --print-file-name ${2}`"
-                d="`dirname "$p"`"
                 dnl On some platforms (e.g. Windows) the C++ standard library
                 dnl can be found in the system search path. In this case $CXX
                 dnl --print-file-name will simply print the filename without a



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/78ad81ecef846f73fee0f6c1a86cd6f19aa29b21

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/78ad81ecef846f73fee0f6c1a86cd6f19aa29b21
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20241011/1049dc0e/attachment.html>


More information about the ghc-commits mailing list