[llvm-bugs] [Bug 48348] New: ObjC incorrectly using DWARF exception handling with MinGW-w64 and GNU Objective-C runtime

via llvm-bugs llvm-bugs at lists.llvm.org
Tue Dec 1 04:38:30 PST 2020


https://bugs.llvm.org/show_bug.cgi?id=48348

            Bug ID: 48348
           Summary: ObjC incorrectly using DWARF exception handling with
                    MinGW-w64 and GNU Objective-C runtime
           Product: clang
           Version: 11.0
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: normal
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: frederik at algoriddim.com
                CC: htmldeveloper at gmail.com, llvm-bugs at lists.llvm.org,
                    neeilans at live.com, richard-llvm at metafoo.co.uk

Building Objective-C code on Windows using the gnustep-2.0 ObjC runtime in a
MinGW-w64 environment and using SEH exception handling incorrectly generates
code with DWARF exception handling.

```
$ clang -I/c/GNUstep/x64/include/ -L/c/GNUstep/x64/lib/ -lobjc
-fobjc-runtime=gnustep-2.0 -fuse-ld=lld test.m -v
clang version 11.0.0 (https://github.com/msys2/MINGW-packages
c0083b9edc111315c868f9c53dd60aaa78d1669b)
Target: x86_64-w64-windows-gnu
Thread model: posix
InstalledDir: C:\msys64\mingw64\bin
 "C:\\msys64\\mingw64\\bin\\clang.exe" -cc1 -triple x86_64-w64-windows-gnu
-emit-obj -mrelax-all -disable-free -disable-llvm-verifier -discard-value-names
-main-file-name test.m -mrelocation-model pic -pic-level 2 -mframe-pointer=none
-fmath-errno -fno-rounding-math -mconstructor-aliases -mms-bitfields
-munwind-tables -target-cpu x86-64 -debugger-tuning=gdb -v -resource-dir
"C:\\msys64\\mingw64\\lib\\clang\\11.0.0" -I C:/GNUstep/x64/include/
-internal-isystem "C:\\msys64\\mingw64\\lib\\clang\\11.0.0\\include"
-internal-isystem
"C:\\msys64\\mingw64\\x86_64-w64-mingw32/sys-root/mingw/include"
-internal-isystem "C:\\msys64\\mingw64\\x86_64-w64-mingw32\\include"
-internal-isystem "C:\\msys64\\mingw64\\include" -fdebug-compilation-dir
"C:\\Dev" -ferror-limit 19 -fmessage-length=164 -fno-use-cxa-atexit
-fgnuc-version=4.2.1 -fobjc-runtime=gnustep-2.0
-fobjc-dispatch-method=non-legacy -fobjc-exceptions -fexceptions
-fseh-exceptions -fcolor-diagnostics -faddrsig -o
"C:\\msys64\\tmp\\test-c8678f.o" -x objective-c test.m
clang -cc1 version 11.0.0 based upon LLVM 11.0.0 default target
x86_64-w64-windows-gnu
 "C:\\msys64\\mingw64\\bin\\ld.lld" -m i386pep -Bdynamic -o a.exe
"C:\\msys64\\mingw64\\x86_64-w64-mingw32\\lib\\crt2.o"
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\10.2.0\\crtbegin.o"
-LC:/GNUstep/x64/lib/
"-LC:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\10.2.0"
"-LC:\\msys64\\mingw64\\x86_64-w64-mingw32\\lib" "-LC:\\msys64\\mingw64\\lib"
"-LC:\\msys64\\mingw64\\x86_64-w64-mingw32/sys-root/mingw/lib" -lobjc
"C:\\msys64\\tmp\\test-c8678f.o" -lmingw32 -lgcc -lgcc_eh -lmoldname -lmingwex
-lmsvcrt -lpthread -ladvapi32 -lshell32 -luser32 -lkernel32 -lmingw32 -lgcc
-lgcc_eh -lmoldname -lmingwex -lmsvcrt -lkernel32
"C:\\msys64\\mingw64\\lib\\gcc\\x86_64-w64-mingw32\\10.2.0\\crtend.o"
lld-link: error: undefined symbol: objc_begin_catch
>>> referenced by C:\msys64\tmp\test-c8678f.o:(test)

lld-link: error: undefined symbol: objc_end_catch
>>> referenced by C:\msys64\tmp\test-c8678f.o:(test)

lld-link: error: undefined symbol: __gnustep_objc_personality_v0
>>> referenced by C:\msys64\tmp\test-c8678f.o:(.xdata)
clang: error: linker command failed with exit code 1 (use -v to see invocation)
```

Also happens for i686 when manually specifying -fseh-exceptions.

-- 
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20201201/ac1fceb9/attachment.html>


More information about the llvm-bugs mailing list