pf2 0.5.2 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +20 -0
- data/Cargo.lock +7 -27
- data/README.md +1 -1
- data/crates/backtrace-sys2/build.rs +1 -4
- data/crates/backtrace-sys2/src/libbacktrace/Makefile.am +116 -31
- data/crates/backtrace-sys2/src/libbacktrace/Makefile.in +295 -141
- data/crates/backtrace-sys2/src/libbacktrace/README.md +11 -1
- data/crates/backtrace-sys2/src/libbacktrace/alloc.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/allocfail.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/allocfail.sh +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/atomic.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/backtrace-supported.h.in +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/backtrace.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/backtrace.h +12 -12
- data/crates/backtrace-sys2/src/libbacktrace/btest.c +24 -8
- data/crates/backtrace-sys2/src/libbacktrace/config/libtool.m4 +162 -53
- data/crates/backtrace-sys2/src/libbacktrace/config.h.in +3 -0
- data/crates/backtrace-sys2/src/libbacktrace/configure +255 -66
- data/crates/backtrace-sys2/src/libbacktrace/configure.ac +27 -8
- data/crates/backtrace-sys2/src/libbacktrace/dwarf.c +37 -30
- data/crates/backtrace-sys2/src/libbacktrace/edtest.c +2 -2
- data/crates/backtrace-sys2/src/libbacktrace/edtest2.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/elf.c +98 -76
- data/crates/backtrace-sys2/src/libbacktrace/fileline.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/install-debuginfo-for-buildid.sh.in +2 -2
- data/crates/backtrace-sys2/src/libbacktrace/instrumented_alloc.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/internal.h +41 -2
- data/crates/backtrace-sys2/src/libbacktrace/macho.c +25 -19
- data/crates/backtrace-sys2/src/libbacktrace/mmap.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/mmapio.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/mtest.c +4 -4
- data/crates/backtrace-sys2/src/libbacktrace/nounwind.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/pecoff.c +192 -26
- data/crates/backtrace-sys2/src/libbacktrace/posix.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/print.c +41 -16
- data/crates/backtrace-sys2/src/libbacktrace/read.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/simple.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/sort.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/state.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/stest.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/test_format.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/testlib.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/testlib.h +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/ttest.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/unittest.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/unknown.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/xcoff.c +43 -32
- data/crates/backtrace-sys2/src/libbacktrace/xztest.c +2 -2
- data/crates/backtrace-sys2/src/libbacktrace/zstdtest.c +1 -1
- data/crates/backtrace-sys2/src/libbacktrace/ztest.c +1 -1
- data/ext/pf2/Cargo.toml +1 -1
- data/ext/pf2/src/lib.rs +1 -0
- data/ext/pf2/src/profile.rs +7 -3
- data/ext/pf2/src/profile_serializer.rs +6 -13
- data/ext/pf2/src/ringbuffer.rs +1 -3
- data/ext/pf2/src/ruby_init.rs +1 -4
- data/ext/pf2/src/sample.rs +1 -0
- data/ext/pf2/src/serialization/profile.rs +47 -0
- data/ext/pf2/src/serialization/serializer.rs +325 -0
- data/ext/pf2/src/serialization.rs +2 -0
- data/ext/pf2/src/session/configuration.rs +2 -1
- data/ext/pf2/src/session/new_thread_watcher.rs +1 -1
- data/ext/pf2/src/session/ruby_object.rs +1 -5
- data/ext/pf2/src/session.rs +20 -19
- data/ext/pf2/src/signal_scheduler.rs +12 -7
- data/ext/pf2/src/timer_thread_scheduler.rs +11 -3
- data/lib/pf2/cli.rb +3 -1
- data/lib/pf2/reporter/firefox_profiler.rb +397 -0
- data/lib/pf2/reporter/stack_weaver.rb +81 -0
- data/lib/pf2/reporter.rb +3 -392
- data/lib/pf2/serve.rb +3 -1
- data/lib/pf2/session.rb +2 -0
- data/lib/pf2/version.rb +3 -1
- data/lib/pf2.rb +4 -1
- data/rustfmt.toml +1 -0
- metadata +13 -12
- data/crates/backtrace-sys2/src/libbacktrace/libtool.m4 +0 -7436
- data/crates/backtrace-sys2/src/libbacktrace/ltoptions.m4 +0 -369
- data/crates/backtrace-sys2/src/libbacktrace/ltsugar.m4 +0 -123
- data/crates/backtrace-sys2/src/libbacktrace/ltversion.m4 +0 -23
- data/crates/backtrace-sys2/src/libbacktrace/lt~obsolete.m4 +0 -98
|
@@ -10,8 +10,18 @@ The libbacktrace library may be linked into a program or library and
|
|
|
10
10
|
used to produce symbolic backtraces.
|
|
11
11
|
Sample uses would be to print a detailed backtrace when an error
|
|
12
12
|
occurs or to gather detailed profiling information.
|
|
13
|
+
|
|
13
14
|
In general the functions provided by this library are async-signal-safe,
|
|
14
15
|
meaning that they may be safely called from a signal handler.
|
|
16
|
+
That said, on systems that use `dl_iterate_phdr`, such as GNU/Linux,
|
|
17
|
+
gitthe first call to a libbacktrace function will call `dl_iterate_phdr`,
|
|
18
|
+
which is not in general async-signal-safe. Therefore, programs
|
|
19
|
+
that call libbacktrace from a signal handler should ensure that they
|
|
20
|
+
make an initial call from outside of a signal handler.
|
|
21
|
+
Similar considerations apply when arranging to call libbacktrace
|
|
22
|
+
from within malloc; `dl_iterate_phdr` can also call malloc,
|
|
23
|
+
so make an initial call to a libbacktrace function outside of
|
|
24
|
+
malloc before trying to call libbacktrace functions within malloc.
|
|
15
25
|
|
|
16
26
|
The libbacktrace library is provided under a BSD license.
|
|
17
27
|
See the source files for the exact license text.
|
|
@@ -25,7 +35,7 @@ will work.
|
|
|
25
35
|
See the source file backtrace-supported.h.in for the macros that it
|
|
26
36
|
defines.
|
|
27
37
|
|
|
28
|
-
As of
|
|
38
|
+
As of July 2024, libbacktrace supports ELF, PE/COFF, Mach-O, and
|
|
29
39
|
XCOFF executables with DWARF debugging information.
|
|
30
40
|
In other words, it supports GNU/Linux, *BSD, macOS, Windows, and AIX.
|
|
31
41
|
The library is written to make it straightforward to add support for
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* allocfail.c -- Test for libbacktrace library
|
|
2
|
-
Copyright (C) 2018-
|
|
2
|
+
Copyright (C) 2018-2024 Free Software Foundation, Inc.
|
|
3
3
|
|
|
4
4
|
Redistribution and use in source and binary forms, with or without
|
|
5
5
|
modification, are permitted provided that the following conditions are
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
#!/bin/sh
|
|
2
2
|
|
|
3
3
|
# allocfail.sh -- Test for libbacktrace library.
|
|
4
|
-
# Copyright (C) 2018-
|
|
4
|
+
# Copyright (C) 2018-2024 Free Software Foundation, Inc.
|
|
5
5
|
|
|
6
6
|
# Redistribution and use in source and binary forms, with or without
|
|
7
7
|
# modification, are permitted provided that the following conditions are
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* atomic.c -- Support for atomic functions if not present.
|
|
2
|
-
Copyright (C) 2013-
|
|
2
|
+
Copyright (C) 2013-2024 Free Software Foundation, Inc.
|
|
3
3
|
Written by Ian Lance Taylor, Google.
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* backtrace-supported.h.in -- Whether stack backtrace is supported.
|
|
2
|
-
Copyright (C) 2012-
|
|
2
|
+
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
|
3
3
|
Written by Ian Lance Taylor, Google.
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* backtrace.c -- Entry point for stack backtrace library.
|
|
2
|
-
Copyright (C) 2012-
|
|
2
|
+
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
|
3
3
|
Written by Ian Lance Taylor, Google.
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* backtrace.h -- Public header file for stack backtrace library.
|
|
2
|
-
Copyright (C) 2012-
|
|
2
|
+
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
|
3
3
|
Written by Ian Lance Taylor, Google.
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -41,12 +41,12 @@ POSSIBILITY OF SUCH DAMAGE. */
|
|
|
41
41
|
extern "C" {
|
|
42
42
|
#endif
|
|
43
43
|
|
|
44
|
-
|
|
44
|
+
/* The backtrace state. This struct is intentionally not defined in
|
|
45
45
|
the public interface. */
|
|
46
46
|
|
|
47
47
|
struct backtrace_state;
|
|
48
48
|
|
|
49
|
-
|
|
49
|
+
/* The type of the error callback argument to backtrace functions.
|
|
50
50
|
This function, if not NULL, will be called for certain error cases.
|
|
51
51
|
The DATA argument is passed to the function that calls this one.
|
|
52
52
|
The MSG argument is an error message. The ERRNUM argument, if
|
|
@@ -66,7 +66,7 @@ struct backtrace_state;
|
|
|
66
66
|
typedef void (*backtrace_error_callback) (void *data, const char *msg,
|
|
67
67
|
int errnum);
|
|
68
68
|
|
|
69
|
-
|
|
69
|
+
/* Create state information for the backtrace routines. This must be
|
|
70
70
|
called before any of the other routines, and its return value must
|
|
71
71
|
be passed to all of the other routines. FILENAME is the path name
|
|
72
72
|
of the executable file; if it is NULL the library will try
|
|
@@ -88,7 +88,7 @@ extern struct backtrace_state *backtrace_create_state (
|
|
|
88
88
|
const char *filename, int threaded,
|
|
89
89
|
backtrace_error_callback error_callback, void *data);
|
|
90
90
|
|
|
91
|
-
|
|
91
|
+
/* The type of the callback argument to the backtrace_full function.
|
|
92
92
|
DATA is the argument passed to backtrace_full. PC is the program
|
|
93
93
|
counter. FILENAME is the name of the file containing PC, or NULL
|
|
94
94
|
if not available. LINENO is the line number in FILENAME containing
|
|
@@ -101,7 +101,7 @@ typedef int (*backtrace_full_callback) (void *data, uintptr_t pc,
|
|
|
101
101
|
const char *filename, int lineno,
|
|
102
102
|
const char *function);
|
|
103
103
|
|
|
104
|
-
|
|
104
|
+
/* Get a full stack backtrace. SKIP is the number of frames to skip;
|
|
105
105
|
passing 0 will start the trace with the function calling
|
|
106
106
|
backtrace_full. DATA is passed to the callback routine. If any
|
|
107
107
|
call to CALLBACK returns a non-zero value, the stack backtrace
|
|
@@ -116,13 +116,13 @@ extern int backtrace_full (struct backtrace_state *state, int skip,
|
|
|
116
116
|
backtrace_error_callback error_callback,
|
|
117
117
|
void *data);
|
|
118
118
|
|
|
119
|
-
|
|
119
|
+
/* The type of the callback argument to the backtrace_simple function.
|
|
120
120
|
DATA is the argument passed to simple_backtrace. PC is the program
|
|
121
121
|
counter. This should return 0 to continue tracing. */
|
|
122
122
|
|
|
123
123
|
typedef int (*backtrace_simple_callback) (void *data, uintptr_t pc);
|
|
124
124
|
|
|
125
|
-
|
|
125
|
+
/* Get a simple backtrace. SKIP is the number of frames to skip, as
|
|
126
126
|
in backtrace. DATA is passed to the callback routine. If any call
|
|
127
127
|
to CALLBACK returns a non-zero value, the stack backtrace stops,
|
|
128
128
|
and backtrace_simple returns that value. Otherwise
|
|
@@ -135,14 +135,14 @@ extern int backtrace_simple (struct backtrace_state *state, int skip,
|
|
|
135
135
|
backtrace_error_callback error_callback,
|
|
136
136
|
void *data);
|
|
137
137
|
|
|
138
|
-
|
|
138
|
+
/* Print the current backtrace in a user readable format to a FILE.
|
|
139
139
|
SKIP is the number of frames to skip, as in backtrace_full. Any
|
|
140
140
|
error messages are printed to stderr. This function requires debug
|
|
141
141
|
info for the executable. */
|
|
142
142
|
|
|
143
143
|
extern void backtrace_print (struct backtrace_state *state, int skip, FILE *);
|
|
144
144
|
|
|
145
|
-
|
|
145
|
+
/* Given PC, a program counter in the current program, call the
|
|
146
146
|
callback function with filename, line number, and function name
|
|
147
147
|
information. This will normally call the callback function exactly
|
|
148
148
|
once. However, if the PC happens to describe an inlined call, and
|
|
@@ -156,7 +156,7 @@ extern int backtrace_pcinfo (struct backtrace_state *state, uintptr_t pc,
|
|
|
156
156
|
backtrace_error_callback error_callback,
|
|
157
157
|
void *data);
|
|
158
158
|
|
|
159
|
-
|
|
159
|
+
/* The type of the callback argument to backtrace_syminfo. DATA and
|
|
160
160
|
PC are the arguments passed to backtrace_syminfo. SYMNAME is the
|
|
161
161
|
name of the symbol for the corresponding code. SYMVAL is the
|
|
162
162
|
value and SYMSIZE is the size of the symbol. SYMNAME will be NULL
|
|
@@ -167,7 +167,7 @@ typedef void (*backtrace_syminfo_callback) (void *data, uintptr_t pc,
|
|
|
167
167
|
uintptr_t symval,
|
|
168
168
|
uintptr_t symsize);
|
|
169
169
|
|
|
170
|
-
|
|
170
|
+
/* Given ADDR, an address or program counter in the current program,
|
|
171
171
|
call the callback information with the symbol name and value
|
|
172
172
|
describing the function or variable in which ADDR may be found.
|
|
173
173
|
This will call either CALLBACK or ERROR_CALLBACK exactly once.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
/* btest.c -- Test for libbacktrace library
|
|
2
|
-
Copyright (C) 2012-
|
|
2
|
+
Copyright (C) 2012-2024 Free Software Foundation, Inc.
|
|
3
3
|
Written by Ian Lance Taylor, Google.
|
|
4
4
|
|
|
5
5
|
Redistribution and use in source and binary forms, with or without
|
|
@@ -38,6 +38,7 @@ POSSIBILITY OF SUCH DAMAGE. */
|
|
|
38
38
|
#include <stdlib.h>
|
|
39
39
|
#include <string.h>
|
|
40
40
|
#include <unistd.h>
|
|
41
|
+
#include <sys/stat.h>
|
|
41
42
|
|
|
42
43
|
#include "filenames.h"
|
|
43
44
|
|
|
@@ -48,7 +49,7 @@ POSSIBILITY OF SUCH DAMAGE. */
|
|
|
48
49
|
|
|
49
50
|
/* Test the backtrace function with non-inlined functions. */
|
|
50
51
|
|
|
51
|
-
static int test1 (void) __attribute__ ((noinline, noclone, unused));
|
|
52
|
+
static int test1 (void) __attribute__ ((noinline, noclone, optnone, unused));
|
|
52
53
|
static int f2 (int) __attribute__ ((noinline, noclone));
|
|
53
54
|
static int f3 (int, int) __attribute__ ((noinline, noclone));
|
|
54
55
|
|
|
@@ -162,7 +163,7 @@ f13 (int f1line, int f2line)
|
|
|
162
163
|
|
|
163
164
|
/* Test the backtrace_simple function with non-inlined functions. */
|
|
164
165
|
|
|
165
|
-
static int test3 (void) __attribute__ ((noinline, noclone, unused));
|
|
166
|
+
static int test3 (void) __attribute__ ((noinline, noclone, optnone, unused));
|
|
166
167
|
static int f22 (int) __attribute__ ((noinline, noclone));
|
|
167
168
|
static int f23 (int, int) __attribute__ ((noinline, noclone));
|
|
168
169
|
|
|
@@ -439,7 +440,7 @@ test5 (void)
|
|
|
439
440
|
(unsigned long) (uintptr_t) &global);
|
|
440
441
|
symdata.failed = 1;
|
|
441
442
|
}
|
|
442
|
-
else if (symdata.size != sizeof (global))
|
|
443
|
+
else if (symdata.size != sizeof (global) && symdata.size != 0)
|
|
443
444
|
{
|
|
444
445
|
fprintf (stderr,
|
|
445
446
|
"test5: unexpected syminfo size got %lx expected %lx\n",
|
|
@@ -458,16 +459,29 @@ test5 (void)
|
|
|
458
459
|
return failures;
|
|
459
460
|
}
|
|
460
461
|
|
|
462
|
+
#define MIN_DESCRIPTOR 3
|
|
463
|
+
#define MAX_DESCRIPTOR 10
|
|
464
|
+
|
|
465
|
+
static int fstat_status[MAX_DESCRIPTOR];
|
|
466
|
+
|
|
467
|
+
/* Check files that are available. */
|
|
468
|
+
|
|
469
|
+
static void
|
|
470
|
+
check_available_files (void)
|
|
471
|
+
{
|
|
472
|
+
struct stat s;
|
|
473
|
+
for (unsigned i = MIN_DESCRIPTOR; i < MAX_DESCRIPTOR; i++)
|
|
474
|
+
fstat_status[i] = fstat (i, &s);
|
|
475
|
+
}
|
|
476
|
+
|
|
461
477
|
/* Check that are no files left open. */
|
|
462
478
|
|
|
463
479
|
static void
|
|
464
480
|
check_open_files (void)
|
|
465
481
|
{
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
for (i = 3; i < 10; i++)
|
|
482
|
+
for (unsigned i = MIN_DESCRIPTOR; i < MAX_DESCRIPTOR; i++)
|
|
469
483
|
{
|
|
470
|
-
if (close (i) == 0)
|
|
484
|
+
if (fstat_status[i] != 0 && close (i) == 0)
|
|
471
485
|
{
|
|
472
486
|
fprintf (stderr,
|
|
473
487
|
"ERROR: descriptor %d still open after tests complete\n",
|
|
@@ -482,6 +496,8 @@ check_open_files (void)
|
|
|
482
496
|
int
|
|
483
497
|
main (int argc ATTRIBUTE_UNUSED, char **argv)
|
|
484
498
|
{
|
|
499
|
+
check_available_files ();
|
|
500
|
+
|
|
485
501
|
state = backtrace_create_state (argv[0], BACKTRACE_SUPPORTS_THREADS,
|
|
486
502
|
error_callback_create, NULL);
|
|
487
503
|
|
|
@@ -1005,7 +1005,7 @@ _LT_EOF
|
|
|
1005
1005
|
# darwin 5.x (macOS 10.1) onwards we only need to adjust when the
|
|
1006
1006
|
# deployment target is forced to an earlier version.
|
|
1007
1007
|
case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host in
|
|
1008
|
-
UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[
|
|
1008
|
+
UNSET,*-darwin[[89]]*|UNSET,*-darwin[[12]][[0-9]]*)
|
|
1009
1009
|
;;
|
|
1010
1010
|
10.[[012]][[,.]]*)
|
|
1011
1011
|
_lt_dar_allow_undefined='${wl}-flat_namespace ${wl}-undefined ${wl}suppress'
|
|
@@ -1039,6 +1039,45 @@ _LT_EOF
|
|
|
1039
1039
|
m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
|
1040
1040
|
[
|
|
1041
1041
|
m4_require([_LT_REQUIRED_DARWIN_CHECKS])
|
|
1042
|
+
|
|
1043
|
+
# Publish an arg to allow the user to select that Darwin host (and target)
|
|
1044
|
+
# libraries should be given install-names like @rpath/libfoo.dylib. This
|
|
1045
|
+
# requires that the user of the library then adds an 'rpath' to the DSO that
|
|
1046
|
+
# needs access.
|
|
1047
|
+
# NOTE: there are defaults below, for systems that support rpaths. The person
|
|
1048
|
+
# configuring can override the defaults for any system version that supports
|
|
1049
|
+
# them - they are, however, forced off for system versions without support.
|
|
1050
|
+
AC_ARG_ENABLE([darwin-at-rpath],
|
|
1051
|
+
AS_HELP_STRING([--enable-darwin-at-rpath],
|
|
1052
|
+
[install libraries with @rpath/library-name, requires rpaths to be added to executables]),
|
|
1053
|
+
[if test "x$enable_darwin_at_rpath" = "xyes"; then
|
|
1054
|
+
# This is not supported before macOS 10.5 / Darwin9.
|
|
1055
|
+
case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
|
|
1056
|
+
UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*)
|
|
1057
|
+
AC_MSG_WARN([Darwin @rpath library names are incompatible with OSX versions earlier than 10.5 (rpaths disabled)])
|
|
1058
|
+
enable_darwin_at_rpath=no
|
|
1059
|
+
;;
|
|
1060
|
+
esac
|
|
1061
|
+
fi],
|
|
1062
|
+
[case ${MACOSX_DEPLOYMENT_TARGET-UNSET},$host_os in
|
|
1063
|
+
# As above, before 10.5 / Darwin9 this does not work.
|
|
1064
|
+
UNSET,darwin[[4-8]]*|UNSET,rhapsody*|10.[[0-4]][[,.]]*)
|
|
1065
|
+
enable_darwin_at_rpath=no
|
|
1066
|
+
;;
|
|
1067
|
+
|
|
1068
|
+
# We cannot build and test reliably on macOS 10.11+ (Darwin15+) without use
|
|
1069
|
+
# of rpaths, since runpaths set via DYLD_LIBRARY_PATH are elided by key
|
|
1070
|
+
# system executables (e.g. /bin/sh). Force rpaths on for these systems.
|
|
1071
|
+
UNSET,darwin1[[5-9]]*|UNSET,darwin2*|10.1[[1-9]][[,.]]*|1[[1-9]].*[[,.]]* )
|
|
1072
|
+
AC_MSG_NOTICE([@rpath library names are needed on macOS versions later than 10.11 (rpaths have been enabled)])
|
|
1073
|
+
enable_darwin_at_rpath=yes
|
|
1074
|
+
;;
|
|
1075
|
+
# NOTE: we are not (yet) doing anything for 10.5 .. 10.10, since they can
|
|
1076
|
+
# work with either DYLD_LIBRARY_PATH or embedded rpaths.
|
|
1077
|
+
|
|
1078
|
+
esac
|
|
1079
|
+
])
|
|
1080
|
+
|
|
1042
1081
|
_LT_TAGVAR(archive_cmds_need_lc, $1)=no
|
|
1043
1082
|
_LT_TAGVAR(hardcode_direct, $1)=no
|
|
1044
1083
|
_LT_TAGVAR(hardcode_automatic, $1)=yes
|
|
@@ -1056,13 +1095,21 @@ m4_defun([_LT_DARWIN_LINKER_FEATURES],
|
|
|
1056
1095
|
esac
|
|
1057
1096
|
if test "$_lt_dar_can_shared" = "yes"; then
|
|
1058
1097
|
output_verbose_link_cmd=func_echo_all
|
|
1059
|
-
|
|
1098
|
+
_lt_install_name='\$rpath/\$soname'
|
|
1099
|
+
if test "x$enable_darwin_at_rpath" = "xyes"; then
|
|
1100
|
+
_lt_install_name='@rpath/\$soname'
|
|
1101
|
+
fi
|
|
1102
|
+
_LT_TAGVAR(archive_cmds, $1)="\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dsymutil}"
|
|
1060
1103
|
_LT_TAGVAR(module_cmds, $1)="\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dsymutil}"
|
|
1061
|
-
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name
|
|
1104
|
+
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \$libobjs \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring ${_lt_dar_export_syms}${_lt_dsymutil}"
|
|
1062
1105
|
_LT_TAGVAR(module_expsym_cmds, $1)="sed -e 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC \$allow_undefined_flag -o \$lib -bundle \$libobjs \$deplibs \$compiler_flags${_lt_dar_export_syms}${_lt_dsymutil}"
|
|
1063
1106
|
m4_if([$1], [CXX],
|
|
1064
1107
|
[ if test "$lt_cv_apple_cc_single_mod" != "yes"; then
|
|
1065
|
-
|
|
1108
|
+
_lt_install_name='\$rpath/\$soname'
|
|
1109
|
+
if test "x$enable_darwin_at_rpath" = "xyes"; then
|
|
1110
|
+
_lt_install_name='@rpath/\$soname'
|
|
1111
|
+
fi
|
|
1112
|
+
_LT_TAGVAR(archive_cmds, $1)="\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name ${_lt_install_name} \$verstring${_lt_dsymutil}"
|
|
1066
1113
|
_LT_TAGVAR(archive_expsym_cmds, $1)="sed 's,^,_,' < \$export_symbols > \$output_objdir/\${libname}-symbols.expsym~\$CC -r -keep_private_externs -nostdlib -o \${lib}-master.o \$libobjs~\$CC -dynamiclib \$allow_undefined_flag -o \$lib \${lib}-master.o \$deplibs \$compiler_flags -install_name \$rpath/\$soname \$verstring${_lt_dar_export_syms}${_lt_dsymutil}"
|
|
1067
1114
|
fi
|
|
1068
1115
|
],[])
|
|
@@ -1325,8 +1372,33 @@ need_locks="$enable_libtool_lock"
|
|
|
1325
1372
|
# _LT_CMD_OLD_ARCHIVE
|
|
1326
1373
|
# -------------------
|
|
1327
1374
|
m4_defun([_LT_CMD_OLD_ARCHIVE],
|
|
1328
|
-
[
|
|
1375
|
+
[plugin_option=
|
|
1376
|
+
plugin_names="liblto_plugin.so liblto_plugin-0.dll cyglto_plugin-0.dll"
|
|
1377
|
+
for plugin in $plugin_names; do
|
|
1378
|
+
plugin_so=`${CC} ${CFLAGS} --print-prog-name $plugin`
|
|
1379
|
+
if test x$plugin_so = x$plugin; then
|
|
1380
|
+
plugin_so=`${CC} ${CFLAGS} --print-file-name $plugin`
|
|
1381
|
+
fi
|
|
1382
|
+
if test x$plugin_so != x$plugin; then
|
|
1383
|
+
plugin_option="--plugin $plugin_so"
|
|
1384
|
+
break
|
|
1385
|
+
fi
|
|
1386
|
+
done
|
|
1387
|
+
|
|
1388
|
+
AC_CHECK_TOOL(AR, ar, false)
|
|
1329
1389
|
test -z "$AR" && AR=ar
|
|
1390
|
+
if test -n "$plugin_option"; then
|
|
1391
|
+
if $AR --help 2>&1 | grep -q "\--plugin"; then
|
|
1392
|
+
touch conftest.c
|
|
1393
|
+
$AR $plugin_option rc conftest.a conftest.c
|
|
1394
|
+
if test "$?" != 0; then
|
|
1395
|
+
AC_MSG_WARN([Failed: $AR $plugin_option rc])
|
|
1396
|
+
else
|
|
1397
|
+
AR="$AR $plugin_option"
|
|
1398
|
+
fi
|
|
1399
|
+
rm -f conftest.*
|
|
1400
|
+
fi
|
|
1401
|
+
fi
|
|
1330
1402
|
test -z "$AR_FLAGS" && AR_FLAGS=cru
|
|
1331
1403
|
_LT_DECL([], [AR], [1], [The archiver])
|
|
1332
1404
|
_LT_DECL([], [AR_FLAGS], [1])
|
|
@@ -1337,6 +1409,11 @@ _LT_DECL([], [STRIP], [1], [A symbol stripping program])
|
|
|
1337
1409
|
|
|
1338
1410
|
AC_CHECK_TOOL(RANLIB, ranlib, :)
|
|
1339
1411
|
test -z "$RANLIB" && RANLIB=:
|
|
1412
|
+
if test -n "$plugin_option" && test "$RANLIB" != ":"; then
|
|
1413
|
+
if $RANLIB --help 2>&1 | grep -q "\--plugin"; then
|
|
1414
|
+
RANLIB="$RANLIB $plugin_option"
|
|
1415
|
+
fi
|
|
1416
|
+
fi
|
|
1340
1417
|
_LT_DECL([], [RANLIB], [1],
|
|
1341
1418
|
[Commands used to install an old-style archive])
|
|
1342
1419
|
|
|
@@ -2334,7 +2411,7 @@ haiku*)
|
|
|
2334
2411
|
soname_spec='${libname}${release}${shared_ext}$major'
|
|
2335
2412
|
shlibpath_var=LIBRARY_PATH
|
|
2336
2413
|
shlibpath_overrides_runpath=yes
|
|
2337
|
-
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/
|
|
2414
|
+
sys_lib_dlsearch_path_spec='/boot/home/config/lib /boot/common/lib /boot/system/lib'
|
|
2338
2415
|
hardcode_into_libs=yes
|
|
2339
2416
|
;;
|
|
2340
2417
|
|
|
@@ -2675,6 +2752,25 @@ uts4*)
|
|
|
2675
2752
|
shlibpath_var=LD_LIBRARY_PATH
|
|
2676
2753
|
;;
|
|
2677
2754
|
|
|
2755
|
+
# Shared libraries for VwWorks, >= 7 only at this stage
|
|
2756
|
+
# and (fpic) still incompatible with "large" code models
|
|
2757
|
+
# in a few configurations. Only for RTP mode in any case,
|
|
2758
|
+
# and upon explicit request at configure time.
|
|
2759
|
+
vxworks7*)
|
|
2760
|
+
dynamic_linker=no
|
|
2761
|
+
case ${with_multisubdir}-${enable_shared} in
|
|
2762
|
+
*large*)
|
|
2763
|
+
;;
|
|
2764
|
+
*mrtp*-yes)
|
|
2765
|
+
version_type=linux
|
|
2766
|
+
need_lib_prefix=no
|
|
2767
|
+
need_version=no
|
|
2768
|
+
library_names_spec='${libname}${release}${shared_ext}$versuffix ${libname}${release}${shared_ext}$major $libname${shared_ext}'
|
|
2769
|
+
soname_spec='${libname}${release}${shared_ext}$major'
|
|
2770
|
+
dynamic_linker="$host_os module_loader"
|
|
2771
|
+
;;
|
|
2772
|
+
esac
|
|
2773
|
+
;;
|
|
2678
2774
|
*)
|
|
2679
2775
|
dynamic_linker=no
|
|
2680
2776
|
;;
|
|
@@ -3162,6 +3258,11 @@ sysv4 | sysv4.3*)
|
|
|
3162
3258
|
tpf*)
|
|
3163
3259
|
lt_cv_deplibs_check_method=pass_all
|
|
3164
3260
|
;;
|
|
3261
|
+
vxworks*)
|
|
3262
|
+
# Assume VxWorks cross toolchains are built on Linux, possibly
|
|
3263
|
+
# as canadian for Windows hosts.
|
|
3264
|
+
lt_cv_deplibs_check_method=pass_all
|
|
3265
|
+
;;
|
|
3165
3266
|
esac
|
|
3166
3267
|
])
|
|
3167
3268
|
file_magic_cmd=$lt_cv_file_magic_cmd
|
|
@@ -3177,53 +3278,61 @@ _LT_DECL([], [file_magic_cmd], [1],
|
|
|
3177
3278
|
|
|
3178
3279
|
# LT_PATH_NM
|
|
3179
3280
|
# ----------
|
|
3180
|
-
# find the pathname to a BSD- or MS-compatible name lister
|
|
3281
|
+
# find the pathname to a BSD- or MS-compatible name lister, and any flags
|
|
3282
|
+
# needed to make it compatible
|
|
3181
3283
|
AC_DEFUN([LT_PATH_NM],
|
|
3182
3284
|
[AC_REQUIRE([AC_PROG_CC])dnl
|
|
3183
3285
|
AC_CACHE_CHECK([for BSD- or MS-compatible name lister (nm)], lt_cv_path_NM,
|
|
3184
3286
|
[if test -n "$NM"; then
|
|
3185
|
-
|
|
3186
|
-
|
|
3187
|
-
else
|
|
3188
|
-
|
|
3189
|
-
|
|
3190
|
-
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
|
|
3219
|
-
|
|
3220
|
-
|
|
3221
|
-
|
|
3222
|
-
|
|
3223
|
-
|
|
3224
|
-
|
|
3225
|
-
|
|
3226
|
-
|
|
3287
|
+
# Let the user override the nm to test.
|
|
3288
|
+
lt_nm_to_check="$NM"
|
|
3289
|
+
else
|
|
3290
|
+
lt_nm_to_check="${ac_tool_prefix}nm"
|
|
3291
|
+
if test -n "$ac_tool_prefix" && test "$build" = "$host"; then
|
|
3292
|
+
lt_nm_to_check="$lt_nm_to_check nm"
|
|
3293
|
+
fi
|
|
3294
|
+
fi
|
|
3295
|
+
for lt_tmp_nm in "$lt_nm_to_check"; do
|
|
3296
|
+
lt_save_ifs="$IFS"; IFS=$PATH_SEPARATOR
|
|
3297
|
+
for ac_dir in $PATH /usr/ccs/bin/elf /usr/ccs/bin /usr/ucb /bin; do
|
|
3298
|
+
IFS="$lt_save_ifs"
|
|
3299
|
+
test -z "$ac_dir" && ac_dir=.
|
|
3300
|
+
# Strip out any user-provided options from the nm to test twice,
|
|
3301
|
+
# the first time to test to see if nm (rather than its options) has
|
|
3302
|
+
# an explicit path, the second time to yield a file which can be
|
|
3303
|
+
# nm'ed itself.
|
|
3304
|
+
tmp_nm_path="`$ECHO "$lt_tmp_nm" | sed 's, -.*$,,'`"
|
|
3305
|
+
case "$tmp_nm_path" in
|
|
3306
|
+
*/*|*\\*) tmp_nm="$lt_tmp_nm";;
|
|
3307
|
+
*) tmp_nm="$ac_dir/$lt_tmp_nm";;
|
|
3308
|
+
esac
|
|
3309
|
+
tmp_nm_to_nm="`$ECHO "$tmp_nm" | sed 's, -.*$,,'`"
|
|
3310
|
+
if test -f "$tmp_nm_to_nm" || test -f "$tmp_nm_to_nm$ac_exeext" ; then
|
|
3311
|
+
# Check to see if the nm accepts a BSD-compat flag.
|
|
3312
|
+
# Adding the `sed 1q' prevents false positives on HP-UX, which says:
|
|
3313
|
+
# nm: unknown option "B" ignored
|
|
3314
|
+
case `"$tmp_nm" -B "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
|
|
3315
|
+
*$tmp_nm*) lt_cv_path_NM="$tmp_nm -B"
|
|
3316
|
+
break
|
|
3317
|
+
;;
|
|
3318
|
+
*)
|
|
3319
|
+
case `"$tmp_nm" -p "$tmp_nm_to_nm" 2>&1 | grep -v '^ *$' | sed '1q'` in
|
|
3320
|
+
*$tmp_nm*)
|
|
3321
|
+
lt_cv_path_NM="$tmp_nm -p"
|
|
3322
|
+
break
|
|
3323
|
+
;;
|
|
3324
|
+
*)
|
|
3325
|
+
lt_cv_path_NM=${lt_cv_path_NM="$tmp_nm"} # keep the first match, but
|
|
3326
|
+
continue # so that we can try to find one that supports BSD flags
|
|
3327
|
+
;;
|
|
3328
|
+
esac
|
|
3329
|
+
;;
|
|
3330
|
+
esac
|
|
3331
|
+
fi
|
|
3332
|
+
done
|
|
3333
|
+
IFS="$lt_save_ifs"
|
|
3334
|
+
done
|
|
3335
|
+
: ${lt_cv_path_NM=no}])
|
|
3227
3336
|
if test "$lt_cv_path_NM" != "no"; then
|
|
3228
3337
|
NM="$lt_cv_path_NM"
|
|
3229
3338
|
else
|
|
@@ -3372,7 +3481,7 @@ osf*)
|
|
|
3372
3481
|
symcode='[[BCDEGQRST]]'
|
|
3373
3482
|
;;
|
|
3374
3483
|
solaris*)
|
|
3375
|
-
symcode='[[
|
|
3484
|
+
symcode='[[BCDRT]]'
|
|
3376
3485
|
;;
|
|
3377
3486
|
sco3.2v5*)
|
|
3378
3487
|
symcode='[[DT]]'
|
|
@@ -6396,8 +6505,9 @@ if test "$_lt_caught_CXX_error" != yes; then
|
|
|
6396
6505
|
;;
|
|
6397
6506
|
|
|
6398
6507
|
vxworks*)
|
|
6399
|
-
#
|
|
6400
|
-
|
|
6508
|
+
# For VxWorks ports, we assume the use of a GNU linker with
|
|
6509
|
+
# standard elf conventions.
|
|
6510
|
+
_LT_TAGVAR(ld_shlibs, $1)=yes
|
|
6401
6511
|
;;
|
|
6402
6512
|
|
|
6403
6513
|
*)
|
|
@@ -6441,7 +6551,6 @@ fi # test "$_lt_caught_CXX_error" != yes
|
|
|
6441
6551
|
AC_LANG_POP
|
|
6442
6552
|
])# _LT_LANG_CXX_CONFIG
|
|
6443
6553
|
|
|
6444
|
-
|
|
6445
6554
|
# _LT_SYS_HIDDEN_LIBDEPS([TAGNAME])
|
|
6446
6555
|
# ---------------------------------
|
|
6447
6556
|
# Figure out "hidden" library dependencies from verbose
|
|
@@ -101,6 +101,9 @@
|
|
|
101
101
|
/* Define to 1 if you have the <sys/types.h> header file. */
|
|
102
102
|
#undef HAVE_SYS_TYPES_H
|
|
103
103
|
|
|
104
|
+
/* Define to 1 if you have the <tlhelp32.h> header file. */
|
|
105
|
+
#undef HAVE_TLHELP32_H
|
|
106
|
+
|
|
104
107
|
/* Define to 1 if you have the <unistd.h> header file. */
|
|
105
108
|
#undef HAVE_UNISTD_H
|
|
106
109
|
|