[llvm-bugs] [Bug 33386] New: LLVM ERROR: Error parsing inline asm

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Jun 9 07:40:16 PDT 2017


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

            Bug ID: 33386
           Summary: LLVM ERROR: Error parsing inline asm
           Product: clang
           Version: unspecified
          Hardware: Macintosh
                OS: MacOS X
            Status: NEW
          Severity: release blocker
          Priority: P
         Component: -New Bugs
          Assignee: unassignedclangbugs at nondot.org
          Reporter: jonas at trust1team.com
                CC: llvm-bugs at lists.llvm.org

Hi

I was trying to compile openssl-1.0.2g on my macOS (Sierra 10.12.5).
During the linking however I got an error:

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [dsatest] Error 2
make[1]: *** Waiting for unfinished jobs....
<inline asm>:1:12: error: invalid operand for instruction
        divq      $-8446744073709551616
                  ^~~~~~~~~~~~~~~~~~~~~
LLVM ERROR: Error parsing inline asm

My clang version:
Apple LLVM version 8.1.0 (clang-802.0.42)
Target: x86_64-apple-darwin16.6.0
Thread model: posix
InstalledDir:
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin

Steps to Reproduce:
Download openssl 1.0.2g from https://www.openssl.org/source/old/1.0.2/.
Untar the openssl-1.0.2g.tar.gz
Open a terminal and go the the untarred openssl folder
Execute the following commands

export CC=clang
export CXX=clang++
export CFLAGS="-flto -mmacosx-version-min=10.9"
export LFLAGS="-flto -mmacosx-version-min=10.9"
./Configure darwin64-x86_64-cc -flto -mmacosx-version-min=10.9
make depend
make -j8

Expected Results:
Successful compilation of openssl

Observed Results:
Crash in the LLVM linker

making all in test...
( :; LIBDEPS="${LIBDEPS:--Wl,-search_paths_first -L.. -lssl -L.. -lcrypto  }";
LDCMD="${LDCMD:-clang}"; LDFLAGS="${LDFLAGS:--DOPENSSL_THREADS -D_REENTRANT
-DDSO_DLFCN -DHAVE_DLFCN_H -flto -mmacosx-version-min=10.9 -arch x86_64 -O3
-DL_ENDIAN -Wall -DOPENSSL_IA32_SSE2 -DOPENSSL_BN_ASM_MONT
-DOPENSSL_BN_ASM_MONT5 -DOPENSSL_BN_ASM_GF2m -DSHA1_ASM -DSHA256_ASM
-DSHA512_ASM -DMD5_ASM -DAES_ASM -DVPAES_ASM -DBSAES_ASM -DWHIRLPOOL_ASM
-DGHASH_ASM -DECP_NISTZ256_ASM}"; LIBPATH=`for x in $LIBDEPS; do echo $x; done
| sed -e 's/^ *-L//;t' -e d | uniq`; LIBPATH=`echo $LIBPATH | sed -e 's/
/:/g'`; LD_LIBRARY_PATH=$LIBPATH:$LD_LIBRARY_PATH ${LDCMD} ${LDFLAGS} -o
${APPNAME:=dsatest} dsatest.o ${LIBDEPS} )
<inline asm>:1:12: error: invalid operand for instruction
        divq      $-8446744073709551616
                  ^~~~~~~~~~~~~~~~~~~~~
LLVM ERROR: Error parsing inline asm

clang: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [link_app.] Error 1
make[1]: *** [dsatest] Error 2
make: *** [build_tests] Error 1

Version:
macOS Sierra 10.12.5

Notes:
I noticed that this error occurred from the Xcode 8.3 update (Apple LLVM
version 8.1.0). The version before this update worked just fine.

-- 
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/20170609/b3ade65b/attachment.html>


More information about the llvm-bugs mailing list