Skip to content

Commit

Permalink
Update sljit to add aarch64 compat
Browse files Browse the repository at this point in the history
Signed-off-by: Christophe Fontaine <[email protected]>

Add aarch64 support

For aarch64, use flag "evtstrm" to check which version to use

Signed-off-by: Christophe Fontaine <[email protected]>

Add arch specific version of libzmq

- add aarch64 version of libzmq
- move zmq to zmq-$ARCH
- edit scripts to use './external_libs/pyzmq-14.5.0/python*/[intel|arm]/ucs*/[32|64]bits/zmq'

Signed-off-by: Christophe Fontaine <[email protected]>

os/time.h - Add aarch64 version for platform_time_get_highres_tick_64

Signed-off-by: Christophe Fontaine <[email protected]>

arm: fix release script

Signed-off-by: Hanoh Haim <[email protected]>

arm: fix typo

Signed-off-by: Hanoh Haim <[email protected]>

fix ZMQ paths in several places
revert vdev in trex-cfg

Revert "Update sljit to add aarch64 compat"

This reverts commit fa19568.

arm: revert the ws_main.py for BPF

Signed-off-by: Hanoh Haim <[email protected]>

arm: some cleanups

Signed-off-by: Hanoh Haim <[email protected]>

arm: cleanup cisco-system-traffic-generator#2

Signed-off-by: Hanoh Haim <[email protected]>

add vxnet3 missing files

Signed-off-by: Hanoh Haim <[email protected]>
  • Loading branch information
Christophe Fontaine authored and hhaim committed Feb 22, 2018
1 parent 8f5f965 commit 8502230
Show file tree
Hide file tree
Showing 893 changed files with 119,005 additions and 319 deletions.
402 changes: 402 additions & 0 deletions external_libs/zmq-aarch64/include/zmq.h

Large diffs are not rendered by default.

64 changes: 64 additions & 0 deletions external_libs/zmq-aarch64/include/zmq_utils.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,64 @@
/*
Copyright (c) 2009-2011 250bpm s.r.o.
Copyright (c) 2007-2011 Other contributors as noted in the AUTHORS file
This file is part of 0MQ.
0MQ is free software; you can redistribute it and/or modify it under
the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.
0MQ is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef __ZMQ_UTILS_H_INCLUDED__
#define __ZMQ_UTILS_H_INCLUDED__

#ifdef __cplusplus
extern "C" {
#endif

/* Handle DSO symbol visibility */
#if defined _WIN32
# if defined DLL_EXPORT
# define ZMQ_EXPORT __declspec(dllexport)
# else
# define ZMQ_EXPORT __declspec(dllimport)
# endif
#else
# if defined __SUNPRO_C || defined __SUNPRO_CC
# define ZMQ_EXPORT __global
# elif (defined __GNUC__ && __GNUC__ >= 4) || defined __INTEL_COMPILER
# define ZMQ_EXPORT __attribute__ ((visibility("default")))
# else
# define ZMQ_EXPORT
# endif
#endif

/* Helper functions are used by perf tests so that they don't have to care */
/* about minutiae of time-related functions on different OS platforms. */

/* Starts the stopwatch. Returns the handle to the watch. */
ZMQ_EXPORT void *zmq_stopwatch_start (void);

/* Stops the stopwatch. Returns the number of microseconds elapsed since */
/* the stopwatch was started. */
ZMQ_EXPORT unsigned long zmq_stopwatch_stop (void *watch_);

/* Sleeps for specified number of seconds. */
ZMQ_EXPORT void zmq_sleep (int seconds_);

#undef ZMQ_EXPORT

#ifdef __cplusplus
}
#endif

#endif
File renamed without changes.
Binary file added external_libs/zmq-aarch64/lib/libzmq.so.3
Binary file not shown.
Binary file added external_libs/zmq-aarch64/lib/libzmq.so.3.0.0
Binary file not shown.
1 change: 1 addition & 0 deletions external_libs/zmq-aarch64/libzmq.so
1 change: 1 addition & 0 deletions external_libs/zmq-aarch64/libzmq.so.3
Binary file added external_libs/zmq-aarch64/libzmq.so.3.0.0
Binary file not shown.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
43 changes: 28 additions & 15 deletions linux/ws_main.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
top = '../'
out = 'build'
b_path ="./build/linux/"
march = os.uname()[4]

