Skip to content

Commit

Permalink
[depends/libgcrypt] - fix o flag munging by supporting -Og (debug opt…
Browse files Browse the repository at this point in the history
…imisations).
  • Loading branch information
Memphiz committed Oct 29, 2017
1 parent b3f1dab commit 3f66b5d
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
11 changes: 11 additions & 0 deletions tools/depends/target/libgcrypt/04-fix-o-flag-munging.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
--- random/Makefile.am.orig 2017-10-27 12:01:31.000000000 +0200
+++ random/Makefile.am 2017-10-27 12:01:44.000000000 +0200
@@ -55,7 +55,7 @@

# The rndjent module needs to be compiled without optimization. */
if ENABLE_O_FLAG_MUNGING
-o_flag_munging = sed -e 's/-O\([1-9s][1-9s]*\)/-O0/g' -e 's/-Ofast/-O0/g'
+o_flag_munging = sed -e 's/-O\([1-9sg][1-9sg]*\)/-O0/g' -e 's/-Ofast/-O0/g'
else
o_flag_munging = cat
endif
3 changes: 2 additions & 1 deletion tools/depends/target/libgcrypt/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
include ../../Makefile.include
DEPS= ../../Makefile.include 01-gcrypt-android-select.patch 02-fix-armv7-neon.patch 03-remove-cipher-gcm-armv8.patch Makefile
DEPS= ../../Makefile.include 01-gcrypt-android-select.patch 02-fix-armv7-neon.patch 03-remove-cipher-gcm-armv8.patch 04-fix-o-flag-munging.patch Makefile

# lib name, version
LIBNAME=libgcrypt
Expand Down Expand Up @@ -39,6 +39,7 @@ $(PLATFORM): $(TARBALLS_LOCATION)/$(ARCHIVE) $(DEPS)
ifneq ($(findstring arm64, $(CPU)), arm64)
cd $(PLATFORM); patch -p0 < ../03-remove-cipher-gcm-armv8.patch
endif
cd $(PLATFORM); patch -p0 < ../04-fix-o-flag-munging.patch
# do not build the tests or docs
sed -ie "s|doc tests||" "$(PLATFORM)/Makefile.am"
sed -ie "s|\$$(doc) tests||" "$(PLATFORM)/Makefile.am"
Expand Down

0 comments on commit 3f66b5d

Please sign in to comment.