Commit 8a636470 authored by Patricia Mendez Lorenzo's avatar Patricia Mendez Lorenzo
Browse files

Merge branch 'LCG_81b_aarch64' into 'arm_tests_81b'

Lcg 81b aarch64

Merge request for 81b aarch64 build to sft/lcgcmake arm_tests branch.
Main changes:
updating config.guess scripts before building package. 
heptools-81b.cmake toolchain has Aarch64 catches.
Various adjustments to CMakeLists.txt files, shouldn't interfere if not Aarch64.
Some patches introduced: GPerftools, mysql (maybe some others?)
Building qt4.8.6 instead of 4.8.4
Skipping over gridexternals


See merge request !33
parents 02b8755a 1adcc86a
......@@ -578,6 +578,11 @@ if(NOT rv EQUAL 0)
message(FATAL_ERROR \"error: extract of '\${filename}' failed\")
endif()
# Update the config.guess files.
#
message(STATUS \"Updating the config.guess file...\")
execute_process(COMMAND ${CMAKE_SOURCE_DIR}/cmake/modules/update.ConfigGuess)
# Analyze what came out of the tar file:
#
message(STATUS \"extracting... [analysis]\")
......
#!/bin/bash
for i in $(find -name config.guess); do
if [ -n "$i" ]; then
echo "Found: $i"
wget -O $i 'http://git.savannah.gnu.org/gitweb/?p=config.git;a=blob_plain;f=config.guess;hb=HEAD'
fi
done
......@@ -12,8 +12,8 @@ include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# Application Area Projects
LCG_AA_project(COOL 3_1_0)
LCG_AA_project(CORAL 3_1_0)
LCG_AA_project(COOL 3_1-patches)
LCG_AA_project(CORAL 3_1-patches)
LCG_AA_project(RELAX RELAX-root6)
LCG_AA_project(ROOT 6.04.12)
LCG_AA_project(LCGCMT LCGCMT_${heptools_version})
......@@ -36,7 +36,9 @@ LCG_external_package(cmt v1r20p20090520
LCG_external_package(coin3d 3.1.3p2 )
LCG_external_package(coverage 3.5.2 )
LCG_external_package(CppUnit 1.12.1_p1 author=1.12.1 )
if(NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(cx_oracle 5.1.1 )
endif()
if(NOT ${LCG_OS} STREQUAL mac)
LCG_external_package(Davix 0.4.0 )
endif()
......@@ -46,13 +48,16 @@ LCG_external_package(expat 2.0.1
LCG_external_package(eigen 3.2.7 )
LCG_external_package(fastjet 3.1.1 )
LCG_external_package(fftw 3.1.2 fftw3 )
LCG_external_package(Frontier_Client 2.8.12 frontier_client)
LCG_external_package(GCCXML 0.9.0_20131026 gccxml )
LCG_external_package(Frontier_Client 2.8.10 frontier_client)
if(NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(GCCXML 0.9.0_20131026 gccxml )
endif()
#LCG_external_package(GCCXML 0.9.0_20131026 gccxml )
LCG_external_package(genshi 0.6 )
LCG_external_package(gmp 6.0.0 )
LCG_external_package(graphviz 2.28.0 )
LCG_external_package(GSL 1.10 )
LCG_external_package(gtest 1.7.0 )
LCG_external_package(gtest 1.7.0 )
LCG_external_package(HepPDT 2.06.01 )
LCG_external_package(ipython 3.1.0 )
LCG_external_package(jemalloc 3.6.0 )
......@@ -62,8 +67,8 @@ LCG_external_package(jsonschema 2.4.0
LCG_external_package(lapack 3.5.0 )
LCG_external_package(lcov 1.9 )
LCG_external_package(libsvm 2.86 )
LCG_external_package(libtool 1.5.26 )
LCG_external_package(logilabcommon 1.0.1 )
LCG_external_package(libtool 2.4.2 )
LCG_external_package(logilabcommon 1.0.1 )
LCG_external_package(lxml 2.3 )
LCG_external_package(MarkupSafe 0.23 )
LCG_external_package(matplotlib 1.4.3 )
......@@ -76,7 +81,9 @@ LCG_external_package(mysql_python 1.2.3
LCG_external_package(nose 1.1.2 )
LCG_external_package(numexpr 2.4.3 )
LCG_external_package(numpy 1.9.2 )
if(NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(oracle 11.2.0.3.0 )
endif()
LCG_external_package(pacparser 1.3.1 )
LCG_external_package(pandas 0.16.1 )
LCG_external_package(pcre 8.34 )
......@@ -105,8 +112,8 @@ LCG_external_package(PyYAML 3.11 pyyaml
LCG_external_package(pyxml 0.8.4p1 )
LCG_external_package(pyzmq 14.5.0 )
LCG_external_package(QMtest 2.4.1 )
LCG_external_package(Qt 4.8.4 qt )
LCG_external_package(Qt5 5.4.1 qt5 )
LCG_external_package(Qt 4.8.6 qt )
#LCG_external_package(Qt5 5.4.1 qt5 )
LCG_external_package(qwt 6.0.1 )
LCG_external_package(scikitlearn 0.16.1 )
LCG_external_package(scipy 0.15.1 )
......@@ -144,12 +151,11 @@ LCG_external_package(mpich2 1.5
LCG_external_package(yamlcpp 0.5.1 )
#---EMI-2 grid externals and other binary packages---------------------
if(NOT ${LCG_OS} MATCHES "mac")
if(NOT ${LCG_OS} MATCHES "mac" AND NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(libunwind 5c2cade )
LCG_external_package(igprof 5.9.11 )
endif()
#if(${LCG_OS} STREQUAL slc)
if (NOT ${LCG_HOST_ARCH} STREQUAL i686)
if (NOT ${LCG_HOST_ARCH} STREQUAL i686 AND NOT LCG_TARGET MATCHES "aarch64" AND NOT ${LCG_OS} MATCHES "ubuntu")
LCG_external_package(CASTOR 2.1.13-6 castor )
LCG_external_package(cream 1.14.0-4 Grid/cream )
LCG_external_package(dcap 2.47.7-1 Grid/dcap )
......@@ -198,9 +204,11 @@ LCG_external_package(lhapdf 6.1.5.cxxstd ${MCGENPATH}/lhapdf author
LCG_external_package(lhapdfsets 5.9.1 lhapdfsets )
if(NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(powheg-box-v2 r3043.lhcb ${MCGENPATH}/powheg-box-v2 author=r3043 )
LCG_external_package(powheg-box-v2 r3043.lhcb.rdynamic ${MCGENPATH}/powheg-box-v2 author=r3043 )
LCG_external_package(powheg-box r2092 ${MCGENPATH}/powheg-box )
endif()
LCG_external_package(feynhiggs 2.10.2 ${MCGENPATH}/feynhiggs )
LCG_external_package(chaplin 1.2 ${MCGENPATH}/chaplin )
......@@ -267,14 +275,17 @@ LCG_external_package(starlight r43 ${MCGENPATH}/starlight
LCG_external_package(herwig 6.520.2 ${MCGENPATH}/herwig )
LCG_external_package(herwig 6.521.2 ${MCGENPATH}/herwig )
if (NOT LCG_TARGET MATCHES "aarch64")
LCG_external_package(crmcold v3400 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.4 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.5.3 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.5.4 ${MCGENPATH}/crmc )
endif()
LCG_external_package(cython 0.19.1 ${MCGENPATH}/cython )
LCG_external_package(cython 0.22 ${MCGENPATH}/cython )
LCG_external_package(yoda 1.4.0 ${MCGENPATH}/yoda cython=0.22 )
LCG_external_package(yoda 1.1.0 ${MCGENPATH}/yoda cython=0.19.1 )
LCG_external_package(yoda 1.5.5 ${MCGENPATH}/yoda cython=0.22 )
......
cmake_minimum_required(VERSION 2.8.5)
# Declare the version of HEP Tools we use
# (must be done before including heptools-common to allow evolution of the
# structure)
set(heptools_version 79)
include(${CMAKE_CURRENT_LIST_DIR}/heptools-common.cmake)
# please keep alphabetic order and the structure (tabbing).
# it makes it much easier to edit/read this file!
# Application Area Projects
LCG_AA_project(COOL 3_0_4)
LCG_AA_project(CORAL 3_0_4)
LCG_AA_project(RELAX RELAX_1_4_2)
LCG_AA_project(ROOT 6.04.02)
LCG_AA_project(LCGCMT LCGCMT_${heptools_version})
LCG_AA_project(HepMC 2.06.09)
#LCG_external_package(Geant4 9.6.p03 CLHEP=2.1.4.1)
# Externals
LCG_external_package(hepmc3 githead )
LCG_external_package(4suite 1.0.2p1 )
LCG_external_package(AIDA 3.2.1 )
LCG_external_package(astroid 1.3.6 )
LCG_external_package(backports 3.4.0.2 )
LCG_external_package(blas 20110419 )
LCG_external_package(Boost 1.55.0 )
LCG_external_package(certifi 14.05.14 )
#LCG_external_package(CLHEP 2.1.4.1 clhep )
LCG_external_package(CLHEP 1.9.4.7 clhep )
LCG_external_package(cmaketools 1.1 )
LCG_external_package(cmt v1r20p20090520 )
LCG_external_package(coin3d 3.1.3p2 )
LCG_external_package(coverage 3.5.2 )
LCG_external_package(CppUnit 1.12.1_p1 author=1.12.1 )
LCG_external_package(cx_oracle 5.1.1 )
if(NOT ${LCG_OS} STREQUAL mac)
LCG_external_package(Davix 0.3.1 )
endif()
#LCG_external_package(DD4hep v00-07 )
LCG_external_package(doxygen 1.8.9.1 )
LCG_external_package(eigen 3.2.4 )
LCG_external_package(expat 2.0.1 )
LCG_external_package(fastjet 3.1.1 )
LCG_external_package(fftw 3.1.2 fftw3 )
LCG_external_package(Frontier_Client 2.8.12 frontier_client)
LCG_external_package(GCCXML 0.9.0_20131026 gccxml )
LCG_external_package(genshi 0.6 )
LCG_external_package(gmp 6.0.0 )
LCG_external_package(graphviz 2.28.0 )
LCG_external_package(GSL 1.10 )
LCG_external_package(gtest 1.7.0 )
LCG_external_package(HepPDT 2.06.01 )
LCG_external_package(ipython 3.1.0 )
LCG_external_package(Jinja2 2.7.3 )
LCG_external_package(json 2.5.2 )
LCG_external_package(jsonschema 2.4.0 )
LCG_external_package(lapack 3.5.0 )
LCG_external_package(lcov 1.9 )
LCG_external_package(libsvm 2.86 )
LCG_external_package(libtool 2.4.2 )
LCG_external_package(logilab-common 1.0.1 )
LCG_external_package(lxml 2.3 )
LCG_external_package(MarkupSafe 0.23 )
LCG_external_package(matplotlib 1.4.3 )
LCG_external_package(messaging 1.0 )
LCG_external_package(mistune 0.5.1 )
LCG_external_package(mock 0.8.0 )
LCG_external_package(multiprocessing 2.6.2.1 )
LCG_external_package(mysql 5.5.27 )
LCG_external_package(mysql_python 1.2.3 )
LCG_external_package(nose 1.1.2 )
LCG_external_package(numexpr 2.4.3 )
LCG_external_package(numpy 1.9.2 )
LCG_external_package(oracle 11.2.0.3.0 )
LCG_external_package(pacparser 1.3.1 )
LCG_external_package(pandas 0.16.1 )
LCG_external_package(pcre 8.34 )
LCG_external_package(prettytable 0.7.2 )
LCG_external_package(processing 0.52 )
LCG_external_package(ptyprocess 0.4 )
LCG_external_package(py 1.4.8 )
LCG_external_package(py2neo 1.4.6 )
LCG_external_package(pyanalysis 1.5 )
LCG_external_package(pydot 1.0.28 )
LCG_external_package(pygments 2.0.2 )
LCG_external_package(pygraphics 1.5 )
LCG_external_package(pygsi 0.6.3 )
LCG_external_package(pylint 1.4.0 )
LCG_external_package(pyminuit 0.0.1 )
LCG_external_package(pyparsing 2.0.3 )
LCG_external_package(pyqt 4.9.5 )
LCG_external_package(pytest 2.2.4 )
LCG_external_package(pytz 2015.4 )
LCG_external_package(Python 2.7.9.p1 )
LCG_external_package(PythonFWK 2.7.9 Python )
LCG_external_package(python_dateutil 2.4.0 )
LCG_external_package(pytools 1.9 )
LCG_external_package(pyxml 0.8.4p1 )
LCG_external_package(pyzmq 14.5.0 )
LCG_external_package(QMtest 2.4.1 )
LCG_external_package(Qt 4.8.4 qt )
LCG_external_package(Qt5 5.4.1 qt5 )
LCG_external_package(qwt 6.0.1 )
LCG_external_package(scikitlearn 0.16.1 )
LCG_external_package(scipy 0.15.1 )
LCG_external_package(setuptools 0.6c11 )
LCG_external_package(sip 4.14 )
LCG_external_package(six 1.9.0 )
LCG_external_package(soqt 1.5.0 )
LCG_external_package(sqlalchemy 0.7.7 )
LCG_external_package(sqlite 3070900 )
LCG_external_package(stomppy 3.1.3 )
LCG_external_package(storm 0.19 )
LCG_external_package(subprocess32 3.2.6 )
LCG_external_package(swig 2.0.11 author=2.0.11 )
LCG_external_package(sympy 0.7.6 )
LCG_external_package(tbb 42_20140122 )
LCG_external_package(tcmalloc 2.4 )
LCG_external_package(terminado 0.5 )
LCG_external_package(tornado 4.0.2 )
if(NOT ${LCG_OS}${LCG_OSVERS} STREQUAL slc6) # uuid is not distributed with SLC6
LCG_external_package(uuid 1.42 )
endif()
if(NOT ${LCG_OS}${LCG_OSVERS} STREQUAL mac109 AND NOT LCG_TARGET MATCHES "icc" ) # valgrind does not work yet with mac109 and icc
LCG_external_package(valgrind 3.10.0 )
endif()
LCG_external_package(vectorclass 1.16 )
LCG_external_package(vdt 0.3.6 )
LCG_external_package(XercesC 3.1.1p1 author=3.1.1 )
LCG_external_package(xqilla 2.2.4p1 )
LCG_external_package(xrootd 3.3.6 )
if(NOT ${LCG_OS} STREQUAL mac)
LCG_external_package(xrootd_python 0.1.3 )
endif()
LCG_external_package(mpich2 1.5 )
#---EMI-2 grid externals and other binary packages---------------------
if(NOT ${LCG_OS} MATCHES "mac")
LCG_external_package(libunwind 5c2cade )
LCG_external_package(igprof 5.9.11 )
endif()
if (NOT ${LCG_HOST_ARCH} STREQUAL i686)
LCG_external_package(CASTOR 2.1.13-6 castor )
LCG_external_package(cream 1.14.0-4 Grid/cream )
LCG_external_package(dcap 2.47.7-1 Grid/dcap )
LCG_external_package(dm-util 1.15.0-0 Grid/dm-util )
LCG_external_package(dpm 1.8.5-1 Grid/DPM )
LCG_external_package(epel 20130408 Grid/epel )
LCG_external_package(FTS 2.2.8emi2 Grid/FTS )
if(${LCG_OS}${LCG_OSVERS} STREQUAL slc6)
LCG_external_package(FTS3 0.0.1-88 Grid/FTS3 )
endif()
LCG_external_package(gfal 1.13.0-0 Grid/gfal )
LCG_external_package(gfal2 2.2.0-1 Grid/gfal2 )
LCG_external_package(gridftp_ifce 2.3.1-0 Grid/gridftp-ifce )
LCG_external_package(gridsite 1.7.25-1.emi2 Grid/gridsite )
LCG_external_package(is_ifce 1.15.0-0 Grid/is-ifce )
LCG_external_package(lb 3.2.9 Grid/lb )
LCG_external_package(lcgdmcommon 1.8.5-1 Grid/lcg-dm-common)
LCG_external_package(lcginfosites 3.1.0-3 Grid/lcg-infosites)
LCG_external_package(lfc 1.8.5-1 Grid/LFC )
LCG_external_package(srm_ifce 1.13.0-0 Grid/srm-ifce )
LCG_external_package(voms 2.0.9-1 Grid/voms )
LCG_external_package(WMS 3.4.0 Grid/WMS )
LCG_external_package(neurobayes 3.7.0 )
LCG_external_package(neurobayes_expert 3.7.0 )
endif()
#---Additional External packages------(Generators)-----------------
set(MCGENPATH MCGenerators)
LCG_external_package(heputils 1.0.0 ${MCGENPATH}/heputils )
LCG_external_package(mcutils 1.1.0 ${MCGENPATH}/mcutils heputils=1.0.0)
LCG_external_package(lhapdf 5.9.1 ${MCGENPATH}/lhapdf )
LCG_external_package(lhapdf 6.1.5 ${MCGENPATH}/lhapdf )
LCG_external_package(lhapdfsets 5.8.8 lhapdfsets )
LCG_external_package(lhapdfsets 5.9.1 lhapdfsets )
LCG_external_package(pythia8 175 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 185 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 186 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 201 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 205 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 209 ${MCGENPATH}/pythia8 )
LCG_external_package(pythia8 210 ${MCGENPATH}/pythia8 )
LCG_external_package(thepeg 1.9.2p1 ${MCGENPATH}/thepeg author=1.9.2 )
LCG_external_package(herwig++ 2.7.1 ${MCGENPATH}/herwig++ thepeg=1.9.2p1 )
LCG_external_package(pythia6 427.2 ${MCGENPATH}/pythia6 author=6.4.27 hepevt=10000 )
LCG_external_package(pythia6 429.2 ${MCGENPATH}/pythia6 author=6.4.28 hepevt=10000 )
LCG_external_package(pythia6 428.2 ${MCGENPATH}/pythia6 author=6.4.28 hepevt=10000 )
LCG_external_package(sherpa 2.1.1 ${MCGENPATH}/sherpa author=2.1.1 hepevt=10000)
LCG_external_package(herwig 6.520.2 ${MCGENPATH}/herwig )
LCG_external_package(herwig 6.521.2 ${MCGENPATH}/herwig )
LCG_external_package(crmcold v3400 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.4 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.5.4 ${MCGENPATH}/crmc )
LCG_external_package(crmc 1.5.3 ${MCGENPATH}/crmc )
LCG_external_package(cython 0.22 ${MCGENPATH}/cython )
LCG_external_package(cython 0.19.1 ${MCGENPATH}/cython )
LCG_external_package(yamlcpp 0.3.0 ${MCGENPATH}/yamlcpp )
LCG_external_package(alpgen 2.1.4 ${MCGENPATH}/alpgen author=214 )
#LCG_external_package(vincia HEAD ${MCGENPATH}/vincia )
LCG_external_package(vincia 1.1.03 ${MCGENPATH}/vincia pythia8=185)
LCG_external_package(vincia 1.2.00 ${MCGENPATH}/vincia pythia8=205)
LCG_external_package(vincia 1.2.01 ${MCGENPATH}/vincia pythia8=205)
# Prepare the search paths according to the versions above
LCG_prepare_paths()
......@@ -28,8 +28,7 @@ LCGPackage_Add(
URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/xapian-core-${xapian_native_version}.tar.gz
CONFIGURE_COMMAND ./configure --prefix=<INSTALL_DIR>
BUILD_COMMAND make
INSTALL_COMMAND make install
COMMAND ${CMAKE_COMMAND} -E copy <INSTALL_DIR>/include/xapian.h <INSTALL_DIR>/include/xapian/.
INSTALL_COMMAND make install
BUILD_IN_SOURCE 1
)
#---png-----------------------------------------------------------------------------------------------
......@@ -244,12 +243,14 @@ string(REPLACE "." "_" Boost_file_version ${Boost_config_version})
set (config_with_Boost "-DBoost_NO_BOOST_CMAKE=True" "-DBoost_DEBUG=True" "-DBoost_ADDITIONAL_VERSIONS=1.59")
if(LCG_TARGET MATCHES "aarch64")
set(Boost_aarch64_configs --without-libraries=context,coroutine)
endif()
LCGPackage_Add(
Boost
URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/boost_${Boost_file_version}.tar.gz
CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.sh ${Boost_bootstrap_options} --with-toolset=${Boost_toolset}
CONFIGURE_COMMAND <SOURCE_DIR>/bootstrap.sh ${Boost_bootstrap_options} --with-toolset=${Boost_toolset} ${Boost_aarch64_configs}
BUILD_COMMAND <SOURCE_DIR>/b2 ${Boost_jam_options} ${Boost_compile_options} --debug-configuration
--toolset=${Boost_toolset} --user-config=${CMAKE_CURRENT_BINARY_DIR}/user-config.jam
INSTALL_COMMAND <SOURCE_DIR>/b2 ${Boost_jam_options} ${Boost_compile_options} --toolset=${Boost_toolset}
......@@ -628,7 +629,7 @@ LCGPackage_Add(
Qt
URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/qt-everywhere-opensource-src-${Qt_native_version}.tar.gz
CONFIGURE_COMMAND ./configure ${Qt_extra_config_opts} -no-separate-debug-info -release --prefix=<INSTALL_DIR>
-nomake examples -nomake demos --opensource --confirm-license -fast -qt3support
-nomake examples -nomake demos --opensource --confirm-license -fast -qt3support -no-webkit
INSTALL_COMMAND ${MAKE} -j1 install
COMMAND ${CMAKE_SOURCE_DIR}/externals/Qt_postinstall.sh <INSTALL_DIR>
BUILD_IN_SOURCE 1
......@@ -677,11 +678,11 @@ LCGPackage_Add(
)
#---doxygen----------------------------------------------------------------------------------------------
LCGPackage_Add(
doxygen
doxygen
URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/doxygen-${doxygen_native_version}.src.tar.gz
CONFIGURE_COMMAND env XAPIAN=${xapian_home} ./configure --dot ${graphviz_home}/bin/dot --with-doxysearch --prefix <INSTALL_DIR>
CONFIGURE_COMMAND ./configure --dot ${graphviz_home}/bin/dot --prefix <INSTALL_DIR>
BUILD_IN_SOURCE 1
DEPENDS graphviz xapian
DEPENDS graphviz
)
#---expat------------------------------------------------------------------------------------------------
......@@ -881,6 +882,7 @@ LCGPackage_Add(
vdt
URL http://service-spi.web.cern.ch/service-spi/external/tarFiles/vdt-${vdt_native_version}.tar.gz
CMAKE_ARGS -DCMAKE_INSTALL_PREFIX=<INSTALL_DIR>
IF LCG_HOST_ARCH STREQUAL "aarch64" THEN -DSSE=OFF ENDIF
BUILD_IN_SOURCE 1
)
......
diff sql-common.old/client_plugin.c sql-common/client_plugin.c
--- sql-common.old/client_plugin.c 2011-01-07 01:57:38.087947821 +0100
+++ sql-common/client_plugin.c 2011-01-07 02:00:03.585825739 +0100
@@ -233,6 +233,7 @@
{
MYSQL mysql;
struct st_mysql_client_plugin **builtin;
+ va_list dummy;
if (initialized)
return 0;
@@ -249,7 +250,7 @@
pthread_mutex_lock(&LOCK_load_client_plugin);
for (builtin= mysql_client_builtins; *builtin; builtin++)
- add_plugin(&mysql, *builtin, 0, 0, 0);
+ add_plugin(&mysql, *builtin, 0, 0, dummy);
pthread_mutex_unlock(&LOCK_load_client_plugin);
@@ -293,6 +294,8 @@
mysql_client_register_plugin(MYSQL *mysql,
struct st_mysql_client_plugin *plugin)
{
+ va_list dummy;
+
if (is_not_initialized(mysql, plugin->name))
return NULL;
@@ -307,7 +310,7 @@
plugin= NULL;
}
else
- plugin= add_plugin(mysql, plugin, 0, 0, 0);
+ plugin= add_plugin(mysql, plugin, 0, 0, dummy);
pthread_mutex_unlock(&LOCK_load_client_plugin);
return plugin;
--- src/stacktrace.cc
+++ src/stacktrace.cc
@@ -130,6 +130,15 @@
#define HAVE_GST_arm
#endif
+#if defined(__aarch64__)
+#define STACKTRACE_INL_HEADER "stacktrace_arm64-inl.h"
+#define GST_SUFFIX arm64
+#include "stacktrace_impl_setup-inl.h"
+#undef GST_SUFFIX
+#undef STACKTRACE_INL_HEADER
+#define HAVE_GST_arm64
+#endif
+
#ifdef TCMALLOC_ENABLE_INSTRUMENT_STACKTRACE
#define STACKTRACE_INL_HEADER "stacktrace_instrument-inl.h"
#define GST_SUFFIX instrument
@@ -195,6 +204,8 @@
static GetStackImplementation *get_stack_impl = &impl__libunwind;
#elif defined(HAVE_GST_arm)
static GetStackImplementation *get_stack_impl = &impl__arm;
+#elif defined(HAVE_GST_arm64)
+static GetStackImplementation *get_stack_impl = &impl__arm64;
#elif defined(HAVE_GST_generic)
static GetStackImplementation *get_stack_impl = &impl__generic;
#elif 0
@@ -206,6 +217,7 @@
# include "stacktrace_powerpc-inl.h"
# include "stacktrace_win32-inl.h"
# include "stacktrace_arm-inl.h"
+# include "stacktrace_arm64-inl.h"
# include "stacktrace_instrument-inl.h"
#else
#error Cannot calculate stack trace: will need to write for your environment
--- src/stacktrace_arm64-inl.h
+++ src/stacktrace_arm64-inl.h
@@ -0,0 +1,138 @@
+// -*- Mode: C++; c-basic-offset: 2; indent-tabs-mode: nil -*-
+// Copyright (c) 2011, Google Inc.
+// All rights reserved.
+//
+// Redistribution and use in source and binary forms, with or without
+// modification, are permitted provided that the following conditions are
+// met:
+//
+// * Redistributions of source code must retain the above copyright
+// notice, this list of conditions and the following disclaimer.
+// * Redistributions in binary form must reproduce the above
+// copyright notice, this list of conditions and the following disclaimer
+// in the documentation and/or other materials provided with the
+// distribution.
+// * Neither the name of Google Inc. nor the names of its
+// contributors may be used to endorse or promote products derived from
+// this software without specific prior written permission.
+//
+// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+// ---
+// This is adapted from Doug Kwan's code for ARM.
+//
+
+#ifndef BASE_STACKTRACE_ARM64_INL_H_
+#define BASE_STACKTRACE_ARM64_INL_H_
+// Note: this file is included into stacktrace.cc more than once.
+// Anything that should only be defined once should be here:
+
+#include <stdint.h> // for uintptr_t
+#include "base/basictypes.h" // for NULL
+#include <gperftools/stacktrace.h>
+
+// Given a pointer to a stack frame, locate and return the calling
+// stackframe, or return NULL if no stackframe can be found. Perform sanity
+// checks (the strictness of which is controlled by the boolean parameter
+// "STRICT_UNWINDING") to reduce the chance that a bad pointer is returned.
+template<bool STRICT_UNWINDING>
+static void **NextStackFrame(void **old_sp) {
+ void **new_sp = (void**) old_sp[0];
+
+ // Check that the transition from frame pointer old_sp to frame
+ // pointer new_sp isn't clearly bogus
+ if (STRICT_UNWINDING) {
+ // With the stack growing downwards, older stack frame must be
+ // at a greater address that the current one.
+ if (new_sp <= old_sp) return NULL;
+ // Assume stack frames larger than 100,000 bytes are bogus.
+ if ((uintptr_t)new_sp - (uintptr_t)old_sp > 100000) return NULL;
+ } else {
+ // In the non-strict mode, allow discontiguous stack frames.
+ // (alternate-signal-stacks for example).
+ if (new_sp == old_sp) return NULL;
+ // And allow frames upto about 1MB.
+ if ((new_sp > old_sp)
+ && ((uintptr_t)new_sp - (uintptr_t)old_sp > 1000000)) return NULL;
+ }
+ if ((uintptr_t)new_sp & (sizeof(void *) - 1)) return NULL;
+ return new_sp;
+}
+
+// This ensures that GetStackTrace stes up the Link Register properly.
+#ifdef __GNUC__
+void StacktraceArm64DummyFunction() __attribute__((noinline));
+void StacktraceArm64DummyFunction() { __asm__ volatile(""); }
+#else
+# error StacktraceArm64DummyFunction() needs to be ported to this platform.
+#endif
+#endif // BASE_STACKTRACE_ARM64_INL_H_
+
+// Note: this part of the file is included several times.
+// Do not put globals below.
+
+// The following 4 functions are generated from the code below:
+// GetStack{Trace,Frames}()
+// GetStack{Trace,Frames}WithContext()
+//
+// These functions take the following args:
+// void** result: the stack-trace, as an array
+// int* sizes: the size of each stack frame, as an array
+// (GetStackFrames* only)
+// int max_depth: the size of the result (and sizes) array(s)
+// int skip_count: how many stack pointers to skip before storing in result
+// void* ucp: a ucontext_t* (GetStack{Trace,Frames}WithContext only)
+static int GET_STACK_TRACE_OR_FRAMES {
+#ifdef __GNUC__
+ void **sp = reinterpret_cast<void**>(__builtin_frame_address(0));
+#else
+# error reading stack point not yet supported on this platform.
+#endif
+
+ // On AArch64, the return address is stored in X30.
+ // This is not saved on the stack frame of a leaf function. To
+ // simplify code that reads return addresses, we call a dummy
+ // function so that the return address of this function is also
+ // stored in the stack frame. This works at least for gcc.
+ StacktraceArm64DummyFunction();
+
+ skip_count++; // skip parent frame due to indirection in stacktrace.cc
+
+ int n = 0;
+ while (sp && n < max_depth) {
+ // The GetStackFrames routine is called when we are in some
+ // informational context (the failure signal handler for example).
+ // Use the non-strict unwinding rules to produce a stack trace
+ // that is as complete as possible (even if it contains a few bogus
+ // entries in some rare cases).
+ void **next_sp = NextStackFrame<IS_STACK_FRAMES == 0>(sp);