mirror of
https://github.com/espressif/binutils-gdb.git
synced 2025-06-25 04:49:54 +08:00
gprofng: use the --libdir path to find libraries
gprofng/ChangeLog 2022-10-10 Vladimir Mezentsev <vladimir.mezentsev@oracle.com> PR gprofng/29663 * src/Makefile.am: Add -DLIBDIR to CPPFLAGS. * src/Makefile.in: Rebuild. * src/envsets.cc (putenv_libcollector_ld_misc): Use LIBDIR to find the gprofng libraries.
This commit is contained in:
@ -108,7 +108,7 @@ LOCALEDIR = @localedir@
|
||||
SYSCONFDIR = @sysconfdir@
|
||||
|
||||
AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
|
||||
-DSYSCONFDIR=\"$(SYSCONFDIR)\" \
|
||||
-DSYSCONFDIR=\"$(SYSCONFDIR)\" -DLIBDIR=\"$(libdir)\" \
|
||||
-I.. -I$(srcdir) \
|
||||
-I$(srcdir)/../common \
|
||||
-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
|
||||
|
@ -536,7 +536,7 @@ ZLIBINC = @zlibinc@
|
||||
LOCALEDIR = @localedir@
|
||||
SYSCONFDIR = @sysconfdir@
|
||||
AM_CPPFLAGS = $(GPROFNG_CPPFLAGS) -DLOCALEDIR=\"$(LOCALEDIR)\" \
|
||||
-DSYSCONFDIR=\"$(SYSCONFDIR)\" \
|
||||
-DSYSCONFDIR=\"$(SYSCONFDIR)\" -DLIBDIR=\"$(libdir)\" \
|
||||
-I.. -I$(srcdir) \
|
||||
-I$(srcdir)/../common \
|
||||
-I$(srcdir)/../../include -I$(srcdir)/../../opcodes \
|
||||
|
@ -159,12 +159,18 @@ collect::putenv_libcollector_ld_misc ()
|
||||
sb.appendf ("%s=", "SP_COLLECTOR_LIBRARY_PATH");
|
||||
int len = sb.length ();
|
||||
int cnt = 0;
|
||||
char *fname = dbe_sprintf ("%s/%s/%s", LIBDIR, PACKAGE, LIBGP_COLLECTOR);
|
||||
if (access (fname, R_OK | F_OK) == 0)
|
||||
{
|
||||
++cnt;
|
||||
sb.appendf ("%s/%s", LIBDIR, PACKAGE);
|
||||
}
|
||||
free (fname);
|
||||
for (char *s = ev; s;)
|
||||
{
|
||||
char *s1 = strchr (s, ':');
|
||||
if (s1)
|
||||
*(s1++) = 0;
|
||||
char *fname;
|
||||
if (*s == '/')
|
||||
{
|
||||
fname = dbe_sprintf ("%s/%s/%s", s, PACKAGE, LIBGP_COLLECTOR);
|
||||
|
Reference in New Issue
Block a user