this repo has no description
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix mig to produce output as on macOS (alignment / natural_t size problem)

+12 -8
+2 -2
cmake/mig.cmake
··· 39 39 # set (MIG_ARCH "${arch}") 40 40 #endif(NOT arch) 41 41 if (NOT MIG_ARCH) 42 - set(MIG_ARCH "x86-64") 42 + set(MIG_ARCH "i386") 43 43 endif (NOT MIG_ARCH) 44 44 45 45 add_custom_command(OUTPUT ··· 58 58 ${MIG_FLAGS} 59 59 ${CMAKE_CURRENT_SOURCE_DIR}/${defFileName} 60 60 DEPENDS 61 - migcom 61 + migexe 62 62 ) 63 63 endfunction(mig)
+7 -4
src/bootstrap_cmds/CMakeLists.txt
··· 6 6 find_package(FLEX) 7 7 8 8 set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -std=c99") 9 - add_definitions(-Du_int=unsigned -D__int64_t=int64_t -D__int32_t=int32_t -D__darwin_natural_t=long -D__uint32_t=uint32_t -D__uint16_t=uint16_t -D__uint64_t=uint64_t -D_BSD_I386__TYPES_H_) 9 + add_definitions(-Du_int=unsigned -D__int64_t=int64_t -D__int32_t=int32_t -D__darwin_natural_t=unsigned -D__uint32_t=uint32_t -D__uint16_t=uint16_t -D__uint64_t=uint64_t -D_BSD_I386__TYPES_H_) 10 10 add_definitions('-DMIG_VERSION="1.0"') 11 11 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include) 12 12 include_directories(${CMAKE_CURRENT_SOURCE_DIR}/include/mach) ··· 39 39 add_executable(migcom ${mig_sources}) 40 40 41 41 add_custom_command( 42 - TARGET migcom 43 - POST_BUILD 42 + #TARGET migcom 43 + #POST_BUILD 44 44 #DEPENDS migcom 45 - #OUTPUT "${CMAKE_BINARY_DIR}/mig" 45 + OUTPUT "${CMAKE_BINARY_DIR}/mig" 46 46 COMMAND 47 47 awk -v "migcc=${CMAKE_C_COMPILER}" 48 48 -v "migcom=${CMAKE_CURRENT_BINARY_DIR}/migcom" ··· 50 50 "${CMAKE_CURRENT_SOURCE_DIR}/migcom.tproj/mig.sh" ">${CMAKE_BINARY_DIR}/mig" 51 51 && chmod 0755 "${CMAKE_BINARY_DIR}/mig" 52 52 ) 53 + add_custom_target(migexe DEPENDS "${CMAKE_BINARY_DIR}/mig") 54 + 55 + add_dependencies(migexe migcom) 53 56 54 57
+1 -1
src/bootstrap_cmds/migcom.tproj/mig.sh
··· 162 162 fi 163 163 rm -f "${temp}.c" "${temp}.d" 164 164 (echo '#line 1 '\"${file}\" ; cat "${file}" ) > "${temp}.c" 165 - "$C" -E -arch ${arch} "${cppflags[@]}" -I "${sourcedir}" "${iSysRootParm[@]}" "${temp}.c" | "$M" "${migflags[@]}" 165 + "$C" -E -target ${arch} "${cppflags[@]}" -I "${sourcedir}" "${iSysRootParm[@]}" "${temp}.c" | "$M" "${migflags[@]}" 166 166 if [ $? -ne 0 ] 167 167 then 168 168 rm -rf "${temp}.c" "${temp}.d" "${WORKTMP}"
+2 -1
src/bootstrap_cmds/migcom.tproj/type.c
··· 734 734 } 735 735 else 736 736 error("init_type unknown size %d", size); 737 + printf("Integer size is %d\n", size); 737 738 738 739 machine_integer_bits = size; 739 740 ··· 882 883 !it->itInLine || 883 884 !it->itStruct || 884 885 it->itVarArray) 885 - error("argument %s isn't a proper integer", name); 886 + error("argument %s isn't a proper integer, size=%d", name, it->itSize); 886 887 } 887 888 888 889 void