ASR_BASE

Change-Id: Icf3719cc0afe3eeb3edc7fa80a2eb5199ca9dda1
diff --git a/tools/7z/patches/7-zip-flags.patch b/tools/7z/patches/7-zip-flags.patch
new file mode 100644
index 0000000..5c684b0
--- /dev/null
+++ b/tools/7z/patches/7-zip-flags.patch
@@ -0,0 +1,20 @@
+--- a/CPP/7zip/7zip_gcc.mak
++++ b/CPP/7zip/7zip_gcc.mak
+@@ -24,7 +24,7 @@ PROGPATH_STATIC = $(O)/$(PROG)s
+ 

+ 

+ ifneq ($(CC), xlc)

+-CFLAGS_WARN_WALL = -Werror -Wall -Wextra

++CFLAGS_WARN_WALL = -Wall -Wextra

+ endif

+ 

+ # for object file

+@@ -50,7 +50,7 @@ endif
+ endif

+ 

+ # CFLAGS_BASE_LIST = -S

+-CFLAGS_BASE = -O2 $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) \

++CFLAGS_BASE = $(CFLAGS_BASE_LIST) $(CFLAGS_WARN_WALL) $(CFLAGS_WARN) -D_GNU_SOURCE \

+  $(CFLAGS_DEBUG) -D_REENTRANT -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE \

+  -fPIC

+ 

diff --git a/tools/7z/patches/7-zip-musl.patch b/tools/7z/patches/7-zip-musl.patch
new file mode 100644
index 0000000..a08520a
--- /dev/null
+++ b/tools/7z/patches/7-zip-musl.patch
@@ -0,0 +1,36 @@
+--- a/C/Threads.c
++++ b/C/Threads.c
+@@ -265,7 +265,7 @@ WRes Thread_Create_With_CpuSet(CThread *
+       */

+ 

+       // ret2 =

+-      pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);

++      //pthread_attr_setaffinity_np(&attr, sizeof(*cpuSet), cpuSet);

+       // if (ret2) ret = ret2;

+ #endif

+     }

+@@ -275,14 +275,12 @@ WRes Thread_Create_With_CpuSet(CThread *
+     if (!ret)

+     {

+       p->_created = 1;

+-      /*

+       if (cpuSet)

+       {

+         // ret2 =

+         pthread_setaffinity_np(p->_tid, sizeof(*cpuSet), cpuSet);

+         // if (ret2) ret = ret2;

+       }

+-      */

+     }

+   }

+   // ret2 =

+--- a/C/Threads.h
++++ b/C/Threads.h
+@@ -29,6 +29,7 @@ Z7_DIAGNOSTIC_IGNORE_END_RESERVED_MACRO_
+ #endif

+ 

+ #include <pthread.h>

++#include <sched.h>

+ 

+ #endif

+