From: Lorenz Schori Date: Wed, 18 Nov 2009 19:08:46 +0000 (+0100) Subject: OSX: build with gcc 4.0 when building against 10.4 SDK X-Git-Tag: Release-7.0.0~2558 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=f3e828ea194321084718bfd2c66f7d51bbb0f62d;p=bacula%2Fbacula OSX: build with gcc 4.0 when building against 10.4 SDK --- diff --git a/bacula/platforms/osx/Makefile.in b/bacula/platforms/osx/Makefile.in index 12cf18d492..5a7da4ae18 100644 --- a/bacula/platforms/osx/Makefile.in +++ b/bacula/platforms/osx/Makefile.in @@ -66,7 +66,14 @@ CONFIGFLAGS:=--enable-client-only --prefix=${BACULA_PREFIX} \ CPPFLAGS:=-isysroot ${MACOSX_SDK_SYSROOT} ${MACOSX_VERSION_FLAGS} CFLAGS:=-O -g ${ARCHFLAGS} CXXFLAGS:=${CFLAGS} -LDFLAGS:=${MACOSX_VERSION_FLAGS} ${ARCHFLAGS} +LDFLAGS:=-Wl,-syslibroot,${MACOSX_SDK_SYSROOT} ${MACOSX_VERSION_FLAGS} ${ARCHFLAGS} + +# required on snow leopard: compiling for 10.4 requires usage of gcc 4.0 +# system defaults to version 4.2 +CC:=gcc-4.0 +CPP:=cpp-4.0 +CXX:=g++-4.0 +CXXPP:=cpp-4.0 # Placeholders for *.in files INFILE_SUBST=\ @@ -97,7 +104,7 @@ ${BACULA_PMDOC}: ${BACULA_DESTDIR} ${WORKING_DIR}/resources files/installer.pmdoc.in/$$f > "${BACULA_PMDOC}/$$f"; \ done - python installer-gencontents.py destdir > ${BACULA_PMDOC}/01destdir-contents.xml + python installer-gencontents.py ${BACULA_DESTDIR} > ${BACULA_PMDOC}/01destdir-contents.xml ${WORKING_DIR}/resources: ${BACULA_DESTDIR} mkdir -p "${WORKING_DIR}/resources" @@ -114,8 +121,8 @@ ${WORKING_DIR}/resources: ${BACULA_DESTDIR} cp "${BACULA_SOURCE}/LICENSE" "${WORKING_DIR}/resources/License.txt" ${BACULA_DESTDIR}: ${BACULA_SOURCE} - (cd ${BACULA_SOURCE} && ./configure ${CONFIGFLAGS} CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}") - ${MAKE} -C ${BACULA_SOURCE} LDFLAGS="-Wl,-syslibroot,${MACOSX_SDK_SYSROOT} ${LDFLAGS}" + (cd ${BACULA_SOURCE} && ./configure ${CONFIGFLAGS} CPPFLAGS="${CPPFLAGS}" CFLAGS="${CFLAGS}" CXXFLAGS="${CXXFLAGS}" LDFLAGS="${LDFLAGS}" CC="${CC}" CPP="${CPP}" CXX="${CXX}" CXXPP="${CXXPP}") + ${MAKE} -C ${BACULA_SOURCE} ${MAKE} -C ${BACULA_SOURCE} install DESTDIR="${CURDIR}/${BACULA_DESTDIR}" rm -rf "${BACULA_DESTDIR}/tmp"