On 7/17/19 7:14 AM, Jeremie Courreges-Anglas wrote:
On Tue, Jul 16 2019, Stuart Henderson <[email protected]> wrote:
On 2019/07/17 00:51, Jeremie Courreges-Anglas wrote:
On Sun, Jul 14 2019, Brian Callahan <[email protected]> wrote:
Hi ports --
When trying to update flang, I get this message during `make configure':
CMake Error at /usr/local/lib/cmake/llvm/HandleLLVMOptions.cmake:14 (if):
Syntax error in cmake code at
/usr/local/lib/cmake/llvm/HandleLLVMOptions.cmake:14
when parsing string
lld-link\.exe
Invalid escape sequence \.
Call Stack (most recent call first):
CMakeLists.txt:164 (include)
-- Configuring incomplete, errors occurred!
Indeed, if I remove the \ from lld-link\.exe from
/usr/local/lib/cmake/llvm/HandleLLVMOptions.cmake then flang builds
fine.
I'm not sure what the problem is, maybe a difference between our cmake
version (3.10.2) and what upstream tends to use?
Anyway, if you have a patch that removes the backslash and fixes your
problem, ok jca@
BTW, regarding cmake, rsadowski@ has an update and he asked for tests:
https://marc.info/?l=openbsd-ports&m=156204264710542&w=2
--
jca | PGP : 0x1524E7EE / 5135 92C1 AD36 5293 2BDF DDCC 0DFA 74AE 1524 E7EE
https://github.com/llvm-mirror/llvm/commit/b8b62917a1566bfc6d8706d06042171aa2306bbc
then followed by
https://github.com/llvm-mirror/llvm/commit/614d096016667810cc777db37d180accb2390cfb
Thanks for checking. I only took the lld-ink part of 614d096, diff
below. Brian, does this fix your problem?
This will fix the problem, yes. Once this goes in I can update flang.
~Brian
Index: Makefile
===================================================================
RCS file: /cvs/ports/devel/llvm/Makefile,v
retrieving revision 1.230
diff -u -p -r1.230 Makefile
--- Makefile 9 Jul 2019 13:21:37 -0000 1.230
+++ Makefile 17 Jul 2019 11:10:17 -0000
@@ -19,6 +19,7 @@ PKGNAME-main = llvm-${LLVM_V}
PKGNAME-python = py-llvm-${LLVM_V}
PKGNAME-lldb = lldb-${LLVM_V}
REVISION = 1
+REVISION-main = 2
CATEGORIES = devel
Index: patches/patch-cmake_modules_HandleLLVMOptions_cmake
===================================================================
RCS file: patches/patch-cmake_modules_HandleLLVMOptions_cmake
diff -N patches/patch-cmake_modules_HandleLLVMOptions_cmake
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ patches/patch-cmake_modules_HandleLLVMOptions_cmake 17 Jul 2019 11:10:17
-0000
@@ -0,0 +1,19 @@
+$OpenBSD$
+
+Fix CMake Invalid Escape Sequence
+
+
https://github.com/llvm-mirror/llvm/commit/b8b62917a1566bfc6d8706d06042171aa2306bbc
++
https://github.com/llvm-mirror/llvm/commit/614d096016667810cc777db37d180accb2390cfb
+
+Index: cmake/modules/HandleLLVMOptions.cmake
+--- cmake/modules/HandleLLVMOptions.cmake.orig
++++ cmake/modules/HandleLLVMOptions.cmake
+@@ -11,7 +11,7 @@ include(HandleLLVMStdlib)
+ include(CheckCCompilerFlag)
+ include(CheckCXXCompilerFlag)
+
+-if(CMAKE_LINKER MATCHES "lld-link\.exe" OR (WIN32 AND LLVM_USE_LINKER STREQUAL
"lld") OR LLVM_ENABLE_LLD)
++if(CMAKE_LINKER MATCHES "lld-link" OR (WIN32 AND LLVM_USE_LINKER STREQUAL
"lld") OR LLVM_ENABLE_LLD)
+ set(LINKER_IS_LLD_LINK TRUE)
+ else()
+ set(LINKER_IS_LLD_LINK FALSE)