From 2472bc71190b067c564461bfad287576625223ff Mon Sep 17 00:00:00 2001 From: DRC Date: Sun, 22 Jun 2014 21:14:39 +0000 Subject: [PATCH] Add proper support for Borland compilers (Borland needs section names to be prefixed with an underscore, and it needs OMF object files.) git-svn-id: svn+ssh://svn.code.sf.net/p/libjpeg-turbo/code/trunk@1328 632fc199-4ca6-4c93-a231-07263d6284db --- simd/CMakeLists.txt | 11 +++++++---- simd/jsimdext.inc | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/simd/CMakeLists.txt b/simd/CMakeLists.txt index 4ec5ade..25bd290 100755 --- a/simd/CMakeLists.txt +++ b/simd/CMakeLists.txt @@ -3,12 +3,15 @@ if(NOT DEFINED NASM) endif() if(SIMD_X86_64) - set(NAFLAGS -fwin64 -DWIN64 -D__x86_64__ -I${CMAKE_SOURCE_DIR}/win/ - -I${CMAKE_CURRENT_SOURCE_DIR}/) + set(NAFLAGS -fwin64 -DWIN64 -D__x86_64__) else() - set(NAFLAGS -fwin32 -DWIN32 -I${CMAKE_SOURCE_DIR}/win/ - -I${CMAKE_CURRENT_SOURCE_DIR}/) + if(BORLAND) + set(NAFLAGS -fobj -DOBJ32) + else() + set(NAFLAGS -fwin32 -DWIN32) + endif() endif() +set(NAFLAGS ${NAFLAGS} -I${CMAKE_SOURCE_DIR}/win/ -I${CMAKE_CURRENT_SOURCE_DIR}/) # This only works if building from the command line. There is currently no way # to set a variable's value based on the build type when using the MSVC IDE. diff --git a/simd/jsimdext.inc b/simd/jsimdext.inc index 0f1a8da..e1442de 100644 --- a/simd/jsimdext.inc +++ b/simd/jsimdext.inc @@ -65,8 +65,8 @@ ; -- segment definition -- ; -%define SEG_TEXT .text align=16 public use32 class=CODE -%define SEG_CONST .data align=16 public use32 class=DATA +%define SEG_TEXT _text align=16 public use32 class=CODE +%define SEG_CONST _data align=16 public use32 class=DATA %elifdef ELF ; ----(nasm -felf[64] -DELF ...)------------ ; * Linux -- 2.40.0