ref: 15b7bc22c32881d2a4fcc95a39aa8a4bc82ecf26
parent: dc59a7586f689ad1356dd3ca27ca01ad0658d028
parent: 9acca331c03017992f7e998707691756866c831d
author: sijchen <sijchen@cisco.com>
date: Tue Apr 21 05:06:33 EDT 2015
Merge pull request #1907 from mstorsjo/x86-64-arch-simplify Use ARCH instead of ENABLE64BIT for distinguishing between x86 and x86_64
--- a/build/AutoBuildForWPAndWindows.bat
+++ b/build/AutoBuildForWPAndWindows.bat
@@ -369,10 +369,10 @@
:Build
set vConfiguration=%1
cd %RootDir%
- echo bash -c "make OS=%vOSType% ARCH=%vArcType% ENABLE64BIT=%vEnable64BitFlag% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
- echo bash -c "make OS=%vOSType% ARCH=%vArcType% ENABLE64BIT=%vEnable64BitFlag% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
- bash -c "make OS=%vOSType% ARCH=%vArcType% ENABLE64BIT=%vEnable64BitFlag% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
- bash -c "make OS=%vOSType% ARCH=%vArcType% ENABLE64BIT=%vEnable64BitFlag% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
+ echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
+ echo bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
+ bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration% clean"
+ bash -c "make OS=%vOSType% ARCH=%vArcType% USE_ASM=%vASMFlag% BUILDTYPE=%vConfiguration%"
if not %ERRORLEVEL%==0 (
set BuildFlag=1
)
--- a/build/msvc-common.mk
+++ b/build/msvc-common.mk
@@ -1,6 +1,6 @@
include $(SRC_PATH)build/arch.mk
ifeq ($(ASM_ARCH), x86)
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
else
--- a/build/platform-darwin.mk
+++ b/build/platform-darwin.mk
@@ -10,7 +10,7 @@
LDFLAGS += -lpthread
ifeq ($(ASM_ARCH), x86)
ASMFLAGS += -DPREFIX
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
ASMFLAGS += -f macho64
else
ASMFLAGS += -f macho
--- a/build/platform-freebsd.mk
+++ b/build/platform-freebsd.mk
@@ -5,7 +5,7 @@
CFLAGS += -fPIC
LDFLAGS += -lpthread
ifeq ($(ASM_ARCH), x86)
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
ASMFLAGS += -f elf64
else
ASMFLAGS += -f elf
--- a/build/platform-linux.mk
+++ b/build/platform-linux.mk
@@ -5,7 +5,7 @@
CFLAGS += -Wall -fno-strict-aliasing -fPIC -MMD -MP
LDFLAGS += -lpthread
ifeq ($(ASM_ARCH), x86)
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
ASMFLAGS += -f elf64
else
ASMFLAGS += -f elf
--- a/build/platform-mingw_nt.mk
+++ b/build/platform-mingw_nt.mk
@@ -6,7 +6,7 @@
SHLDFLAGS = -Wl,--out-implib,$(EXTRA_LIBRARY)
CFLAGS += -MMD -MP
LDFLAGS +=
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
ASMFLAGS += -f win64
ASMFLAGS_PLATFORM = -DWIN64
CC = x86_64-w64-mingw32-gcc
--- a/build/x86-common.mk
+++ b/build/x86-common.mk
@@ -1,12 +1,14 @@
CFLAGS_M32=-m32
CFLAGS_M64=-m64
ASM_INCLUDES = -I$(SRC_PATH)codec/common/x86/
-ifeq (, $(ENABLE64BIT))
-ifeq ($(ARCH), x86_64)
-ENABLE64BIT=Yes
+ifneq ($(ENABLE64BIT),)
+ifeq ($(ENABLE64BIT), Yes)
+ARCH = x86_64
+else
+ARCH = x86
endif
endif
-ifeq ($(ENABLE64BIT), Yes)
+ifeq ($(ARCH), x86_64)
CFLAGS += $(CFLAGS_M64)
LDFLAGS += $(CFLAGS_M64)
ASMFLAGS_PLATFORM = -DUNIX64
@@ -17,7 +19,7 @@
endif
ifeq ($(USE_ASM),Yes)
CFLAGS += -DX86_ASM
-ifneq ($(ENABLE64BIT), Yes)
+ifneq ($(ARCH), x86_64)
CFLAGS += -DX86_32_ASM
endif
ASM_ARCH = x86