Big Endian Detection: Add a whitelist of always BE OSs#45
Big Endian Detection: Add a whitelist of always BE OSs#45shumow merged 1 commit intocr-marcstevens:masterfrom
Conversation
Hopefully fix the issue with AIX falling through this detection logic and being detected as Little Endian reported on the Git mailing list, see https://public-inbox.org/git/20180729200623.GF945730@genre.crustytoothpaste.net/ Attempt to solve this by extending the existing fallback we have for detecting always Big Endian processors to also detecting always Big Endian OSs. See the public-inbox link in the comment I'm adding for why this should work. I have not tested this myself, since I have no access to AIX. I'll be pointing Michael Felt to the relevant MR so he can test it before this is merged.
|
As it turns out I've been able to test this myself on AIX (I got access to the GCC compile farm), and I can confirm that this works. On xlc 13.1.3 we take this branch, but on GCC 7.2.0 we take the earlier GCC-specific codepath. I submitted this without knowing about #42 (even though I originally said they could submit a PR here, I forgot), looking at that PR I think this is probably a better approach, since I'm told that AIX is always BE, stuff that isn't AIX won't define @MrShark @jrn @shumow @cr-marcstevens @kencu @aixtools: What do you think? |
|
I think your process is very gcc dependent and/or very gnu dependent. root@x066:[/data/prj/aixtools/git/sha1test]make clean mkdir -p bin && ar cru bin/libsha1detectcoll.a obj_lib/ubc_check.lo obj_lib/sha1.lo Anyway, using xlc it also seems to PASS: root@x066:[/data/prj/aixtools/git/sha1test]make test |
|
@aixtools I test this on AIX by building git with it, i.e. manually applying this patch to the sha1dc/sha1.c file, but the above also looks good! |
|
Thank you Ævar and Michael. |
Update sha1dc from the latest version by the upstream maintainer[1]. See 2db8732 ("Merge branch 'ab/sha1dc'", 2017-07-10) for the last update. This fixes an issue where AIX was wrongly detected as a Little-endian instead of a Big-endian system. See [2][3][4]. 1. cr-marcstevens/sha1collisiondetection@232357e 2. cr-marcstevens/sha1collisiondetection#45 3. cr-marcstevens/sha1collisiondetection#42 4. https://public-inbox.org/git/20180729200623.GF945730@genre.crustytoothpaste.net/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com>
Update sha1dc from the latest version by the upstream maintainer[1]. See 2db8732 ("Merge branch 'ab/sha1dc'", 2017-07-10) for the last update. This fixes an issue where AIX was wrongly detected as a Little-endian instead of a Big-endian system. See [2][3][4]. 1. cr-marcstevens/sha1collisiondetection@232357e 2. cr-marcstevens/sha1collisiondetection#45 3. cr-marcstevens/sha1collisiondetection#42 4. https://public-inbox.org/git/20180729200623.GF945730@genre.crustytoothpaste.net/ Signed-off-by: Ævar Arnfjörð Bjarmason <avarab@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Hopefully fix the issue with AIX falling through this detection logic
and being detected as Little Endian reported on the Git mailing list,
see
https://public-inbox.org/git/20180729200623.GF945730@genre.crustytoothpaste.net/
Attempt to solve this by extending the existing fallback we have for
detecting always Big Endian processors to also detecting always Big
Endian OSs. See the public-inbox link in the comment I'm adding for
why this should work.
I have not tested this myself, since I have no access to AIX. I'll be
pointing Michael Felt to the relevant MR so he can test it before this
is merged.