Fat build and new libc

This commit is contained in:
Lubos Dolezel 2017-01-28 00:25:05 +01:00
parent 2b46e68475
commit cf7fabfce1
2 changed files with 6 additions and 19 deletions

View File

@ -33,14 +33,14 @@ set(zlib_sources
zutil.c
)
if (BITS EQUAL 64)
set(zlib_sources ${zlib_sources} contrib/amd64/amd64-match.S)
else(BITS EQUAL 64)
set(zlib_sources ${zlib_sources} contrib/asm686/match.S)
endif(BITS EQUAL 64)
add_library(z64 OBJECT contrib/amd64/amd64-match.S)
set_target_properties(z64 PROPERTIES COMPILE_FLAGS "-arch x86_64")
add_library(z32 OBJECT contrib/asm686/match.S)
set_target_properties(z32 PROPERTIES COMPILE_FLAGS "-arch i386")
set(DYLIB_INSTALL_NAME "/usr/lib/libz.1.dylib")
add_darling_library(z SHARED ${zlib_sources})
add_darling_library(z SHARED ${zlib_sources} $<TARGET_OBJECTS:z64> $<TARGET_OBJECTS:z32>)
make_fat(z)
target_link_libraries(z system)
set_target_properties(z PROPERTIES LINKER_LANGUAGE C OUTPUT_NAME "z.1")

13
zutil.h
View File

@ -118,19 +118,6 @@ extern z_const char * const z_errmsg[10]; /* indexed by 2-zlib_error */
# endif
#endif
#if defined(MACOS) || defined(TARGET_OS_MAC)
# define OS_CODE 0x07
# ifndef Z_SOLO
# if defined(__MWERKS__) && __dest_os != __be_os && __dest_os != __win32_os
# include <unix.h> /* for fdopen */
# else
# ifndef fdopen
# define fdopen(fd,mode) NULL /* No fdopen() */
# endif
# endif
# endif
#endif
#ifdef TOPS20
# define OS_CODE 0x0a
#endif