Re: [RFC][PATCH] * bits/confname.h: Define _CS_POSIX_V7_THREADS_CFLAGS, _CS_POSIX_V7_THREADS_LDFLAGS

2022-03-08 Thread Adhemerval Zanella via Elfutils-devel



On 26/10/2020 20:33, Érico Nogueira via Libc-alpha wrote:
> From: Érico Rolim 
> 
> I would like to add these enums in order to conform to the POSIX
> specification: https://www.man7.org/linux/man-pages/man0/unistd.h.0p.html
> 
> This change also helps musl-libc, since they want to have these defines
> with the same values as glibc.
> 
> I tried to add them for the bits/confname.h and
> conform/data/unistd.h-data files following the example of the other
> values, but didn't know how to plug them into the confstr / __sysconf
> implementations.

I think since we do not export _SC_POSIX_THREADS and now that libpthread
symbols were all moved to libc, there is no need return the libpthread
for LDFLAGS.  However it requires to be handled on confstr and getconf:

diff --git a/posix/confstr.c b/posix/confstr.c
index 6e3c264462..95fb0f6abc 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -249,6 +249,11 @@ __confstr (int name, char *buf, size_t len)
   /* GNU libc does not require special actions to use LFS functions.  */
   break;
 
+case _CS_POSIX_V7_THREADS_CFLAGS:
+case _CS_POSIX_V7_THREADS_LDFLAGS:
+  /* GNU libc does not require special actions to use thread functions.  */
+  break;
+
 case _CS_GNU_LIBC_VERSION:
   string = "glibc " VERSION;
   string_len = sizeof ("glibc " VERSION);
diff --git a/posix/getconf.c b/posix/getconf.c
index a1adbc4b50..6a5363ad49 100644
--- a/posix/getconf.c
+++ b/posix/getconf.c
@@ -310,6 +310,8 @@ static const struct conf vars[] =
 { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 
CONFSTR },
 { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, CONFSTR },
 { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, 
CONFSTR },
+{ "POSIX_V7_THREADS_CFLAGS", _CS_POSIX_V7_THREADS_CFLAGS, CONFSTR },
+{ "POSIX_V7_THREADS_LDFLAGS", _CS_POSIX_V7_THREADS_LDFLAGS, CONFSTR },
 
 { "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
 { "_POSIX_BARRIERS", _SC_BARRIERS, SYSCONF },

Also now that we do not require a copyright assignment, you just need to add 
a sign-off on the email submission.

>  
>  bits/confname.h| 7 ++-
>  conform/data/unistd.h-data | 2 ++
>  2 files changed, 8 insertions(+), 1 deletion(-)
> 
> diff --git a/bits/confname.h b/bits/confname.h
> index 5dc8215093..fdc5403697 100644
> --- a/bits/confname.h
> +++ b/bits/confname.h
> @@ -670,6 +670,11 @@ enum
>  
>  _CS_V6_ENV,
>  #define _CS_V6_ENV   _CS_V6_ENV
> -_CS_V7_ENV
> +_CS_V7_ENV,
>  #define _CS_V7_ENV   _CS_V7_ENV
> +
> +_CS_POSIX_V7_THREADS_CFLAGS,
> +#define _CS_POSIX_V7_THREADS_CFLAGS _CS_POSIX_V7_THREADS_CFLAGS
> +_CS_POSIX_V7_THREADS_LDFLAGS
> +#define _CS_POSIX_V7_THREADS_LDFLAGS _CS_POSIX_V7_THREADS_LDFLAGS
>};
> diff --git a/conform/data/unistd.h-data b/conform/data/unistd.h-data
> index aa070528e8..6c4b52a733 100644
> --- a/conform/data/unistd.h-data
> +++ b/conform/data/unistd.h-data
> @@ -367,6 +367,8 @@ constant _CS_POSIX_V7_LP64_OFF64_LIBS
>  constant _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS
>  constant _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS
>  constant _CS_POSIX_V7_LPBIG_OFFBIG_LIBS
> +constant _CS_POSIX_V7_THREADS_CFLAGS
> +constant _CS_POSIX_V7_THREADS_LDFLAGS
>  constant _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS
>  constant _CS_V7_ENV
>  # endif


Re: [RFC][PATCH] * bits/confname.h: Define _CS_POSIX_V7_THREADS_CFLAGS, _CS_POSIX_V7_THREADS_LDFLAGS

2022-03-08 Thread Adhemerval Zanella via Elfutils-devel



