public inbox for libc-alpha@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
@ 2021-04-30 18:28 Khem Raj
  2021-04-30 19:08 ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2021-04-30 18:28 UTC (permalink / raw)
  To: libc-alpha

-ffile-prefix-map could be used as superset to imply -fdebug-prefix-map
as well, therefore it should be propagated too, so cases when
-ffile-prefix-map is used but -fdebug-prefix-map is not, then it should
still rewire the paths in debug info
---
 Makeconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makeconfig b/Makeconfig
index 01f8638c2e..5a675e20e3 100644
--- a/Makeconfig
+++ b/Makeconfig
@@ -1067,7 +1067,7 @@ endif
 
 # The assembler can generate debug information too.
 ifndef ASFLAGS
-ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
+ASFLAGS := $(filter -g% -ffile-prefix-map=% -fdebug-prefix-map=%,$(CFLAGS))
 endif
 override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
 
-- 
2.31.1


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-04-30 18:28 [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS Khem Raj
@ 2021-04-30 19:08 ` Khem Raj
  2021-04-30 19:22   ` Khem Raj
  2021-05-01  7:26   ` Florian Weimer
  0 siblings, 2 replies; 7+ messages in thread
From: Khem Raj @ 2021-04-30 19:08 UTC (permalink / raw)
  To: GNU C Library

On Fri, Apr 30, 2021 at 11:28 AM Khem Raj <raj.khem@gmail.com> wrote:
>
> -ffile-prefix-map could be used as superset to imply -fdebug-prefix-map
> as well, therefore it should be propagated too, so cases when
> -ffile-prefix-map is used but -fdebug-prefix-map is not, then it should
> still rewire the paths in debug info

hmm noticed that when I remove -fdebug-prefix-map then
-ffile-prefix-map did not work and its because GCC is not
translating -ffile-prefix-map to equivalent assembler option
--debug-prefix-map like it does for -fdebug-prefix-map
it seems a bug in GCC driver.

> ---
>  Makeconfig | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/Makeconfig b/Makeconfig
> index 01f8638c2e..5a675e20e3 100644
> --- a/Makeconfig
> +++ b/Makeconfig
> @@ -1067,7 +1067,7 @@ endif
>
>  # The assembler can generate debug information too.
>  ifndef ASFLAGS
> -ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
> +ASFLAGS := $(filter -g% -ffile-prefix-map=% -fdebug-prefix-map=%,$(CFLAGS))
>  endif
>  override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
>
> --
> 2.31.1
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-04-30 19:08 ` Khem Raj
@ 2021-04-30 19:22   ` Khem Raj
  2021-05-01  7:26   ` Florian Weimer
  1 sibling, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-04-30 19:22 UTC (permalink / raw)
  To: GNU C Library

On Fri, Apr 30, 2021 at 12:08 PM Khem Raj <raj.khem@gmail.com> wrote:
>
> On Fri, Apr 30, 2021 at 11:28 AM Khem Raj <raj.khem@gmail.com> wrote:
> >
> > -ffile-prefix-map could be used as superset to imply -fdebug-prefix-map
> > as well, therefore it should be propagated too, so cases when
> > -ffile-prefix-map is used but -fdebug-prefix-map is not, then it should
> > still rewire the paths in debug info
>
> hmm noticed that when I remove -fdebug-prefix-map then
> -ffile-prefix-map did not work and its because GCC is not
> translating -ffile-prefix-map to equivalent assembler option
> --debug-prefix-map like it does for -fdebug-prefix-map
> it seems a bug in GCC driver.

infact there already is a bug for gcc driver for this

https://gcc.gnu.org/bugzilla/show_bug.cgi?id=93371


>
> > ---
> >  Makeconfig | 2 +-
> >  1 file changed, 1 insertion(+), 1 deletion(-)
> >
> > diff --git a/Makeconfig b/Makeconfig
> > index 01f8638c2e..5a675e20e3 100644
> > --- a/Makeconfig
> > +++ b/Makeconfig
> > @@ -1067,7 +1067,7 @@ endif
> >
> >  # The assembler can generate debug information too.
> >  ifndef ASFLAGS
> > -ASFLAGS := $(filter -g% -fdebug-prefix-map=%,$(CFLAGS))
> > +ASFLAGS := $(filter -g% -ffile-prefix-map=% -fdebug-prefix-map=%,$(CFLAGS))
> >  endif
> >  override ASFLAGS += -Werror=undef $(ASFLAGS-config) $(asflags-cpu)
> >
> > --
> > 2.31.1
> >

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-04-30 19:08 ` Khem Raj
  2021-04-30 19:22   ` Khem Raj
@ 2021-05-01  7:26   ` Florian Weimer
  2021-05-01 13:26     ` Khem Raj
  1 sibling, 1 reply; 7+ messages in thread
From: Florian Weimer @ 2021-05-01  7:26 UTC (permalink / raw)
  To: Khem Raj via Libc-alpha

* Khem Raj via Libc-alpha:

> On Fri, Apr 30, 2021 at 11:28 AM Khem Raj <raj.khem@gmail.com> wrote:
>>
>> -ffile-prefix-map could be used as superset to imply -fdebug-prefix-map
>> as well, therefore it should be propagated too, so cases when
>> -ffile-prefix-map is used but -fdebug-prefix-map is not, then it should
>> still rewire the paths in debug info
>
> hmm noticed that when I remove -fdebug-prefix-map then
> -ffile-prefix-map did not work and its because GCC is not
> translating -ffile-prefix-map to equivalent assembler option
> --debug-prefix-map like it does for -fdebug-prefix-map
> it seems a bug in GCC driver.

I haven't look at the patch in detail.  Does the above mean you withdraw
it?

Thanks,
Florian


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-05-01  7:26   ` Florian Weimer
@ 2021-05-01 13:26     ` Khem Raj
  2021-05-01 13:38       ` Florian Weimer
  0 siblings, 1 reply; 7+ messages in thread
From: Khem Raj @ 2021-05-01 13:26 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Khem Raj via Libc-alpha

On Sat, May 1, 2021 at 12:26 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Khem Raj via Libc-alpha:
>
> > On Fri, Apr 30, 2021 at 11:28 AM Khem Raj <raj.khem@gmail.com> wrote:
> >>
> >> -ffile-prefix-map could be used as superset to imply -fdebug-prefix-map
> >> as well, therefore it should be propagated too, so cases when
> >> -ffile-prefix-map is used but -fdebug-prefix-map is not, then it should
> >> still rewire the paths in debug info
> >
> > hmm noticed that when I remove -fdebug-prefix-map then
> > -ffile-prefix-map did not work and its because GCC is not
> > translating -ffile-prefix-map to equivalent assembler option
> > --debug-prefix-map like it does for -fdebug-prefix-map
> > it seems a bug in GCC driver.
>
> I haven't look at the patch in detail.  Does the above mean you withdraw
> it?

I think it wont be effective unless gcc bug is fixed. So it can be applied or
we can wait for gcc to be fixed.

>
> Thanks,
> Florian
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-05-01 13:26     ` Khem Raj
@ 2021-05-01 13:38       ` Florian Weimer
  2021-05-01 17:50         ` Khem Raj
  0 siblings, 1 reply; 7+ messages in thread
From: Florian Weimer @ 2021-05-01 13:38 UTC (permalink / raw)
  To: Khem Raj; +Cc: Khem Raj via Libc-alpha

* Khem Raj:

> I think it wont be effective unless gcc bug is fixed. So it can be applied or
> we can wait for gcc to be fixed.

Let's wait for the GCC fix, in case it takes a different shape.

Thanks,
Florian


^ permalink raw reply	[flat|nested] 7+ messages in thread

* Re: [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS.
  2021-05-01 13:38       ` Florian Weimer
@ 2021-05-01 17:50         ` Khem Raj
  0 siblings, 0 replies; 7+ messages in thread
From: Khem Raj @ 2021-05-01 17:50 UTC (permalink / raw)
  To: Florian Weimer; +Cc: Khem Raj via Libc-alpha

On Sat, May 1, 2021 at 6:38 AM Florian Weimer <fweimer@redhat.com> wrote:
>
> * Khem Raj:
>
> > I think it wont be effective unless gcc bug is fixed. So it can be applied or
> > we can wait for gcc to be fixed.
>
> Let's wait for the GCC fix, in case it takes a different shape.
>

sounds good.

> Thanks,
> Florian
>

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2021-05-01 17:50 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-04-30 18:28 [PATCH] Propagate -ffile-prefix-map from CFLAGS to ASFLAGS Khem Raj
2021-04-30 19:08 ` Khem Raj
2021-04-30 19:22   ` Khem Raj
2021-05-01  7:26   ` Florian Weimer
2021-05-01 13:26     ` Khem Raj
2021-05-01 13:38       ` Florian Weimer
2021-05-01 17:50         ` Khem Raj

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).