Browse Source

Fix fftw build for macos-old

Signed-off-by: falkTX <falktx@falktx.com>
tags/v1.0
falkTX 5 years ago
parent
commit
a7f82da4b6
Signed by: falkTX <falktx@falktx.com> GPG Key ID: CDBAA37ABC74FBA0
3 changed files with 31 additions and 7 deletions
  1. +23
    -3
      bootstrap.sh
  2. +6
    -2
      setup/env.sh
  3. +2
    -2
      setup/functions.sh

+ 23
- 3
bootstrap.sh View File

@@ -94,13 +94,33 @@ build_waf lv2 "${LV2_VERSION}" "--lv2dir=${PAWPAW_PREFIX}/lib/lv2"
# ---------------------------------------------------------------------------------------------------------------------
# fftw

FFTW_EXTRAFLAGS="--enable-sse2 --disable-debug --disable-alloca --disable-doc --disable-fortran --with-our-malloc"

# if [ "${WIN32}" -eq 0 ]; then
# FFTW_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-threads"
# fi

download fftw "${FFTW_VERSION}" "http://www.fftw.org"
build_autoconf fftw "${FFTW_VERSION}" "--enable-sse2 --disable-debug --disable-alloca --disable-fortran --with-our-malloc"

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftw "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftw "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftw "${FFTW_VERSION}" "${FFTW_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------
# fftwf

copy_download fftw fftwf "${FFTW_VERSION}"
build_autoconf fftwf "${FFTW_VERSION}" "--enable-single --enable-sse2 --disable-debug --disable-alloca --disable-fortran --with-our-malloc"
FFTWF_EXTRAFLAGS="${FFTW_EXTRAFLAGS} --enable-single"

copy_download fftw fftwf "${FFTW_VERSION}"

if [ "${MACOS_OLD}" -eq 1 ]; then
patch_file fftwf "${FFTW_VERSION}" "configure" 's/CFLAGS="$CFLAGS -Wl,-no_compact_unwind"/CFLAGS="$CFLAGS"/'
patch_file fftwf "${FFTW_VERSION}" "libbench2/timer.c" 's/#if defined(HAVE_GETTIMEOFDAY) && !defined(HAVE_TIMER)/#ifndef HAVE_TIMER/'
fi

build_autoconf fftwf "${FFTW_VERSION}" "${FFTWF_EXTRAFLAGS}"

# ---------------------------------------------------------------------------------------------------------------------

+ 6
- 2
setup/env.sh View File

@@ -50,6 +50,7 @@ BUILD_FLAGS="${BUILD_FLAGS} -fdata-sections -ffunction-sections -fno-common -fvi
if [ "${MACOS}" -eq 1 ]; then
if [ "${MACOS_OLD}" -eq 1 ]; then
BUILD_FLAGS="${BUILD_FLAGS} -mmacosx-version-min=10.5"
# BUILD_FLAGS="${BUILD_FLAGS} -I/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/include"
else
BUILD_FLAGS="${BUILD_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++ -Wno-deprecated-declarations"
fi
@@ -69,8 +70,11 @@ LINK_FLAGS="${LINK_FLAGS} -fdata-sections -ffunction-sections"

if [ "${MACOS}" -eq 1 ]; then
LINK_FLAGS="${LINK_FLAGS} -Wl,-dead_strip -Wl,-dead_strip_dylibs"
if [ "${MACOS_OLD}" -ne 1 ]; then
LINK_FLAGS="${LINK_FLAGS} -stdlib=libc++"
if [ "${MACOS_OLD}" -eq 1 ]; then
LINK_FLAGS="${LINK_FLAGS} -mmacosx-version-min=10.5"
# LINK_FLAGS="${LINK_FLAGS} -L/usr/lib/apple/SDKs/MacOSX10.5.sdk/usr/lib"
else
LINK_FLAGS="${LINK_FLAGS} -mmacosx-version-min=10.8 -stdlib=libc++"
fi
else
LINK_FLAGS="${LINK_FLAGS} -Wl,-O1 -Wl,--as-needed -Wl,--gc-sections -Wl,--no-undefined -Wl,--strip-all"


+ 2
- 2
setup/functions.sh View File

@@ -122,7 +122,7 @@ function build_autoconf() {

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}"
./configure --enable-static --disable-shared --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
touch .stamp_configured
popd
fi
@@ -335,7 +335,7 @@ function build_host_autoconf() {

if [ ! -f "${pkgdir}/.stamp_configured" ]; then
pushd "${pkgdir}"
./configure --enable-static --disable-shared --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
./configure --enable-static --disable-shared --disable-maintainer-mode --prefix="${PAWPAW_PREFIX}" ${extraconfrules}
touch .stamp_configured
popd
fi


Loading…
Cancel
Save