On 08/03/2022 13:29, Adhemerval Zanella wrote:
> 
> 
> On 26/10/2020 20:33, Érico Nogueira via Libc-alpha wrote:
>> From: Érico Rolim 
>>
>> I would like to add these enums in order to conform to the POSIX
>> specification: https://www.man7.org/linux/man-pages/man0/unistd.h.0p.html
>>
>> This change also helps musl-libc, since they want to have these defines
>> with the same values as glibc.
>>
>> I tried to add them for the bits/confname.h and
>> conform/data/unistd.h-data files following the example of the other
>> values, but didn't know how to plug them into the confstr / __sysconf
>> implementations.
> 
> I think since we do not export _SC_POSIX_THREADS and now that libpthread
> symbols were all moved to libc, there is no need return the libpthread
> for LDFLAGS.  However it requires to be handled on confstr and getconf:
> 
> diff --git a/posix/confstr.c b/posix/confstr.c
> index 6e3c264462..95fb0f6abc 100644
> --- a/posix/confstr.c
> +++ b/posix/confstr.c
> @@ -249,6 +249,11 @@ __confstr (int name, char *buf, size_t len)
>/* GNU libc does not require special actions to use LFS functions.  */
>break;
>  
> +case _CS_POSIX_V7_THREADS_CFLAGS:
> +case _CS_POSIX_V7_THREADS_LDFLAGS:
> +  /* GNU libc does not require special actions to use thread functions.  
> */
> +  break;
> +
>  case _CS_GNU_LIBC_VERSION:
>string = "glibc " VERSION;
>string_len = sizeof ("glibc " VERSION);
> diff --git a/posix/getconf.c b/posix/getconf.c
> index a1adbc4b50..6a5363ad49 100644
> --- a/posix/getconf.c
> +++ b/posix/getconf.c
> @@ -310,6 +310,8 @@ static const struct conf vars[] =
>  { "POSIX_V7_LPBIG_OFFBIG_LDFLAGS", _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS, 
> CONFSTR },
>  { "POSIX_V7_LPBIG_OFFBIG_LIBS", _CS_POSIX_V7_LPBIG_OFFBIG_LIBS, CONFSTR 
> },
>  { "POSIX_V7_LPBIG_OFFBIG_LINTFLAGS", 
> _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS, CONFSTR },
> +{ "POSIX_V7_THREADS_CFLAGS", _CS_POSIX_V7_THREADS_CFLAGS, CONFSTR },
> +{ "POSIX_V7_THREADS_LDFLAGS", _CS_POSIX_V7_THREADS_LDFLAGS, CONFSTR },
>  
>  { "_POSIX_ADVISORY_INFO", _SC_ADVISORY_INFO, SYSCONF },
>  { "_POSIX_BARRIERS", _SC_BARRIERS, SYSCONF },
> 
> Also now that we do not require a copyright assignment, you just need to add 
> a sign-off on the email submission.
> 

Also, reference the BZ#25003 [1] on title.

https://sourceware.org/bugzilla/show_bug.cgi?id=25003


[Bug tools/28951] New: eu-addr2line produces relative path names, should be absolute

2022-03-08 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28951

Bug ID: 28951
   Summary: eu-addr2line produces relative path names, should be
absolute
   Product: elfutils
   Version: unspecified
Status: NEW
  Severity: normal
  Priority: P2
 Component: tools
  Assignee: unassigned at sourceware dot org
  Reporter: fche at redhat dot com
CC: elfutils-devel at sourceware dot org
  Target Milestone: ---

The behaviour binutils addr2line is more helpful, in that it prefixes relative
source filenames with the CU cwd.  This behaviour would make it more useful to
tools that mechanically process the source file names.

(echo 0; echo 0585b0) | addr2line -e `debuginfod-find debuginfo
07ae52cfc7f4eda1d13383c04564e3236e059993`
??:0
/usr/src/debug/glibc-2.32-10.fc33.x86_64/math/../sysdeps/ieee754/float128/../ldbl-128/e_jnl.c:316

(echo 0; echo 0585b0) | eu-addr2line -e `debuginfod-find debuginfo
07ae52cfc7f4eda1d13383c04564e3236e059993`
??:0
../sysdeps/ieee754/float128/../ldbl-128/e_jnl.c:316:1

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug tools/28951] eu-addr2line produces relative path names, should be absolute

2022-03-08 Thread mark at klomp dot org via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28951

Mark Wielaard  changed:

   What|Removed |Added

 CC||mark at klomp dot org

--- Comment #1 from Mark Wielaard  ---
eu-readelf does have:

  -A, --absolute Show absolute file names using compilation
 directory

Which produces:

$ (echo 0; echo 0585b0) | eu-addr2line -A -e `debuginfod-find debuginfo
07ae52cfc7f4eda1d13383c04564e3236e059993`
??:0
/usr/src/debug/glibc-2.32-10.fc33.x86_64/math/../sysdeps/ieee754/float128/../ldbl-128/e_jnl.c:316:1

We could make that the default maybe?

-- 
You are receiving this mail because:
You are on the CC list for the bug.

[Bug tools/28951] eu-addr2line produces relative path names, should be absolute

2022-03-08 Thread fche at redhat dot com via Elfutils-devel
https://sourceware.org/bugzilla/show_bug.cgi?id=28951

--- Comment #2 from Frank Ch. Eigler  ---
Sorry for not noticing the flag.  Making it default would let it match
binutils.  (Both also have the "-s" option for basename.)

-- 
You are receiving this mail because:
You are on the CC list for the bug.