Skip to content

Commit 01c44f9

Browse files
David Abdurachmanovdpiparo
David Abdurachmanov
authored andcommitted
Add support for ARMv8 64-bit (AArch64), linuxarm64
The patch adds supports for ARMv8 64-bit (AArch64). This is done by introducing a new target -- linuxarm64 -- to ROOT6 build scripts and configuration. Signed-off-by: David Abdurachmanov <[email protected]> Tested-by: David Abdurachmanov <[email protected]> Signed-off-by: Danilo Piparo <[email protected]>
1 parent 33072c8 commit 01c44f9

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

config/ARCHS

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ aixgcc for AIX >= 5.x with gcc >= 4.8
22
freebsd7 for FreeBSD 7.x with gcc >= 4.8
33
linux for i386 Linux with gcc >= 4.8
44
linuxarm for ARM Linux with gcc >= 4.8
5+
linuxarm64 for ARMv8-A (AArch64) Linux with gcc >= 4.8
56
linuxppcgcc for PPC Linux with gcc >= 4.8
67
linuxppc64gcc for PPC 64 Linux with gcc >= 4.8
78
linuxx8664gcc for x86-64 Linux with gcc >= 4.8

config/root-config.in

+5
Original file line numberDiff line numberDiff line change
@@ -240,6 +240,11 @@ linuxarm)
240240
auxcflags="${cxxversionflag} -fsigned-char"
241241
auxlibs="-lm -ldl -rdynamic"
242242
;;
243+
linuxarm64)
244+
# ARMv8-A (AArch64) Linux with gcc
245+
auxcflags="${cxxversionflag} -fsigned-char"
246+
auxlibs="-lm -ldl -rdynamic"
247+
;;
243248
freebsd)
244249
# FreeBSD with libc5
245250
auxcflags="${cxxversionflag} -Wno-deprecated-declarations"

configure

+5
Original file line numberDiff line numberDiff line change
@@ -1360,6 +1360,7 @@ guess_architecture() {
13601360
linux:x86_64:*) arch=linuxx8664gcc ;;
13611361
linux:x32:*) arch=linuxx32gcc ;;
13621362
linux:arm*:*) arch=linuxarm ;;
1363+
linux:aarch64:*) arch=linuxarm64 ;;
13631364
linux:hppa*:*) arch=linux ;;
13641365
linux:sparc*:*) arch=linux ;;
13651366
linux:parisc*:*) arch=linuxhppa ;;
@@ -1906,6 +1907,10 @@ linuxx8664*)
19061907
logmsg "Will check 64bit libraries"
19071908
checklinux64="yes"
19081909
checklib64="yes" ;;
1910+
linuxarm64)
1911+
logmsg "Will check 64bit libraries"
1912+
checklinux64="yes"
1913+
checklib64="yes" ;;
19091914
linuxx32*)
19101915
logmsg "Will check x32 libraries in the future"
19111916
logmsg "For now expect proper libraries through configure flags" ;;

core/base/inc/RConfig.h

+8
Original file line numberDiff line numberDiff line change
@@ -191,6 +191,14 @@
191191
# endif
192192
#endif
193193

194+
#if defined(linux) && defined(__aarch64__)
195+
# define R__LINUX
196+
# define R__UNIX
197+
# define R__BYTESWAP
198+
# define R__B64
199+
# define NEED_SIGJMP
200+
#endif
201+
194202
#if defined(__MACH__) && defined(__i386__) && !defined(__APPLE__)
195203
# define R__HURD
196204
# define f2cFortran /* cfortran.h does not know HURD - sigh */

etc/Makefile.arch

+9
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,15 @@ LDFLAGS = $(OPT)
245245
SOFLAGS = -shared
246246
endif
247247

248+
ifeq ($(ARCH),linuxarm64)
249+
# ARMv8-A (AArch64) Linux with gcc and glibc
250+
CXX = g++
251+
CXXFLAGS = $(OPT) -Wall -fPIC
252+
LD = g++
253+
LDFLAGS = $(OPT)
254+
SOFLAGS = -shared
255+
endif
256+
248257
ifeq ($(ARCH),freebsd4)
249258
# FreeBSD with glibc
250259
CXX = g++

tmva/Makefile.arch

+9
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,15 @@ LDFLAGS = -O
299299
SOFLAGS = -shared
300300
endif
301301

302+
ifeq ($(ARCH),linuxarm64)
303+
# ARMv8-A (AArch64) Linux with egcs
304+
CXX = g++
305+
CXXFLAGS = -O -Wall -fPIC -Wshadow -Woverloaded-virtual
306+
LD = g++
307+
LDFLAGS = -O
308+
SOFLAGS = -shared
309+
endif
310+
302311
ifeq ($(ARCH),mklinux)
303312
# MkLinux with libc5
304313
CXX = g++

0 commit comments

Comments
 (0)