REQUIRED_CC_VERSION = "4.7.0"
SANITIZE_CC_VERSION = "4.9.0"
Expand Down Expand Up @@ -429,7 +430,7 @@ def configure_sanitized (conf):
../src/stx/common/rx/
../external_libs/json/
../external_libs/zmq/include/
../external_libs/zmq-'''+ march +'''/include/
../external_libs/yaml-cpp/include/
../external_libs/bpf/
''';
Expand All @@ -442,13 +443,16 @@ def configure_sanitized (conf):
DEBUG_ = "debug"
PLATFORM_64 = "64"
PLATFORM_32 = "32"
PLATFORM_x86 = "x86"
PLATFORM_x86_64 = "x86_64"
PLATFORM_aarch64 = "aarch64"


class build_option:

def __init__(self, name, src, platform, debug_mode, is_pie, use = [], flags = [], rpath = []):
def __init__(self, name, src, debug_mode, is_pie, use = [], flags = [], rpath = []):
self.mode = debug_mode; ##debug,release
self.platform = platform; #['32','64']
self.platform = march # aarch64 or x86_64
self.is_pie = is_pie
self.name = name
self.src = src
Expand All @@ -473,8 +477,14 @@ def toLib (self,name,full_path = True):
def toExe(self,name,full_path = True):
return (self.lib_name(name,full_path));

def isIntelPlatform (self):
return ( self.platform == PLATFORM_x86 or self.platform == PLATFORM_x86_64)

def isArmPlatform (self):
return ( self.platform == PLATFORM_aarch64)

def is64Platform (self):
return ( self.platform == PLATFORM_64);
return ( self.platform == PLATFORM_x86_64 or self.platform == PLATFORM_aarch64)

def isRelease (self):
return ( self.mode == RELEASE_);
Expand Down Expand Up @@ -506,10 +516,12 @@ def update_name (self,name,delimiter):

def cxxcomp_flags (self,flags):
result = copy.copy(flags);
if self.is64Platform () :
result+=['-m64'];
else:
result+=['-m32'];

if self.isIntelPlatform():
if self.is64Platform () :
result+=['-m64'];
else:
result+=['-m32'];

if self.isRelease () :
result+=['-O3'];
Expand Down Expand Up @@ -552,11 +564,12 @@ def get_link_flags(self, is_sanitized):

#platform depended flags

if self.is64Platform():
base_flags += ['-m64']
else:
base_flags += ['-m32']
base_flags += ['-lrt']
if self.isIntelPlatform():
if self.is64Platform():
base_flags += ['-m64']
else:
base_flags += ['-m32']
base_flags += ['-lrt']

if self.isPIE():
base_flags += ['-pie', '-DPATCH_FOR_PIE']
Expand All @@ -568,11 +581,11 @@ def get_link_flags(self, is_sanitized):


build_types = [
build_option(name = "bp-sim", src = bp, use = [''],debug_mode= DEBUG_, platform = PLATFORM_64, is_pie = False,
build_option(name = "bp-sim", src = bp, use = [''],debug_mode= DEBUG_, is_pie = False,
flags = ['-Wall', '-Werror', '-Wno-sign-compare', '-Wno-strict-aliasing'],
rpath = ['so']),

build_option(name = "bp-sim", src = bp, use = [''],debug_mode= RELEASE_,platform = PLATFORM_64, is_pie = False,
build_option(name = "bp-sim", src = bp, use = [''],debug_mode= RELEASE_, is_pie = False,
flags = ['-Wall', '-Werror', '-Wno-sign-compare', '-Wno-strict-aliasing'],
rpath = ['so']),

Expand Down
Loading

0 comments on commit 8502230

Please sign in to comment.