Using jemalloc
This commit is contained in:
+1
-1
Submodule libraries/CXXTerminal updated: e2d8def235...d44e435f1e
+3
-1
@@ -17,7 +17,8 @@ mkdir -p \
|
||||
tomcrypt/build \
|
||||
tommath/build \
|
||||
yaml-cpp/build \
|
||||
protobuf/build
|
||||
protobuf/build \
|
||||
jemalloc/build
|
||||
|
||||
function exec_script {
|
||||
echo "Executing ${1}"
|
||||
@@ -43,3 +44,4 @@ exec_script build_stringvariable.sh
|
||||
exec_script build_threadpool.sh
|
||||
exec_script build_tom.sh
|
||||
exec_script build_yaml.sh
|
||||
exec_script build_jemalloc.sh
|
||||
|
||||
Executable
+38
@@ -0,0 +1,38 @@
|
||||
#!/bin/bash
|
||||
|
||||
cd jemalloc/
|
||||
|
||||
if ! [ -f configure ]; then
|
||||
autoconf
|
||||
if [ $? -ne 0 || ! -f configure ]; then
|
||||
echo "Failed to create configure file"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
|
||||
cd build
|
||||
../configure
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to create makefile"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
(cat Makefile | sed 's/.*$(CC) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS).*/ $(CXX) $(DSO_LDFLAGS) $(call RPATH,$(RPATH_EXTRA)) $(LDTARGET) $+ $(LDFLAGS) $(LIBS) $(EXTRA_LDFLAGS)/') > tmp
|
||||
rm Makefile
|
||||
mv tmp Makefile
|
||||
make -j 12 LIBS="-pthread -static-libgcc -static-libstdc++ -fPIC" CFLAGS="-static-libgcc -static-libstdc++ -fPIC" CXXFLAGS="-static-libgcc -static-libstdc++ -fPIC"
|
||||
#make -j 12 LIBS="-pthread -static-libgcc -static-libstdc++" CFLAGS="-fPIC" CXXFLAGS="-fPIC"
|
||||
#make -j 12 LIBS="-pthread -lm -l/usr/lib/gcc/x86_64-linux-gnu/5/libstdc++.a" ${MAKE_OPTIONS} CFLAGS="-shared -static-libstdc++ -static-libgcc -fPIC" CXXFLAGS="-static-libstdc++ -static-libgcc -shared -fPIC"
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "Failed to build jemalloc"
|
||||
exit 1
|
||||
fi
|
||||
sudo make install &>/dev/null
|
||||
if [ $? -ne 0 ]; then #Workaround because the install fails
|
||||
exit 0
|
||||
fi
|
||||
|
||||
|
||||
|
||||
|
||||
make -j 12 LIBS="-pthread -static-libgcc -static-libstdc++" CFLAGS="-fPIC" CXXFLAGS="-fPIC"
|
||||
Submodule
+1
Submodule libraries/jemalloc added at 4c548a61c8
Reference in New Issue
Block a user