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

Omit CPU type from man page #2812

Merged
merged 2 commits into from Sep 27, 2018
Merged

Omit CPU type from man page #2812

merged 2 commits into from Sep 27, 2018

Conversation

bmwiedemann
Copy link
Contributor

When a reproducible build is wanted,
we should not add the build CPU type to man pages like ldmd2.1

See https://reproducible-builds.org/ for why this is matters.

The specification for SOURCE_DATE_EPOCH is at
https://reproducible-builds.org/specs/source-date-epoch/
and everyone doing reproducible builds, sets it.

@bmwiedemann
Copy link
Contributor Author

Alternative would be to apply a sed in man page generation to drop the CPU line

@kinke
Copy link
Member

kinke commented Aug 15, 2018

Lgtm, any objections?

@JohanEngelen
Copy link
Member

This to me looks strange. The output of ldc2 --version should not need this special case. While generating the man page, just sed the line out. (I guess the problem is that ldc2 --help is used for generating the man page?)
If you still want to continue with this, at the very least it needs an explaining comment of what is going on here.

@bmwiedemann
Copy link
Contributor Author

ldc2 --help does not capture the CPU type. But ldmd2 --help does. And technically, your own machine's CPU type is not part of the ldc version or help and most other compilers do not include it there, so a third option would be to avoid the special case and just drop it.

@bmwiedemann
Copy link
Contributor Author

bmwiedemann commented Aug 16, 2018

some context from the ldc2 man-page:

       Options  marked with (*) also have a -disable-FOO variant with inverted
       meaning.

              based on DMD v2.080.1 and LLVM 6.0.1 built with LDC - the LLVM D
              compiler  (0.17.5) Default target: x86_64-unknown-linux-gnu Host
              CPU: bdver1 http://dlang.org - http://wiki.dlang.org/LDC

              Registered Targets:

       aarch64
              - AArch64 (little endian)

              aarch64_be [...]

@bmwiedemann
Copy link
Contributor Author

https://travis-ci.org/ldc-developers/ldc/jobs/420270765 failed with

gnumake: *** [/Users/travis/build/ldc-developers/ldc/runtime/druntime-test-shared/finalize.done] Illegal instruction: 4

When a reproducible build is wanted,
we should not add the build CPU type to man pages like ldmd2.1

See https://reproducible-builds.org/ for why this is matters.
@bmwiedemann
Copy link
Contributor Author

@JohanEngelen added an explaining comment in the code
my tests with the patch look good.

@bmwiedemann
Copy link
Contributor Author

Can this be merged now?

@kinke kinke merged commit 3064d35 into ldc-developers:master Sep 27, 2018
@kinke
Copy link
Member

kinke commented Sep 27, 2018

Yeah, I guess the chance of some other distro/packager benefitting from this is higher than someone using SOURCE_DATE_EPOCH by accident and caring about the host CPU output.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants