diff -r 32f77d3e2d12 SPKG.txt
a
|
b
|
|
24 | 24 | |
25 | 25 | == Changelog == |
26 | 26 | |
| 27 | === cliquer-1.2.p8 (Jeroen Demeyer, 25 April 2011) === |
| 28 | * #11227: When compiling with gcc 4.6.0, add compiler flag -fno-ivopts |
| 29 | to work around a gcc bug. |
| 30 | * Use `patch` for patching the Makefile and put patches/Makefile.patch |
| 31 | under hg control. |
| 32 | * Some minor cleanup of spkg-install and Makefile. |
| 33 | |
27 | 34 | === cliquer-1.2.p7 David Kirkby, Leif Leonhardy (14 September 2010) === |
28 | 35 | * #9871 Change flags passed to the linker on Solaris to avoid problems with the |
29 | 36 | link-editor believing the shared library contains text relocations. This |
diff -r 32f77d3e2d12 patches/Makefile.patch
-
|
+
|
|
| 1 | diff -ur src/Makefile src.patched/Makefile |
| 2 | --- src/Makefile 2010-02-16 05:26:57.000000000 +0100 |
| 3 | +++ src.patched/Makefile 2011-04-26 09:46:41.000000000 +0200 |
| 4 | @@ -1,14 +1,17 @@ |
| 5 | |
| 6 | ##### Configurable options: |
| 7 | |
| 8 | +# Don't need to set any of these compiler variables. They have already been |
| 9 | +# set when running SAGE_ROOT/local/bin/sage-env as part of installing a |
| 10 | +# package. |
| 11 | ## Compiler: |
| 12 | -CC=gcc |
| 13 | +#CC=gcc |
| 14 | #CC=cc |
| 15 | |
| 16 | ## Compiler flags: |
| 17 | |
| 18 | # GCC: (also -march=pentium etc, for machine-dependent optimizing) |
| 19 | -CFLAGS=-Wall -O3 -fomit-frame-pointer -funroll-loops |
| 20 | +#CFLAGS=-Wall -O3 -fomit-frame-pointer -funroll-loops |
| 21 | |
| 22 | # GCC w/ debugging: |
| 23 | #CFLAGS=-Wall -g -DINLINE= |
| 24 | @@ -29,14 +32,14 @@ |
| 25 | ##### End of configurable options |
| 26 | |
| 27 | |
| 28 | -all: cl |
| 29 | +all: libcliquer.so |
| 30 | |
| 31 | |
| 32 | testcases: testcases.o cliquer.o graph.o reorder.o |
| 33 | $(CC) $(LDFLAGS) -o $@ testcases.o cliquer.o graph.o reorder.o |
| 34 | |
| 35 | -cl: cl.o cliquer.o graph.o reorder.o |
| 36 | - $(CC) $(LDFLAGS) -o $@ cl.o cliquer.o graph.o reorder.o |
| 37 | +libcliquer.so: cl.o cliquer.o graph.o reorder.o |
| 38 | + $(CC) $(LDFLAGS) $(SAGESOFLAGS) -o $@ cl.o cliquer.o graph.o reorder.o |
| 39 | |
| 40 | |
| 41 | cl.o testcases.o cliquer.o graph.o reorder.o: cliquer.h set.h graph.h misc.h reorder.h Makefile cliquerconf.h |
diff -r 32f77d3e2d12 spkg-install
a
|
b
|
|
12 | 12 | |
13 | 13 | # Add a sensible default optimisation flag. Change if necessary. |
14 | 14 | OPTIMIZATION_FLAGS="-O2" |
| 15 | # Work around a bug in gcc 4.6.0, probably http://gcc.gnu.org/bugzilla/show_bug.cgi?id=48702 |
| 16 | if [ "x`$SAGE_LOCAL/bin/testcc.sh $CC`" = xGCC ] && [ "x`$CC -dumpversion 2>/dev/null`" = x4.6.0 ] ; then |
| 17 | echo "Warning: Working around bug in gcc 4.6.0" |
| 18 | OPTIMIZATION_FLAGS="$OPTIMIZATION_FLAGS -fno-ivopts" |
| 19 | fi |
15 | 20 | |
16 | 21 | # Most packages do not need all these set. But it is better to do them all |
17 | 22 | # each time, rather than omit a flag by mistake. |
… |
… |
|
148 | 153 | SAGESOFLAGS=" " |
149 | 154 | if [ "$UNAME" = "Linux" ] || [ "$UNAME" = "FreeBSD" ]; then |
150 | 155 | SAGESOFLAGS="-shared -Wl,-soname,libcliquer.so" |
151 | | export SAGESOFLAGS |
152 | 156 | elif [ "$UNAME" = "Darwin" ]; then |
153 | 157 | MACOSX_DEPLOYMENT_TARGET="10.3" |
154 | 158 | export MACOSX_DEPLOYMENT_TARGET |
155 | 159 | SAGESOFLAGS="-dynamiclib -single_module -flat_namespace -undefined dynamic_lookup" |
156 | | export SAGESOFLAGS |
157 | 160 | elif [ "$UNAME" = "SunOS" ]; then |
158 | 161 | SAGESOFLAGS="-shared -Wl,-h,libcliquer.so -Wl,-ztext" |
159 | | export SAGESOFLAGS |
160 | 162 | elif [ "$UNAME" = "CYGWIN" ]; then |
161 | 163 | SAGESOFLAGS="-shared -Wl,-soname,libcliquer.so" |
162 | | export SAGESOFLAGS |
163 | 164 | else |
164 | 165 | echo "Cannot determine your platform or it is not supported" |
165 | 166 | echo "Since SAGE_PORT is set, setting SAGESOFLAGS to Linux defaults." |
166 | 167 | SAGESOFLAGS="-shared -Wl,-soname,libcliquer.so" |
167 | | export SAGESOFLAGS |
168 | 168 | fi |
| 169 | export SAGESOFLAGS |
169 | 170 | |
170 | | # Copy over custom Makefile for Sage. This custom Makefile contains Sage |
| 171 | cd src |
| 172 | |
| 173 | # Patch the Makefile for Sage. This custom Makefile contains Sage |
171 | 174 | # specific compilation and linking flags. More importantly, we're building |
172 | 175 | # cliquer as a dynamic shared library, instead of a stand alone program. |
173 | | cp -f patch/Makefile src/ |
174 | | |
175 | | cd src |
| 176 | patch -p1 <../patches/Makefile.patch |
176 | 177 | |
177 | 178 | #Do not exit script if there is an error, but instead print an |
178 | 179 | # informative error message. |