search for: medoedov

Displaying 6 results from an estimated 6 matches for "medoedov".

2019 May 03
2
Cross compiling an empty program results in a segfault
...he path to those libraries using > –sysroot. https://clang.llvm.org/docs/CrossCompilation.html has a > general description of various issues with cross-compiling. > > > > -Eli > > > > *From:* llvm-dev <llvm-dev-bounces at lists.llvm.org> *On Behalf Of *Ivan > Medoedov via llvm-dev > *Sent:* Wednesday, April 10, 2019 1:28 PM > *To:* llvm-dev at lists.llvm.org > *Subject:* [EXT] [llvm-dev] Cross compiling an empty program results in a > segfault > > > > Hello, > > > > I'm trying to cross compile an empty program on macOS for...
2019 Jun 07
2
ld.lld fails with "undefined symbol: _fopen" on macOS, while working as expected on Linux
...les one by one (/lib64/ld-linux-x86-64.so.2 /usr/lib/x86_64-linux-gnu/crt1.o /usr/lib/x86_64-linux-gnu/crti.o, etc) and it's been a painful process. On Fri, Jun 7, 2019 at 9:34 PM Tim Northover <t.p.northover at gmail.com> wrote: > Hi Ivan, > > On Fri, 7 Jun 2019 at 11:19, Ivan Medoedov via llvm-dev > <llvm-dev at lists.llvm.org> wrote: > > LLD 8.0.0 (compatible with GNU linkers) > > ld.lld: error: undefined symbol: _fopen > > >>> referenced by fopen.c > > >>> test.o:(main) > > I suspect you're getting the...
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 >> >&g...
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 Apr 10
2
Cross compiling an empty program results in a segfault
Hello, I'm trying to cross compile an empty program on macOS for Linux: cat test.c int main() { int a = 2+3; return 0; } clang -o -c -target x86_64-linux-gnu test.c If I copy the resulting test.o to the Linux machine and run clang test.o, it works fine. However if I try to link it on macOS, I get a segfault when I launch ./a.out ld.lld --entry main test.o [copy a.out to
2020 May 14
2
ld.lld ignoring --sysroot
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 But linking results in an error: ld.lld --sysroot=/linuxroot/ -o hello -m elf_x86_64 \ -dynamic-linker /lib64/ld-linux-x86-64.so.2 \ /lib/crt1.o \ /usr/lib/x86_64-linux-gnu/crti.o ../hello.o \ /usr/lib/x86_64-linux-gnu/libc.so \