Skip to content

Commit 2604ad7

Browse files
committed
Parent: 11c94d9a (Update config for new branch)
Author: Yuriy <[email protected]> AuthorDate: 2019-03-13 20:05:45 +0300 Commit: Yuriy <[email protected]> CommitDate: 2019-03-13 20:05:45 +0300 Single cpu build fix: full export list for 1cpu dlls, #ifdef fix Change-Id: Idac2d7eab659c654c3166987d80bb5bafe5101bearent: 11c94d9a (Update config for new branch) Author: Yuriy <[email protected]> AuthorDate: 2019-03-13 20:05:45 +0300 Commit: Yuriy <[email protected]> CommitDate: 2019-03-13 20:05:45 +0300 Single cpu build fix: full export list for 1cpu dlls, #ifdef fix Change-Id: Idac2d7eab659c654c3166987d80bb5bafe5101be
1 parent bcb8d34 commit 2604ad7

File tree

3 files changed

+30
-38
lines changed

3 files changed

+30
-38
lines changed

sources/include/owndefs.h

Lines changed: 19 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -618,32 +618,33 @@ extern double __intel_castu64_f64(unsigned __int64 val);
618618
#endif
619619

620620
#if defined( _MERGED_BLD )
621-
/* WIN-32, WIN-64 */
622-
#if defined(WIN32) || defined(WIN32E)
623-
#if ( defined(_W7) || defined(_M7) )
624-
#define _IPP_DATA 1
625-
#endif
626-
627-
#elif defined(linux)
628-
/* LIN-32, LIN-64 */
629-
#if !defined(ANDROID)
621+
#if !defined( _IPP_DYNAMIC )
622+
/* WIN-32, WIN-64 */
623+
#if defined(WIN32) || defined(WIN32E)
630624
#if ( defined(_W7) || defined(_M7) )
631625
#define _IPP_DATA 1
632626
#endif
633-
/* ANDROID-32, ANDROID-64 */
634-
#elif defined(ANDROID)
627+
628+
#elif defined(linux)
629+
/* LIN-32, LIN-64 */
630+
#if !defined(ANDROID)
631+
#if ( defined(_W7) || defined(_M7) )
632+
#define _IPP_DATA 1
633+
#endif
634+
/* ANDROID-32, ANDROID-64 */
635+
#elif defined(ANDROID)
636+
#if ( defined(_S8) || defined(_N8) )
637+
#define _IPP_DATA 1
638+
#endif
639+
#endif
640+
641+
/* OSX-32, OSX-64 */
642+
#elif defined(OSX32) || defined(OSXEM64T)
635643
#if ( defined(_S8) || defined(_N8) )
636644
#define _IPP_DATA 1
637645
#endif
638646
#endif
639-
640-
/* OSX-32, OSX-64 */
641-
#elif defined(OSX32) || defined(OSXEM64T)
642-
#if ( defined(_S8) || defined(_N8) )
643-
#define _IPP_DATA 1
644-
#endif
645647
#endif
646-
647648
#else
648649
/* compile data unconditionally */
649650
#define _IPP_DATA 1

sources/ippcp/CMakeLists.txt

Lines changed: 11 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -370,15 +370,17 @@ foreach(opt ${PLATFORM_LIST})
370370

