Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tkonline 80x #2193

Merged
merged 2 commits into from
Mar 16, 2016
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 0 additions & 46 deletions tkonlinesw-2.7.0-fix-gcc46.patch

This file was deleted.

40 changes: 40 additions & 0 deletions tkonlinesw-4.0-clang-hash_map.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
diff --git a/FecSoftwareV3_0/generic/include/hashMapDefinition.h b/FecSoftwareV3_0/generic/include/hashMapDefinition.h
index 484b45d..d7eb424 100755
--- a/FecSoftwareV3_0/generic/include/hashMapDefinition.h
+++ b/FecSoftwareV3_0/generic/include/hashMapDefinition.h
@@ -22,7 +22,10 @@
#include <string.h>
// Compatibility with the G++ version 3.X
// Retreive from http://gcc.gnu.org/onlinedocs/libstdc++/faq/
-#ifdef __GNUC__
+// __GNUC__ and other macros are defined by other compilers (Clang, ICC, etc)
+// to communicate feature compatibility level (e.g. 4.2.1). They cannot be
+// used alone to identify the current compiler.
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER)
#define GNUCV __GNUC__*10+__GNUC_MINOR__
//#if __GNUC__ <
#if GNUCV < 30
@@ -41,8 +44,13 @@ namespace Sgi = ::__gnu_cxx; // GCC 3.1 and later
namespace Sgi = std;
#define hash_map unordered_map
#endif
-#else // ... there are other compilers, right?
+#else // __GNUC__ && !defined(__clang__) && !defined(__INTEL_COMPILER)
+// The below setup are for non-GNU compiler
+#if defined(__clang__) || defined(__INTEL_COMPILER)
+#include <unordered_map>
namespace Sgi = std;
+#define hash_map unordered_map
+#endif // defined(__clang__) || defined(__INTEL_COMPILER)
#endif

// To have hash_map hash_map<const char *, ...>
@@ -51,7 +59,7 @@ namespace Sgi = std;
// doesn't work with (notably the string template, which is pretty much standard across all STL implementations).
// You need to supply some extra code yourself, for the hash function to work correctly with other parts of the STL,
// which are standard across all implementations.
-#if GNUCV < 44
+#if defined(__GNUC__) && !defined(__clang__) && !defined(__INTEL_COMPILER) && GNUCV < 44
struct eqstr
{
bool operator()(const char* s1, const char* s2) const
1 change: 1 addition & 0 deletions tkonlinesw-toolfile.spec
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ cat << \EOF_TOOLFILE >%i/etc/scram.d/tkonlinesw.xml
<environment name="INCLUDE" value="$TKONLINESW_BASE/include"/>
</client>
<runtime name="ROOT_INCLUDE_PATH" value="$INCLUDE" type="path"/>
<flags CXXFLAGS="-DCMS_TK_64BITS"/>
<use name="root_cxxdefaults"/>
<use name="xerces-c"/>
</tool>
Expand Down
16 changes: 7 additions & 9 deletions tkonlinesw.spec
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
### RPM external tkonlinesw 2.7.0
### RPM external tkonlinesw 4.0.0-1

%define projectname trackerDAQ
%define releasename %{projectname}-%{realversion}
Source0: http://cms-trackerdaq-service.web.cern.ch/cms-trackerdaq-service/download/sources/trackerDAQ-2.7.0-10.tgz
%define releasename %{projectname}-4.0-tkonline
Source0: http://cms-trackerdaq-service.web.cern.ch/cms-trackerdaq-service/download/sources/trackerDAQ-%{realversion}.tgz
Patch0: tkonlinesw-2.7.0-macosx
Patch1: tkonlinesw-2.7.0-fix-gcc46
Patch1: tkonlinesw-4.0-clang-hash_map

# NOTE: given how broken the standard build system is
# on macosx, it's not worth fixing it.
Expand All @@ -20,15 +20,16 @@ Requires: oracle
Requires: xerces-c
Requires: gmake
Requires: systemtools
Requires: root

%prep
%setup -q -n %releasename
%patch1 -p1
case %cmsos in
osx*)
%patch0 -p1
;;
esac
%patch1 -p1
# Clean up some mysterious old build within the sources that screws
# up the install by copying in an old libFed9UUtils.so
# (this is really needed)
Expand All @@ -38,8 +39,6 @@ perl -p -i -e "s|-Werror||" FecSoftwareV3_0/generic/Makefile


%build
echo "pwd: $PWD"

###############################################################################
# Tracker Specific Definitions for running, should just be this ...
################################################################################
Expand Down Expand Up @@ -69,7 +68,6 @@ export ENV_CMS_TK_LASTGBOARD=%{_builddir}/%releasename/LAS
# We use an empty directory because the path neeeds to exist.
mkdir -p %i/dummy/Linux/lib
export ENV_CMS_TK_HAL_ROOT=%{i}/dummy/Linux
export ROOTSYS=%{i}/dummy/Linux
export ENV_CMS_TK_CAEN_ROOT=%{i}/dummy/Linux
export ENV_CMS_TK_SBS_ROOT=%{i}/dummy/Linux
export ENV_CMS_TK_TTC_ROOT=%{i}/dummy/Linux
Expand Down Expand Up @@ -143,6 +141,6 @@ esac
case %cmsos in
slc*)
# Option --prefix in configure is not working yet, using tar:
tar -c -C %{_builddir}/%{releasename}/opt/%{projectname} --exclude "libcppunit.so" include lib | tar -x -C %{i}
tar -c -C %{_builddir}/%{releasename}/opt/%{projectname} include lib | tar -x -C %{i}
;;
esac