Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

mkbuildinf: Strip fdebug-prefix-map from saved CFLAGS #11545

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

sebastianas
Copy link

@sebastianas sebastianas commented Apr 14, 2020

The saved CFLAGS may contain the -fdebug-prefix-map= which is used
to strip the build path from the debug info. If this information remains
recorded then the binary is no longer reproducible if the build
directory changes.

Replace the recorded CFLAG parameter -fdebug-prefix-map=$OLD=$NEW with
-fdebug-prefix-map=<REPRODUCIBLE>.

Signed-off-by: Sebastian Andrzej Siewior sebastian@breakpoint.cc

Checklist
  • documentation is added or updated

@sebastianas
Copy link
Author

ping

@sebastianas
Copy link
Author

@kroeckx

@t8m t8m added branch: master Merge to master branch triaged: feature The issue/pr requests/adds a feature labels Jul 23, 2021
@t8m t8m added this to the Post 3.0.0 milestone Jul 23, 2021
@sebastianas
Copy link
Author

A gentle ping.

@vagrantc
Copy link

vagrantc commented May 1, 2022

You'll want to update this to also handle -fmacro-prefix-map and -ffile-prefix-map (which is a combination of -fdebug-prefix-map and -fmacro-prefix-map). Since Debian's bullseye release, -ffile-prefix-map has been in the defaults that builds using dpkg-buildflags will use.

@kroeckx kroeckx added the stalled: awaiting contributor response This pull request is awaiting a response by the contributor label Jan 19, 2023
@kroeckx
Copy link
Member

kroeckx commented Jan 19, 2023

@sebastianas This seems to be waiting for changes from you

The saved `CFLAGS' may contain the `-fdebug-prefix-map=' which is used
to strip the build path from the debug info. If this information remains
recorded then the binary is no longer reproducible if the build
directory changes.

Replace the recorded CFLAG parameter `-fdebug-prefix-map=$OLD=$NEW" with
`-fdebug-prefix-map=<REPRODUCIBLE>'.

Signed-off-by: Sebastian Andrzej Siewior <sebastian@breakpoint.cc>
@openssl-machine
Copy link
Collaborator

This PR is waiting for the creator to make requested changes but it has not been updated for 30 days. If you have made changes or commented to the reviewer please make sure you re-request a review (see icon in the 'reviewers' section).

Copy link
Contributor

@paulidale paulidale left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think that this should either be enabled via a configure option or disabled for debug builds. I'm not sure which is the better choice. Suggestions anyone?

@sebastianas
Copy link
Author

What would be the scenario for this to be useful? That would probably make it easier to decide.
I can't think of one so I didn't think that it is worth preserving.

@paulidale
Copy link
Contributor

This option breaks debuggers. I think that that is a very bad thing to do by default.

I know that debuggers can be told the correct source address but I'm confident that a lot of folks wouldn't know how to do this. By making this an enableable (but disabled by default) option, the user is making the choice to break their debugger. Likewise, by not enabling this in debug builds, it's less invasive.

@openssl-machine
Copy link
Collaborator

This PR is waiting for the creator to make requested changes but it has not been updated for 30 days. If you have made changes or commented to the reviewer please make sure you re-request a review (see icon in the 'reviewers' section).

@openssl-machine
Copy link
Collaborator

This PR is waiting for the creator to make requested changes but it has not been updated for 61 days. If you have made changes or commented to the reviewer please make sure you re-request a review (see icon in the 'reviewers' section).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
branch: master Merge to master branch stalled: awaiting contributor response This pull request is awaiting a response by the contributor triaged: feature The issue/pr requests/adds a feature
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants