similar to: ld.lld ignoring --sysroot

Displaying 20 results from an estimated 5000 matches similar to: "ld.lld ignoring --sysroot"

2020 May 14
2
ld.lld ignoring --sysroot
On 2020-05-14, Rui Ueyama via llvm-dev wrote: >On Thu, May 14, 2020 at 11:04 AM Ivan Medoedov via llvm-dev < >llvm-dev at lists.llvm.org> wrote: > >> Hello, >> >> I'm trying to compile a Linux hello world executable on macOS. >> >> The first step is simple: >> >> clang -c -target x86_64-linux-gnu -c -o hello.o hello.c >> >>
2019 Jun 07
2
ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux
Hi, I'm trying to cross-compile my app. #include <stdio.h> int main() { puts("test"); fopen("test", "r"); // removing fopen() call removes the error return 0; } clang -c -target x86_64-linux-gnu test.c ld.lld -v -o test -m elf_x86_64 -dynamic-linker /lib64/ld-linux-x86-64.so.2 /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o test.o
2019 Jun 07
2
ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux
Thanks, Tim. You are right, it's using macOS' stdio.h, which is a terrible idea. Clang docs on --sysroot: When you have extracted your cross-compiler from a zip file into a directory, you have to use --sysroot=<path>. The path is the root directory where you have unpacked your file, and Clang will look for the directories bin, lib, include in there. I have a silly question: where
2011 Aug 25
4
[LLVMdev] Changes to Debian's linker object files breaks building LLVM [crti.o, crt1.o, crtn.o]
I've got a simple workaround which obviously everyone will figure out: mdriftmeyer at horus:/usr/lib$ sudo ln -s x86_64-linux-gnu/crti.o crti.o mdriftmeyer at horus:/usr/lib$ sudo ln -s x86_64-linux-gnu/crt1.o crt1.o mdriftmeyer at horus:/usr/lib$ sudo ln -s x86_64-linux-gnu/crtn.o crtn.o My real question concerns whether or not I should file a bug report against Debian not having a
2011 Aug 26
0
[LLVMdev] Changes to Debian's linker object files breaks building LLVM [crti.o, crt1.o, crtn.o]
Debian's response I enclose to see if this helps out: > reassign 639214 general > forcemerge 637232 639214 > quit > > Hi Marc, > > Marc J. Driftmeyer wrote: > >> With the most recent changes of moving the object files under >> /usr/lib/x86_64-linux-gnu/ the linker to build Clang/LLVM breaks. >> >> A workaround is to add symlinks for crt1.o,
2011 Aug 25
0
[LLVMdev] Changes to Debian's linker object files breaks building LLVM [crti.o, crt1.o, crtn.o]
On Wed, Aug 24, 2011 at 6:36 PM, Marc J. Driftmeyer <mjd at reanimality.com> wrote: > I've got a simple workaround which obviously everyone will figure out: > > mdriftmeyer at horus:/usr/lib$ sudo ln -s x86_64-linux-gnu/crti.o crti.o > mdriftmeyer at horus:/usr/lib$ sudo ln -s x86_64-linux-gnu/crt1.o crt1.o > mdriftmeyer at horus:/usr/lib$ sudo ln -s
2019 May 03
2
Cross compiling an empty program results in a segfault
Sorry for the late reply. Thanks, Eli. That was really helpful. On Fri, Apr 12, 2019 at 9:31 PM Eli Friedman <efriedma at quicinc.com> wrote: > “--entry main” is not going to do what you want; the entry point for a > Linux program is not equivalent to the C “main”. > http://dbp-consulting.com/tutorials/debugging/linuxProgramStartup.html > has a description of how a C program
2011 Aug 25
1
[LLVMdev] Changes to Debian's linker object files breaks building LLVM [crti.o, crt1.o, crtn.o]
Seeing as GCC 4.6 works without breaking to build LLVM instead of Clang I think I'm going to bug the Debian proper to make it easier for Clang/LLVM to get the linker update changes. After all, Debian's breaking an awful lot of stuff lately so it seems reasonable for them to add this to their To Do List. - Marc On 08/24/2011 07:15 PM, Eli Friedman wrote: > On Wed, Aug 24, 2011 at
2012 Jun 19
2
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Hello Gergö, Joerg and people on our list With your kind answer, I tried to build a hello world program for ARM(arm-none-linux-gnueabi) on my x86-64 PC. Thank you we verified the generated bitcode. The only thing remained is linking. Let me brief what I did so far. 1. Built Clang/llvm in a way explained in http://clang.llvm.org/get_started.html on Ubuntu 11.10 x86-64 PC 2. Downloaded gcc-4.0
2010 Jul 12
2
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
Sorry for not explaining well. After compiling with g++-cross g++-cross -c a.c I do link using this command /gold_binutils/build/gold/ld-new -plugin ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o /usr/lib/crti.o /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o
2012 Jun 20
3
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Hello, Thank you for your kind attention to my issue and your help. I changed the tool chain and tried again. And there is a little progress but still have some problem. Using --sysroot doesn't make clang use linker(ld) in the cross tool. Most important question is how I can make clang use cross tool linker. Let me show you my experiment and questions below. There are two questions. [Run]
2015 Mar 12
2
[LLVMdev] Customize Standard C Library Using LLVM (to support llvm backend optimization)
2015-03-11 16:22 GMT-05:00 Richard Gorton < rcgorton at cognitive-electronics.com>: > I can confirm that musl builds and works correctly with clang/llvm. We > are using musl as a libc for our architecture. > It has a much smaller code footprint than newlib or glibc. > I successfully cross-compile the must-libc using clang, with the configuration: C=clang
2016 Feb 08
3
[LLD] Incorrect comparision of pointers to function defined in DSO
Hi, It looks like I have found a bug in LLD. Suppose DSO defines a global variable 'data' and initializes it by the address of function 'set_data' defined in the same DSO. If an executable file (linked by LLD) gets address of the '&set_data' function and compares it with a value stored in the 'data' variable it gets different result. If the executable is linked
2010 Jul 12
0
[LLVMdev] build errors while cross compiling llvm-gcc for ARM
> ~/Desktop/Sanjeev/LLVM/llvm-2.7/Release/lib/libLLVMgold.so --eh-frame-hdr > -melf_i386 -dynamic-linker /lib/ld-linux.so.2 /usr/lib/crt1.o Ok, this way you're generating code for x86 > /usr/lib/crti.o > /usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0/crtbegin.o > -L/usr/local/lib/gcc/i686-pc-linux-gnu/4.2.0  -L/usr/local/lib -lgcc > --as-needed -lgcc_s --no-as-needed -lc -lgcc
2010 Jun 28
2
[LLVMdev] libLLVMgold.so: could not load plugin library
On 6/26/2010 10:30 AM, Rafael Espindola wrote: >> So the gold and the LLVMgold are linked against the same libstdc++. I am >> using the gcc at /s/gcc-4.3.1/i386_rhel5/bin to compile the LLVM chain. > Can you run llvm-gcc again with -Wl,-debug? This will show the linker > line being used. You can then run gdb on it. Try to find what error is > dlopen reporting. I wonder if gold
2019 Mar 25
2
Trying to create a pure LLVM toolchain on musl based distribution
Le 25/03/2019 à 14:41, Peter Smith a écrit : > Hello David, > > I don't know much about the specifics of Musl, so I'm responding generally. > > As I understand it, clang expects to find the compiler-rt libraries > relative to the resource directory, which you can find out the > location of with clang --print-resource-dir . By default it is > lib/clang/9.0.0
2012 Aug 29
0
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Hi Journeyer First, thank you so much for your updates on your experiments. I am currently following your steps but have found myself stuck with the following error: /usr/lib/gcc/arm-linux-gnueabi/4.6/../../../../arm-linux-gnueabi/bin/ld: this linker was not configured to use sysroots clang: error: linker command failed with exit code 1 (use -v to see invocation) I used the command string you
2012 Jun 19
0
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
Hello > ./clang -v -emit-llvm -ccc-host-triple arm-none-linux-gnueabi > -I/home/hum/Documents/Projects/llvm_clang/gnuarm-4.0.2/arm-elf/include > -L/home/hum/Documents/Projects/llvm_clang/gnuarm-4.0.2/arm-elf/bin hello.c You forgot about sysroot here. > /home/hum/Documents/Projects/llvm_clang/gnuarm-4.0.2/arm-elf/bin/ld: > unrecognised emulation mode: armelf_linux_eabi >
2016 Feb 08
2
[LLD] Incorrect comparision of pointers to function defined in DSO
Yes, I had just reduced it too. I am pretty sure this was implemented at some point. Taking a look. Cheers, Rafael On 8 February 2016 at 17:52, Sean Silva <chisophugis at gmail.com> wrote: > Sounds like it is related to this: > > http://www.airs.com/blog/archives/42 > """ > > The fact that C permits taking the address of a function introduces an >
2012 Jun 18
0
[LLVMdev] Is cross-compiling for ARM on x86 with llvm/Clang possible?
On Sat, Jun 16, 2012 at 08:20:23PM +0900, Journeyer J. Joh wrote: > If the cross compiling is supported, is there any documentation on how to > do it? The short version is: assuming you have a cross-binutils installation using e.g. x86_64--netbsd-as and x86_64--netbsd-ld, you add a symlink called x86_64--netbsd-clang to clang and just call that with an appropiate --sysroot to make it find