Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
T
tarantool
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
core
tarantool
Commits
bf6dad33
Commit
bf6dad33
authored
9 years ago
by
Konstantin Osipov
Browse files
Options
Downloads
Plain Diff
Merge remote-tracking branch 'origin/786-fix_build_gcc49'
parents
8af99883
0f90b2d0
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
README.FreeBSD
+17
-28
17 additions, 28 deletions
README.FreeBSD
test/unit/arena_mt.c
+8
-0
8 additions, 0 deletions
test/unit/arena_mt.c
with
25 additions
and
28 deletions
README.FreeBSD
+
17
−
28
View file @
bf6dad33
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=gcc4
63
CXX=g++4
63
cmake . -DCMAKE_BUILD_TYPE=RelWithDebugInfo -D
ENABLE_CLIENT=true
CC=gcc4
9
CXX=g++4
9
cmake .
.
-DCMAKE_BUILD_TYPE=RelWithDebugInfo -D
CMAKE_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
This diff is collapsed.
Click to expand it.
test/unit/arena_mt.c
+
8
−
0
View file @
bf6dad33
...
...
@@ -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
++
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment