Skip to content
Snippets Groups Projects
Commit bf6dad33 authored by Konstantin Osipov's avatar Konstantin Osipov
Browse files

Merge remote-tracking branch 'origin/786-fix_build_gcc49'

parents 8af99883 0f90b2d0
No related branches found
No related tags found
No related merge requests found
Target OS: FreeBSD 8.3 (RELEASE)
Target OS: FreeBSD 10.1 (RELEASE)
1. Install necessary packages:
-------------
pkg_add -r sudo git cmake gmake libbfd
pkg_add -r python27
pkg install sudo git cmake gmake gcc49 readline
2. Install gcc 4.6.x and gcc infrastructure pre-requisites
-------------
(x) From one of the gcc mirrors download from /gcc/infrastructure: gmp, mpfr and mpc packages;
(x) Configure and build the pre-requisites using --prefix=/usr/local and --with-gmp=/usr/local (see gcc.gnu.org/install);
(x) Configure gcc as:
configure --prefix=/usr/local --enable-languages=c,c++,objc --program-suffix=463 --enable-shared --enable-threads=posix --with-mpc=/usr/local
(x) Build gcc as per steps outlined in GCC documentation gcc.gnu.org/install;
(x) Set up the environment to include the new GCC's libs: export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib
3. Install necessary python modules:
-------------
cd /usr/ports/devel/py-yaml
sudo make install
cd /usr/ports/devel/py-daemon
sudo make install
4. Download & build tarantool source code:
2. Download & build tarantool source code:
-------------
git clone git://github.com/tarantool/tarantool.git
cd tarantool
mkdir build && cd build
git submodule update --init
CC=gcc463 CXX=g++463 cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DENABLE_CLIENT=true
CC=gcc49 CXX=g++49 cmake .. -DCMAKE_BUILD_TYPE=RelWithDebugInfo -DCMAKE_C_FLAGS="-Wl,-rpath=/usr/local/lib/gcc49" -DCMAKE_CXX_FLAGS="-Wl,-rpath=/usr/local/lib/gcc49"
gmake
5. Set up python 2.6 to run tarantool tests
3. Set up python 2.7
-------------
mkdir ~/build/bin && ln -s /usr/bin/python26 ~/build/bin/python
From packages:
pkg install python27 py27-yaml py27-daemon py27-msgpack
6. Run tarantool test suite
-------------
From pip:
pkg install py27-virtualenv
virtualenv .venv
source .venv/bin/activate
pip install -r ../test-run/requirements.txt
cd ~/build/tarantool/test
PATH=~/build/bin:$PATH ./run
4. Run tarantool test suite
-------------
gmake test
-- EOF
......@@ -5,7 +5,11 @@
#include <stdlib.h>
#include <time.h>
#include "unit.h"
#include <trivia/util.h>
#include <pthread.h>
#ifdef TARGET_OS_FREEBSD
#include <pthread_np.h>
#endif
struct slab_arena arena;
struct quota quota;
......@@ -18,7 +22,11 @@ int FILL = SLAB_MIN_SIZE/sizeof(pthread_t);
void *
run(void *p __attribute__((unused)))
{
#ifdef TARGET_OS_FREEBSD
unsigned int seed = pthread_getthreadid_np();
#else
unsigned int seed = (unsigned int) pthread_self();
#endif
int iterations = rand_r(&seed) % ITERATIONS;
pthread_t **slabs = slab_map(&arena);
for (int i = 0; i < iterations; i++) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment