From 5018cbbafcfe377537d55c690ef0d4e371da047d Mon Sep 17 00:00:00 2001 From: Lorenz Schori Date: Wed, 18 Nov 2009 20:08:46 +0100 Subject: [PATCH] OSX: build with gcc 4.0 when building against 10.4 SDK --- bacula/platforms/osx/Makefile.in | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) 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" -- 2.39.5