p7zip-rar/debian/patches/03-include-linux-makefile.p...

83 lines
2.2 KiB
Diff

From: Robert Luberda <robert@debian.org>
Date: Fri, 22 Jan 2016 11:16:14 +0100
Subject: Include linux makefile
Include appropriate makefile from makefile.machine
- makefile.linux_x86_asm_gcc_4.X on i386;
- makefile.linux_amd64_asm on amd64;
- makefile.linux_any_cpu_gcc_4.X otherwise.
Update makefile.linux_amd64_asm to have the same visibility
flags as the *gcc_4.X makefiles.
Update makefile.linux_x86_asm_gcc_4.X to use yasm instead
of nasm.
---
makefile.linux_amd64_asm | 3 +++
makefile.linux_x86_asm_gcc_4.X | 2 +-
makefile.machine | 20 ++++++++++++++++++++
3 files changed, 24 insertions(+), 1 deletion(-)
diff --git a/makefile.linux_amd64_asm b/makefile.linux_amd64_asm
index 075c6a8..223559d 100644
--- a/makefile.linux_amd64_asm
+++ b/makefile.linux_amd64_asm
@@ -11,6 +11,9 @@ ALLFLAGS=-m64 ${OPTFLAGS} -pipe \
-D_7ZIP_ASM \
$(LOCAL_FLAGS)
+ALLFLAGS_CPP=-DENV_HAVE_GCCVISIBILITYPATCH -fvisibility=hidden -fvisibility-inlines-hidden
+
+
CXX=g++
CC=gcc
CC_SHARED=-fPIC
diff --git a/makefile.linux_x86_asm_gcc_4.X b/makefile.linux_x86_asm_gcc_4.X
index 1ac339b..3b86ccc 100644
--- a/makefile.linux_x86_asm_gcc_4.X
+++ b/makefile.linux_x86_asm_gcc_4.X
@@ -18,7 +18,7 @@ CXX=g++
CC=gcc
CC_SHARED=-fPIC
LINK_SHARED=-fPIC -shared
-ASM=nasm -f elf
+ASM=yasm -f elf
PRE_COMPILED_HEADER=StdAfx.h.gch
diff --git a/makefile.machine b/makefile.machine
index 9e34c34..715e900 100644
--- a/makefile.machine
+++ b/makefile.machine
@@ -1,6 +1,25 @@
#
# makefile for Linux (x86, PPC, alpha ...)
#
+ifeq (1,1) # In debian always include the approrpiate makefile
+
+ ifndef DEBIAN_P7ZIP_MAKEFILE
+
+ ifeq (i386,$(DEB_HOST_ARCH))
+ export DEBIAN_P7ZIP_MAKEFILE := makefile.linux_x86_asm_gcc_4.X
+ else
+ ifeq (amd64.64,$(DEB_HOST_ARCH).$(DEB_HOST_ARCH_BITS))
+ export DEBIAN_P7ZIP_MAKEFILE := makefile.linux_amd64_asm
+ else
+ export DEBIAN_P7ZIP_MAKEFILE := makefile.linux_any_cpu_gcc_4.X # default
+ endif
+ endif
+
+ endif
+
+ include $(dir $(lastword $(MAKEFILE_LIST)))/$(DEBIAN_P7ZIP_MAKEFILE)
+
+else
OPTFLAGS=-O -s
@@ -21,3 +40,4 @@ LOCAL_LIBS_DLL=$(LOCAL_LIBS) -ldl
OBJ_CRC32=$(OBJ_CRC32_C)
OBJ_AES=
+endif