diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index 43a298b8be..209d25dccf 100644 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -92,8 +92,16 @@ case "`uname -s`" in # Only GNU and FreeBSD sed have the -i option (and redirecting # to the same file results in an empty file and starting a subshell # isn't as obvious as redirecting to a new file and replacing the old) - sed -e 's/ -ldl/ /g' build/gmake.unix/Premake4.make > build/gmake.unix/Premake4.make_new - mv build/gmake.unix/Premake4.make_new build/gmake.unix/Premake4.make + mv build/gmake.unix/Premake4.make build/gmake.unix/Premake4.make.bak + sed -e 's/ -ldl/ /g' build/gmake.unix/Premake4.make.bak > build/gmake.unix/Premake4.make + ;; + "Darwin" ) + # Remove the obsolete -s and the unused -rdynamic parameter and + # link with the CoreServices framework. + sed -e 's/^\([ ]*LDFLAGS[ ]*+=[ ]*\)\(\( [^ ]*\)*\) -s\(\( [^ ]*\)*\)$/\1\2\4/' \ + -e 's/^\([ ]*LDFLAGS[ ]*+=[ ]*\)\(\( [^ ]*\)*\) -rdynamic\(\( [^ ]*\)*\)$/\1\2\4/' \ + -e 's/^\([ ]*LIBS[ ]*+=[ ]*\)\(\( [^ ]*\)*\)$/\1\2 -framework CoreServices /' \ + -i.bak build/gmake.unix/Premake4.make ;; esac ${MAKE} -C build/gmake.unix ${JOBS} || die "Premake build failed"