-
Notifications
You must be signed in to change notification settings - Fork 2.5k
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
Add reporting of build platform #866
Conversation
Nice! Could you Sign-off on the patch, please? |
@dscho I thought about that just after submitting the PR, but wasn't too concerned since this will almost certainly need to be rebased and force-pushed at least once before it's ready for formal inclusion. :) I'll re-push with signoff later today, and try to not to skip that step even for the interim patches going forward. |
Well, I'd be comfortable merging it. Upstream Git is due this Friday, so... ;-) |
Add preliminary support for detection of the build plaform, and reporting of same with the `git version --build-options' command. This can be useful for bug reporting, to distinguish between 32 and 64-bit builds for example. The current implementation can only distinguish between x86 and x86_64. This will be extended in future patches. In addition, all 32-bit variants (i686, i586, etc.) are collapsed into `x86'. An example of the output is: $ git version --build-options git version 2.9.3.windows.2.826.g06c0f2f sizeof-long: 4 machine: x86_64 The label of `machine' was chosen so the new information will approximate the output of `uname -m'. Signed-off-by: Adric Norris <landstander668@gmail.com>
@dscho In that case, you're quite welcome to it. :) I've just re-pushed the branch with sign-off included (no code changes were made). I'll followup with support for other platforms either via another pull request, or directly with upstream Git if that's more appropriate. Mainly I just need to find a list of the various GCC platform-specific defines, so I can determine how to identify the beasties. |
Thanks! As to GCC defines, I guess it would be safer to add |
`git version --build-options` now [also reports the architecture](git-for-windows/git#866). Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
@dscho Wouldn't that give inaccurate results in the case of cross-compiling to a different target platform? That's the main reason I was using the built-in platform defines, although I certainly could have been missing something. |
On the plus side, I think I've found a pretty comprehensive list of the GCC platform defines here. Should be able to run with that, unless updating CFLAGS (per your previous reply) is deemed to be clearly superior. |
I should have made myself clearer, sorry. I was wondering whether we could not introduce a CFLAG, say, |
@dscho Ah, now I'm with you. I'll go ahead and start looking into that... we can always revert the existing implementation if it works out better. |
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
Add reporting of build platform
@dscho This is my attempt to add build platform information to the output of
git version --build-options
for Issue #846. For now it only understands x86 and x86_64, but I plan to extend the process to include other platforms as well (so that this hopefully won't end up being a Git for Windows specific item).At present all of the 32-bit variants are collapsed into x86, which made sense to me at the time but may or may not be the most desirable approach. For example: