From 763f50c8c4609f9c3043df7d9d40eb4773989d18 Mon Sep 17 00:00:00 2001 From: Rene Ladan Date: Fri, 22 Oct 2010 23:50:58 +0000 Subject: [PATCH] - Try to fix build on ia64 by explicitly including sys/types.h before sys/systm.h - Try to fix build on powerpc by turning off altivec optimizations, which the system compiler does not support yet Obtained from: pointyhat error logs Suggested by: kwm --- astro/boinc-setiathome-enhanced/Makefile | 2 +- .../files/patch-client_Makefile.am | 23 +++++++++++++++- .../files/patch-client_vector_hires-timer.cpp | 10 +++++++ .../files/patch-m4_optimizations.m4 | 26 +++++++++++++++++++ 4 files changed, 59 insertions(+), 2 deletions(-) create mode 100644 astro/boinc-setiathome-enhanced/files/patch-client_vector_hires-timer.cpp create mode 100644 astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 diff --git a/astro/boinc-setiathome-enhanced/Makefile b/astro/boinc-setiathome-enhanced/Makefile index cdc5712139f0..a0ee49a69974 100644 --- a/astro/boinc-setiathome-enhanced/Makefile +++ b/astro/boinc-setiathome-enhanced/Makefile @@ -58,7 +58,7 @@ PLIST_SUB+= X11="@comment " .endif .if ${OSVERSION} >= 700042 && (${ARCH} == i386 || ${ARCH} == amd64) -CFLAGS+= -mtune=native +CFLAGS+= -mtune=native # comment out if world is built with clang and port with gcc .endif CXXFLAGS+= ${CFLAGS} diff --git a/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am b/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am index b135d3989600..1766d8707a39 100644 --- a/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am +++ b/astro/boinc-setiathome-enhanced/files/patch-client_Makefile.am @@ -1,5 +1,5 @@ --- client/Makefile.am.orig 2008-09-10 00:43:08.000000000 +0200 -+++ client/Makefile.am 2009-09-09 22:50:54.000000000 +0200 ++++ client/Makefile.am 2010-10-22 22:54:44.000000000 +0200 @@ -50,12 +50,7 @@ @@ -14,3 +14,24 @@ seti_boinc_SOURCES = \ main.cpp \ +@@ -158,15 +153,16 @@ + + if PPC + # allow use of altivec instructions on PPC ++# unfortunately our system gcc is too old, so disable altivec + seti_boinc-analyzeFuncs_altivec.o: vector/analyzeFuncs_altivec.cpp + if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \ +- -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" -faltivec \ ++ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) \ ++ -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + seti_boinc-analyzeFuncs_vector.o: vector/analyzeFuncs_vector.cpp + if $(CXX) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) \ +- $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) -DUSE_ALTIVEC \ ++ $(CPPFLAGS) $(seti_boinc_CXXFLAGS) $(CXXFLAGS) \ + -MT $@ -MD -MP -MF "$(DEPDIR)/$*.Tpo" \ + -c -o $@ $<; then mv -f "$(DEPDIR)/$*.Tpo" "$(DEPDIR)/$*.Po"; \ + else rm -f "$(DEPDIR)/$*.Tpo"; exit 1; fi + diff --git a/astro/boinc-setiathome-enhanced/files/patch-client_vector_hires-timer.cpp b/astro/boinc-setiathome-enhanced/files/patch-client_vector_hires-timer.cpp new file mode 100644 index 000000000000..c0fc40f88658 --- /dev/null +++ b/astro/boinc-setiathome-enhanced/files/patch-client_vector_hires-timer.cpp @@ -0,0 +1,10 @@ +--- client/vector/hires_timer.cpp.orig 2008-09-09 18:55:19.000000000 +0200 ++++ client/vector/hires_timer.cpp 2010-10-23 00:05:28.000000000 +0200 +@@ -56,6 +56,7 @@ + #include + #endif + #ifdef HAVE_SYS_SYSTM_H ++#include + #include + #endif + #ifdef HAVE_MACHINE_CPU_H diff --git a/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 b/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 new file mode 100644 index 000000000000..ba5e1ad13057 --- /dev/null +++ b/astro/boinc-setiathome-enhanced/files/patch-m4_optimizations.m4 @@ -0,0 +1,26 @@ +--- m4/optimizations.m4.orig 2008-09-10 01:46:12.000000000 +0200 ++++ m4/optimizations.m4 2010-10-22 23:30:38.000000000 +0200 +@@ -98,15 +98,15 @@ + + if test x_$enable_altivec = x_yes ; then + AC_DEFINE_UNQUOTED([USE_ALTIVEC],[1], +- [Define to 1 if you want to use ALTIVEC optimizations]) ++ [Define to 1 if you want to use ALTIVEC optimizations, disabled in this port]) + # put compiler specific flags here +- if test x_$ac_cv_c_compiler_gnu = x_yes ; then +- SAH_CHECK_CFLAG([-faltivec],[CFLAGS="-faltivec ${CFLAGS}"]) +- SAH_CHECK_CFLAG([-maltivec],[CFLAGS="-maltivec ${CFLAGS}"]) +- SAH_CHECK_CFLAG([-mtune=G5],[CFLAGS="-mtune=G5 ${CFLAGS}"]) +- SAH_CHECK_CFLAG([-mcpu=powerpc],[CFLAGS="-mcpu=powerpc ${CFLAGS}"]) +- SAH_CHECK_LDFLAG([-framework Accelerate],[LDFLAGS="${LDFLAGS} -framework Accelerate"]) +- fi ++# if test x_$ac_cv_c_compiler_gnu = x_yes ; then ++# SAH_CHECK_CFLAG([-faltivec],[CFLAGS="-faltivec ${CFLAGS}"]) ++# SAH_CHECK_CFLAG([-maltivec],[CFLAGS="-maltivec ${CFLAGS}"]) ++# SAH_CHECK_CFLAG([-mtune=G5],[CFLAGS="-mtune=G5 ${CFLAGS}"]) ++# SAH_CHECK_CFLAG([-mcpu=powerpc],[CFLAGS="-mcpu=powerpc ${CFLAGS}"]) ++# SAH_CHECK_LDFLAG([-framework Accelerate],[LDFLAGS="${LDFLAGS} -framework Accelerate"]) ++# fi + fi + + fi