Skip to content

Commit

Permalink
Do not hardcode -march=native for asgl, but obey CXXFLAGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
kisp committed Oct 2, 2015
1 parent e0fe201 commit 1441572
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 7 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Makefile
lisp-scripts/compile-foo.lisp
tmp
bin/asgl
gecode
Expand Down
11 changes: 6 additions & 5 deletions Makefile → Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,10 @@ v1/v1: v1/v1.o v1/Foo.o v1/PrBABSpace.o common/early/libearly.a common/asgl-conf
-eval '(quit)'

v1/Foo.o: v1/Foo.cpp v1/Foo.h asgl_config.h
g++ -march=core2 -O3 -Wall -Werror -fPIC -c v1/Foo.cpp -o v1/Foo.o
g++ -O3 -Wall -Werror -fPIC @CXXFLAGS@ -c v1/Foo.cpp -o v1/Foo.o

v1/PrBABSpace.o: v1/PrBABSpace.cpp v1/PrBABSpace.h v1/Foo.h asgl_config.h
g++ -march=core2 -O3 -Wall -Werror -fPIC -c v1/PrBABSpace.cpp -o v1/PrBABSpace.o
g++ -O3 -Wall -Werror -fPIC @CXXFLAGS@ -c v1/PrBABSpace.cpp -o v1/PrBABSpace.o

install-v1: v1/v1
cp v1/v1 bin/asgl
Expand All @@ -89,13 +89,13 @@ common/early/libmyfoo.a: common/early/myfoo.o common/early/slurp.o \
common/early/count_args.o

common/early/myfoo.o: common/early/myfoo.cpp common/early/myfoo.h
g++ -march=core2 -O3 -Wall -Werror -fPIC -c common/early/myfoo.cpp -o common/early/myfoo.o
g++ -O3 -Wall -Werror -fPIC @CXXFLAGS@ -c common/early/myfoo.cpp -o common/early/myfoo.o

common/early/slurp.o: common/early/slurp.cpp common/early/myfoo.h
g++ -march=core2 -O3 -Wall -Werror -fPIC -c common/early/slurp.cpp -o common/early/slurp.o
g++ -O3 -Wall -Werror -fPIC @CXXFLAGS@ -c common/early/slurp.cpp -o common/early/slurp.o

common/early/count_args.o: common/early/count_args.cpp common/early/myfoo.h
g++ -march=core2 -O3 -Wall -Werror -fPIC -c common/early/count_args.cpp -o common/early/count_args.o
g++ -O3 -Wall -Werror -fPIC @CXXFLAGS@ -c common/early/count_args.cpp -o common/early/count_args.o


# gecode
Expand Down Expand Up @@ -142,6 +142,7 @@ clean: lib/arnesi-list-match/clean lib/alexandria/clean lib/myam/clean \
rm -f asgl_config.h config.log config.status configure
rm -rf autom4te.cache
rm -f ecl-13.5.1.tgz gecode-4.3.3.tar.gz
rm -f Makefile lisp-scripts/compile-foo.lisp
if [ -n "`git clean -nxd`" ]; then git clean -nxd; exit 1; fi

# dist
Expand Down
4 changes: 4 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -55,4 +55,8 @@ cp confdefs.h asgl_config.h

AC_LANG_POP


AC_CONFIG_FILES([Makefile])
AC_CONFIG_FILES([lisp-scripts/compile-foo.lisp])

AC_OUTPUT
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
(load "lisp-scripts/compile-file-system-p.lisp")

(let ((c::*ld-bundle-flags*
(format nil "~A -L~A -lfoo -lgecodesearch -lgecodeint -lgecodeset -lgecodeminimodel -lgecodekernel -lgecodesupport -lgecodegist -march=core2 -O3"
(format nil "~A -L~A -lfoo -lgecodesearch -lgecodeint -lgecodeset -lgecodeminimodel -lgecodekernel -lgecodesupport -lgecodegist -O3 @CXXFLAGS@"
c::*ld-bundle-flags*
*default-pathname-defaults*)))
(compile-file-system-p "v1/v1.lisp"))
Expand Down
4 changes: 4 additions & 0 deletions scripts/clean.sh
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,8 @@ set -e

bash scripts/generate-make-mk.sh

autoconf

./configure

make clean
3 changes: 2 additions & 1 deletion support/build
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,8 @@ fi

echo BEGIN BUILDING ASGL
export ASGL_HOME_PREC=`pwd`
./configure --without-gist
ASGLFLAGS="-O3 -march=native -pipe -fomit-frame-pointer"
env CFLAGS="$ASGLFLAGS" CXXFLAGS="$ASGLFLAGS" ./configure --without-gist
make LD_LIBRARY_PATH=`pwd`/local/lib install-v1
mv bin/asgl bin/asgl_kernel
echo '#!/bin/bash' >bin/asgl
Expand Down

0 comments on commit 1441572

Please sign in to comment.