Skip to content

Commit

Permalink
Optimize arm64 config
Browse files Browse the repository at this point in the history
Signed-off-by: Dennis Ameling <dennis@dennisameling.com>
  • Loading branch information
dennisameling committed Dec 28, 2020
1 parent faa2478 commit 4d36b19
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 8 deletions.
6 changes: 3 additions & 3 deletions mingw-w64-git/PKGBUILD
Original file line number Diff line number Diff line change
Expand Up @@ -62,14 +62,14 @@ sha256sums=('SKIP'
'62f455747f33953a723ff7b070d43f0ed03c1d8d0749d7bb06288e14d356b637'
'f16b345aba17acd124ab5940635dfa2d87445df73eedbeb80e0285f29c85415a'
'80b0b11efe5a2f9b4cd92f28c260d0b3aad8b809c34ed95237c59b73e08ade0b'
'a4274e8aabfa25104b3d705125a96991814791ea9bce4052862e43711d53b0a2'
'59d71fe37cb24ee31e86d04631e59ca01462da50082a6312036621203d031038'
'ee0ed30b2601413a6efcd15f236747404cd2d576dcfad77fb5b1700852cde857'
'c975292adae1f2666f07f8ee9b7d50576da249d9151c6bd211602adc8d37b6ab'
'a7e80489af33468e67a39d4c9c2fbf396e1f1e9533bb447f26432951ccf5e77c'
'0726d386e98d703d5254458056e02824fb3de5602e55a31ec0cddf67c302c3a4'
'0726d386e98d703d5254458056e02824fb3de5602e55a31ec0cddf67c302c3a4'
'cbed8b133eb9eec9972f146be5c3ff49db29b2fff8ab9c87a6d0c646c08a5128'
'93a4fdb3f7e72ff2d1d587ad7c1597e0ad70b03feebd52aa0d80441de2ab0188'
'073466ac7703e55ba18ae8f1185bff85dcb5ae527650d008ffd25d3aebbbe9a1'
'79bb4745063bc3e67831da1f694be0e98998b653a3e334e24db57500b1fee108'
'6d83e1cb1acdb6eb1f2d5cb9299298e57680f5ca43d43c3e67c9da17f21b9b01')

Expand Down Expand Up @@ -148,7 +148,7 @@ build() {
echo "Found IS_ARM64 variable. We'll do some special handling in git-wrapper.c for this architecture."
echo "All packages are mingw32 until native arm64 support is available, but the Git wrapper should point to the native Git ARM64 binary."
rm -f *.res &&
CARCH=arm64 make -n -f ../mingw-w64-git.mak git-wrapper.exe
IS_ARM64=true make -n -f ../mingw-w64-git.mak git-wrapper.exe

else
rm -f *.res &&
Expand Down
4 changes: 2 additions & 2 deletions mingw-w64-git/git-wrapper.c
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ static void setup_environment(LPWSTR top_level_path, int full_path)
int len;

/* Set MSYSTEM */
#if defined(IS_ARM64)
#if defined(IS_ARM64) && IS_ARM64 == true
swprintf(msystem, sizeof(msystem),
L"ARM64");
#else
Expand Down Expand Up @@ -664,7 +664,7 @@ int main(void)
LPWSTR working_directory = NULL;

/* Determine MSys2-based Git path. */
#if defined(IS_ARM64)
#if defined(IS_ARM64) && IS_ARM64 == true
swprintf(msystem_bin, sizeof(msystem_bin),
L"arm64\\bin");
#else
Expand Down
8 changes: 5 additions & 3 deletions mingw-w64-git/mingw-w64-git.mak
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
include Makefile

IS_ARM64?=false

git-wrapper$(X): git-wrapper.o git.res
$(QUIET_LINK)$(CC) -DIS_ARM64=true $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
$(QUIET_LINK)$(CC) -DIS_ARM64=$(IS_ARM64) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
-fno-stack-protector -Wall -o $@ $^ -lshell32 -lshlwapi

git-wrapper.o: %.o: ../%.c GIT-PREFIX
$(QUIET_CC)$(CC) -DIS_ARM64=true $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
$(QUIET_CC)$(CC) -DIS_ARM64=$(IS_ARM64) $(ALL_CFLAGS) $(COMPAT_CFLAGS) \
-fno-stack-protector -o $*.o -c -Wall -Wwrite-strings $<

git-bash.res git-cmd.res git-wrapper.res gitk.res compat-bash.res: \
Expand All @@ -22,7 +24,7 @@ git-bash.exe git-cmd.exe compat-bash.exe \
cmd/git.exe cmd/gitk.exe cmd/git-gui.exe: \
%.exe: git-wrapper.o git.res
@mkdir -p cmd
$(QUIET_LINK)$(CC) -DIS_ARM64=true $(ALL_LDFLAGS) $(COMPAT_CFLAGS) -o $@ $^ -lshlwapi
$(QUIET_LINK)$(CC) -DIS_ARM64=$(IS_ARM64) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) -o $@ $^ -lshlwapi

edit-git-bash$(X): edit-git-bash.o
$(QUIET_LINK)$(CC) $(ALL_LDFLAGS) $(COMPAT_CFLAGS) \
Expand Down

0 comments on commit 4d36b19

Please sign in to comment.