| diff --git CMakeLists.txt CMakeLists.txt |
| index cb4ba80..9a106e5 100644 |
| --- CMakeLists.txt |
| +++ CMakeLists.txt |
| @@ -170,7 +170,7 @@ if (CMAKE_COMPILER_IS_GNUCC AND NOT CROSS_COMPILE) |
| |
| # arg1 might exist if using ccache |
| string (STRIP "${CMAKE_C_COMPILER_ARG1}" CC_ARG1) |
| - set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -${ARCH_FLAG}=native -mtune=native) |
| + set (EXEC_ARGS ${CC_ARG1} -c -Q --help=target -mtune=native) |
| execute_process(COMMAND ${CMAKE_C_COMPILER} ${EXEC_ARGS} |
| OUTPUT_VARIABLE _GCC_OUTPUT) |
| string(FIND "${_GCC_OUTPUT}" "${ARCH_FLAG}" POS) |
| diff --git cmake/build_wrapper.sh cmake/build_wrapper.sh |
| index 895610c..becfbf4 100755 |
| --- cmake/build_wrapper.sh |
| +++ cmake/build_wrapper.sh |
| @@ -17,11 +17,11 @@ KEEPSYMS=$(mktemp -p /tmp keep.syms.XXXXX) |
| LIBC_SO=$("$@" --print-file-name=libc.so.6) |
| cp ${KEEPSYMS_IN} ${KEEPSYMS} |
| # get all symbols from libc and turn them into patterns |
| -nm -f p -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS} |
| +nm -f posix -g -D ${LIBC_SO} | sed -s 's/\([^ @]*\).*/^\1$/' >> ${KEEPSYMS} |
| # build the object |
| "$@" |
| # rename the symbols in the object |
| -nm -f p -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE} |
| +nm -f posix -g ${OUT} | cut -f1 -d' ' | grep -v -f ${KEEPSYMS} | sed -e "s/\(.*\)/\1\ ${PREFIX}_\1/" >> ${SYMSFILE} |
| if test -s ${SYMSFILE} |
| then |
| objcopy --redefine-syms=${SYMSFILE} ${OUT} |