371371
if(DYNAMIC_LIB)
372372
set(IPPCP_DYN_ITER ${TARGET_NAME}_dyn_${opt})
373+
if(MERGED_BLD)
374+
set(EXPORT_LIST_SUFFIX "Ld")
375+
else()
376+
set(EXPORT_LIST_SUFFIX "")
377+
endif()
373378
if(WIN32)
374-
add_library(${IPPCP_DYN_ITER} SHARED ippcpLd.def ${HEADERS} ${SOURCES} ${ASM_SOURCES} pcpver.rc)
379+
add_library(${IPPCP_DYN_ITER} SHARED "ippcp${EXPORT_LIST_SUFFIX}.def" ${HEADERS} ${SOURCES} ${ASM_SOURCES} pcpver.rc)
375380
set_target_properties(${IPPCP_DYN_ITER} PROPERTIES LINK_FLAGS ${LINK_FLAG_DYNAMIC_WINDOWS})
376-
#target_link_libraries(${IPPCP_DYN_ITER} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/${TARGET_NAME}.lib) # gres: add linkage with PCS stub lib
377-
target_link_libraries(${IPPCP_DYN_ITER} debug ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Debug/${TARGET_NAME}.lib)
378381
foreach(link ${LINK_LIB_STATIC_DEBUG})
379382
target_link_libraries(${IPPCP_DYN_ITER} debug ${link})
380383
endforeach()
381-
target_link_libraries(${IPPCP_DYN_ITER} optimized ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/Release/${TARGET_NAME}.lib)
382384
foreach(link ${LINK_LIB_STATIC_RELEASE})
383385
target_link_libraries(${IPPCP_DYN_ITER} optimized ${link})
384386
endforeach()
@@ -397,26 +399,22 @@ foreach(opt ${PLATFORM_LIST})
397399
## gres: copy LINK_FLAG_DYNAMIC_LINUX
398400
set(LNK_FLAGS ${LINK_FLAG_DYNAMIC_MACOSX})
399401
## add export file
400-
set(LNK_FLAGS "${LNK_FLAGS} -exported_symbols_list ${IPP_CRYPTO_SOURCES_DIR}/exports.macosx.libLd-export")
401-
## add linkage with libippcp.dylib
402-
set(LNK_FLAGS "${LNK_FLAGS} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libippcp.dylib")
403-
#message (FATAL_ERROR "LINK_FLAG_DYNAMIC_MACOSX: " ${LNK_FLAGS})
404-
#set_target_properties(${IPPCP_DYN_ITER} PROPERTIES LINK_FLAGS "${LINK_FLAG_DYNAMIC_MACOSX} -install_name @rpath/libippcp${opt}.dylib")
402+
set(LNK_FLAGS "${LNK_FLAGS} -exported_symbols_list ${IPP_CRYPTO_SOURCES_DIR}/exports.macosx.lib${EXPORT_LIST_SUFFIX}-export")
405403
set_target_properties(${IPPCP_DYN_ITER} PROPERTIES LINK_FLAGS "${LNK_FLAGS} -install_name @rpath/libippcp${opt}.dylib")
406404
else()
407405
## gres: copy LINK_FLAG_DYNAMIC_LINUX
408406
set(LINK_FLAGS ${LINK_FLAG_DYNAMIC_LINUX})
409407
## add export file
410-
set(LINK_FLAGS "${LINK_FLAGS} ${IPP_CRYPTO_SOURCES_DIR}/exports.linux.libLd-export")
411-
## add linkage with libippcp.so
412-
set(LINK_FLAGS "${LINK_FLAGS} ${CMAKE_LIBRARY_OUTPUT_DIRECTORY}/libippcp.so")
408+
set(LINK_FLAGS "${LINK_FLAGS} ${IPP_CRYPTO_SOURCES_DIR}/exports.linux.lib${EXPORT_LIST_SUFFIX}-export")
413409
set_target_properties(${IPPCP_DYN_ITER} PROPERTIES LINK_FLAGS ${LINK_FLAGS})
414410
endif()
415411
if(THREADED_LIB)
416412
target_link_libraries(${IPPCP_DYN_ITER} iomp5)
417413
endif()
418414
endif()
419-
add_dependencies(${IPPCP_DYN_ITER} ${TARGET_NAME}_dyn) # gres: set build dependency CPU.dll depends PCS
415+
if(MERGED_BLD)
416+
target_link_libraries(${IPPCP_DYN_ITER} ${TARGET_NAME}_dyn) # link to dynamic PCS lib
417+
endif()
420418
set_target_properties(${IPPCP_DYN_ITER} PROPERTIES OUTPUT_NAME ${TARGET_NAME}${opt})
421419
list(APPEND IPPCP_LIB_DYNAMIC ${IPPCP_DYN_ITER})
422420
endif(DYNAMIC_LIB)
@@ -472,11 +470,6 @@ if(MERGED_BLD)
472470
else() #static sible cpu
473471
set(IPPCP_LIB_STATIC ${IPPCP_LIB_STATIC} PARENT_SCOPE)
474472
set(IPPCP_LIB_DYNAMIC ${IPPCP_LIB_DYNAMIC} PARENT_SCOPE)
475-
476-
foreach(lib ${IPPCP_LIB_STATIC})
477-
#gres: set_target_properties(${lib} PROPERTIES COMPILE_OPTIONS -D_IPP_DATA)
478-
set_target_properties(${lib} PROPERTIES COMPILE_OPTIONS)
479-
endforeach(lib ${IPPCP_LIB_STATIC})
480473
endif()
481474

482475
if(MERGED_BLD)

sources/ippcp/cpinit.c

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
#define _PCS
5555
#endif
5656

57-
#if !defined( _IPP_DYNAMIC )
5857
#if defined( _IPP_DATA )
5958

6059
static Ipp64u cpFeatures = 0;
@@ -561,4 +560,3 @@ IPPFUN( Ipp64u, ippcpGetCpuClocks, (void) )
561560
}
562561

563562
#endif /* _IPP_DATA */
564-
#endif /* !_IPP_DYNAMIC */

0 commit comments

Comments
 (0)