<html>
<head>
<base href="http://llvm.org/bugs/" />
</head>
<body><table border="1" cellspacing="0" cellpadding="8">
<tr>
<th>Bug ID</th>
<td><a class="bz_bug_link
bz_status_NEW "
title="NEW --- - Assembling fails with -target arm-linux-gnueabihf -fPIE"
href="http://llvm.org/bugs/show_bug.cgi?id=16845">16845</a>
</td>
</tr>
<tr>
<th>Summary</th>
<td>Assembling fails with -target arm-linux-gnueabihf -fPIE
</td>
</tr>
<tr>
<th>Product</th>
<td>clang
</td>
</tr>
<tr>
<th>Version</th>
<td>trunk
</td>
</tr>
<tr>
<th>Hardware</th>
<td>PC
</td>
</tr>
<tr>
<th>OS</th>
<td>Linux
</td>
</tr>
<tr>
<th>Status</th>
<td>NEW
</td>
</tr>
<tr>
<th>Severity</th>
<td>normal
</td>
</tr>
<tr>
<th>Priority</th>
<td>P
</td>
</tr>
<tr>
<th>Component</th>
<td>C++
</td>
</tr>
<tr>
<th>Assignee</th>
<td>unassignedclangbugs@nondot.org
</td>
</tr>
<tr>
<th>Reporter</th>
<td>steveire@gmail.com
</td>
</tr>
<tr>
<th>CC</th>
<td>dgregor@apple.com, llvmbugs@cs.uiuc.edu
</td>
</tr>
<tr>
<th>Classification</th>
<td>Unclassified
</td>
</tr></table>
<p>
<div>
<pre>struct A
{
static A data[1];
static A *foo() { return data; }
};
int main(int argc, char **argv)
{
A::foo();
}
stephen@hal:~/dev/src/playground/cmake/build{master}$
/home/stephen/dev/build/qtbase/llvm/bin/clang++ -target arm-linux-gnueabihf
-fPIE -o CMakeFiles/foo.dir/main.cpp.o -c
/home/stephen/dev/src/playground/cmake/main.cpp -v
clang version 3.4
Target: arm--linux-gnueabihf
Thread model: posix
Found candidate GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7
Found candidate GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7.3
Selected GCC installation: /usr/lib/gcc-cross/arm-linux-gnueabihf/4.7
"/home/stephen/dev/build/qtbase/llvm/bin/clang-3.4" -cc1 -triple
armv4t--linux-gnueabihf -S -disable-free -main-file-name main.cpp
-mrelocation-model pic -pic-level 2 -pie-level 2 -mdisable-fp-elim -fmath-errno
-mconstructor-aliases -fuse-init-array -target-abi aapcs-linux -target-cpu
arm7tdmi -mfloat-abi hard -v -coverage-file /tmp/main-62de18.s -resource-dir
/home/stephen/dev/build/qtbase/llvm/bin/../lib/clang/3.4 -internal-isystem
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7
-internal-isystem
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/arm-linux-gnueabihf
-internal-isystem
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/backward
-internal-isystem
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/arm-linux-gnueabihf/c++/4.7
-internal-isystem /usr/local/include -internal-isystem
/home/stephen/dev/build/qtbase/llvm/bin/../lib/clang/3.4/include
-internal-externc-isystem /include -internal-externc-isystem /usr/include
-fdeprecated-macro -fno-dwarf-directory-asm -fdebug-compilation-dir
/home/stephen/dev/src/playground/cmake/build -ferror-limit 19 -fmessage-length
211 -mstackrealign -fno-signed-char -fobjc-runtime=gcc
-fobjc-default-synthesize-properties -fcxx-exceptions -fexceptions
-fdiagnostics-show-option -vectorize-loops -vectorize-slp -o /tmp/main-62de18.s
-x c++ /home/stephen/dev/src/playground/cmake/main.cpp
clang -cc1 version 3.4 based upon LLVM 3.4svn default target
x86_64-unknown-linux-gnu
ignoring nonexistent directory
"/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/arm-linux-gnueabihf"
ignoring nonexistent directory
"/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/arm-linux-gnueabihf/c++/4.7"
ignoring nonexistent directory "/include"
#include "..." search starts here:
#include <...> search starts here:
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7
/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../include/c++/4.7/backward
/usr/local/include
/home/stephen/dev/build/qtbase/llvm/bin/../lib/clang/3.4/include
/usr/include
End of search list.
"/usr/lib/gcc-cross/arm-linux-gnueabihf/4.7/../../../../arm-linux-gnueabihf/bin/as"
-mfloat-abi=hard -o CMakeFiles/foo.dir/main.cpp.o /tmp/main-62de18.s
/tmp/main-62de18.s: Assembler messages:
/tmp/main-62de18.s:47: Error: can't resolve `_GLOBAL_OFFSET_TABLE_' {*UND*
section} - `.LPC1_0' {*UND* section}
clang-3.4: error: assembler command failed with exit code 1 (use -v to see
invocation)
Adding -integrated-as makes clang assert.</pre>
</div>
</p>
<hr>
<span>You are receiving this mail because:</span>
<ul>
<li>You are on the CC list for the bug.</li>
</ul>
</body>
</html>