Date: Tue, 28 Nov 2017 01:34:00 +0100 From: Jan Beich <jbeich@FreeBSD.org> To: freebsd-dtrace@freebsd.org, freebsd-toolchain@freebsd.org Subject: dtrace -G vs. -flto Message-ID: <efoj-5jif-wny@FreeBSD.org>
next in thread | raw e-mail | index | archive | help
I'd like to build www/firefox with both DTrace and LTO support. Both
Clang and GCC emit code that dtrace(1) doesn't understand.
$ cat main.c
#include <sys/sdt.h>
#include <unistd.h>
int main()
{
DTRACE_PROBE(test, foo);
sleep(300);
return 0;
}
$ cat test.d
provider test {
probe foo();
};
$ clang50 -flto -c main.c
$ dtrace -G -s test.d main.o
dtrace: failed to link script test: invalid file type: main.o
$ file main.o
main.o: LLVM IR bitcode
$ gcc7 -flto -c main.c
$ dtrace -G -s test.d main.o
dtrace: failed to link script test: No probe sites found for declared provider
$ file main.o
main.o: ELF 64-bit LSB relocatable, x86-64, version 1 (FreeBSD), not stripped
--
$ uname -a
FreeBSD ... 12.0-CURRENT #0 r325899M ... amd64
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?efoj-5jif-wny>
