From c44c6b13f3314afda7ef795f7e0ee2be8c5d4854 Mon Sep 17 00:00:00 2001 From: Jean-Paul Chaput Date: Thu, 11 May 2017 17:26:56 +0200 Subject: [PATCH] Adjust Katana event sort. CMake detection of Python 2.7 only. * Change: In all top CMakeLists.txt, force the use of Python 2.7 as we do not compile against 3.x flavors. Do not use the "EXACT" flags as it will not recognize 2.7.x versions. * Change: In Katana::RoutingEvent::Key::Compare(), preliminary experiments shows that the best sorting order is: - Lower layer first (i.e. M2 -> M3 -> M4 -> ... ) - Longer segments first. The later seems to be counter-intuitive. Guess is that placing the small ones first generate a more important fragmentation of the big ones. They are placed too early and are difficult to move afterwards. Another feature to test is *not* inserting pushed left/right segments if they are not *already* routed. * Change: In PyKatanaEngine.runNegociate() now takes a flag argument, provided through the new PyKatanaFlags exported object. (doChip.py must be changed accordingly) --- crlcore/CMakeLists.txt | 2 +- cumulus/CMakeLists.txt | 2 +- .../examples/code/engine/smurf/CMakeLists.txt | 2 +- etesian/CMakeLists.txt | 2 +- hurricane/CMakeLists.txt | 2 +- hurricane/CMakeLists.txt.orig | 42 +++++++ ispd/CMakeLists.txt | 2 +- katabatic/CMakeLists.txt | 2 +- katana/src/CMakeLists.txt | 2 + katana/src/PyKatana.cpp | 8 +- katana/src/PyKatanaEngine.cpp | 34 ++++-- katana/src/PyKatanaFlags.cpp | 107 ++++++++++++++++++ katana/src/RoutingEvent.cpp | 6 +- katana/src/katana/PyKatanaEngine.h | 5 +- katana/src/katana/PyKatanaFlags.h | 59 ++++++++++ kite/CMakeLists.txt | 2 +- mauka/CMakeLists.txt | 2 +- metis/CMakeLists.txt | 2 +- nimbus/CMakeLists.txt | 2 +- stratus1/CMakeLists.txt | 2 +- unicorn/CMakeLists.txt | 2 +- vlsisapd/CMakeLists.txt | 2 +- .../src/liberty/src/LibertyParserScanner.ll | 4 - 23 files changed, 263 insertions(+), 32 deletions(-) create mode 100644 hurricane/CMakeLists.txt.orig create mode 100644 katana/src/PyKatanaFlags.cpp create mode 100644 katana/src/katana/PyKatanaFlags.h diff --git a/crlcore/CMakeLists.txt b/crlcore/CMakeLists.txt index 071b5cf2..283684bb 100644 --- a/crlcore/CMakeLists.txt +++ b/crlcore/CMakeLists.txt @@ -21,7 +21,7 @@ setup_qt() find_package(LibXml2 REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) diff --git a/cumulus/CMakeLists.txt b/cumulus/CMakeLists.txt index f951c0c5..2bf8c2ed 100644 --- a/cumulus/CMakeLists.txt +++ b/cumulus/CMakeLists.txt @@ -12,7 +12,7 @@ set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/documentation/examples/code/engine/smurf/CMakeLists.txt b/documentation/examples/code/engine/smurf/CMakeLists.txt index bf11021a..4fc2951c 100644 --- a/documentation/examples/code/engine/smurf/CMakeLists.txt +++ b/documentation/examples/code/engine/smurf/CMakeLists.txt @@ -16,7 +16,7 @@ setup_qt() find_package(LibXml2 REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 EXACT REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(AXEP REQUIRED) find_package(VLSISAPD REQUIRED) diff --git a/etesian/CMakeLists.txt b/etesian/CMakeLists.txt index 32fa4753..ccab5323 100644 --- a/etesian/CMakeLists.txt +++ b/etesian/CMakeLists.txt @@ -16,7 +16,7 @@ set_lib_link_mode() setup_boost(program_options python regex) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/hurricane/CMakeLists.txt b/hurricane/CMakeLists.txt index 565a0fd7..b412ea6f 100644 --- a/hurricane/CMakeLists.txt +++ b/hurricane/CMakeLists.txt @@ -21,7 +21,7 @@ find_package(BZip2 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(Libexecinfo REQUIRED) diff --git a/hurricane/CMakeLists.txt.orig b/hurricane/CMakeLists.txt.orig new file mode 100644 index 00000000..565a0fd7 --- /dev/null +++ b/hurricane/CMakeLists.txt.orig @@ -0,0 +1,42 @@ +# -*- mode: CMAKE explicit-buffer-name: "CMakeLists.txt" -*- + + set(CMAKE_LEGACY_CYGWIN_WIN32 0) + project(HURRICANE) + + option(BUILD_DOC "Build the documentation (doxygen)" OFF) + + cmake_minimum_required(VERSION 2.8.9) + + list(INSERT CMAKE_MODULE_PATH 0 "${DESTDIR}$ENV{CORIOLIS_TOP}/share/cmake/Modules") + find_package(Bootstrap REQUIRED) + setup_project_paths(CORIOLIS) + list(INSERT CMAKE_MODULE_PATH 0 "${HURRICANE_SOURCE_DIR}/cmake_modules/") + + set_cmake_policies() + set_lib_link_mode() + setup_boost(program_options regex) + setup_qt() + + find_package(LibXml2 REQUIRED) + find_package(BZip2 REQUIRED) + find_package(BISON REQUIRED) + find_package(FLEX REQUIRED) + find_package(PythonLibs REQUIRED) + find_package(PythonSitePackages REQUIRED) + find_package(VLSISAPD REQUIRED) + find_package(Libexecinfo REQUIRED) + find_package(Libbfd) + + add_subdirectory(src) + add_subdirectory(cmake_modules) +#add_subdirectory(tests) + + if(BUILD_DOC) + find_package(Doxygen) + if(DOXYGEN_FOUND) + add_subdirectory(doc) + endif() + endif() + +#enable_testing() +#add_test(HurricaneTest ${PROJECT_BINARY_DIR}/tests/htest) diff --git a/ispd/CMakeLists.txt b/ispd/CMakeLists.txt index 6ccec521..b5e2a90c 100644 --- a/ispd/CMakeLists.txt +++ b/ispd/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(LibXml2 REQUIRED) set(QT_USE_QTXML "true") find_package(Qt4 REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/katabatic/CMakeLists.txt b/katabatic/CMakeLists.txt index 44a54c7e..70f328cd 100644 --- a/katabatic/CMakeLists.txt +++ b/katabatic/CMakeLists.txt @@ -17,7 +17,7 @@ setup_boost(program_options filesystem python regex) setup_qt() - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/katana/src/CMakeLists.txt b/katana/src/CMakeLists.txt index 3eed1b87..b77aec7a 100644 --- a/katana/src/CMakeLists.txt +++ b/katana/src/CMakeLists.txt @@ -36,6 +36,7 @@ ) set( pyIncludes katana/PyKatanaEngine.h katana/PyGraphicKatanaEngine.h + katana/PyKatanaFlags.h ) set( mocIncludes katana/GraphicKatanaEngine.h ) set( cpps Constants.cpp @@ -73,6 +74,7 @@ set( pyCpps PyKatana.cpp PyKatanaEngine.cpp PyGraphicKatanaEngine.cpp + PyKatanaFlags.cpp ) qtX_wrap_cpp( mocCpps ${mocIncludes} ) diff --git a/katana/src/PyKatana.cpp b/katana/src/PyKatana.cpp index 07d041fa..784fb2dd 100644 --- a/katana/src/PyKatana.cpp +++ b/katana/src/PyKatana.cpp @@ -17,6 +17,7 @@ #include "hurricane/isobar/PyHurricane.h" #include "hurricane/isobar/PyCell.h" +#include "katana/PyKatanaFlags.h" #include "katana/PyKatanaEngine.h" #include "katana/PyGraphicKatanaEngine.h" @@ -67,9 +68,11 @@ extern "C" { DL_EXPORT(void) initKatana () { cdebug_log(40,0) << "initKatana()" << endl; + PyKatanaFlags_LinkPyType(); PyKatanaEngine_LinkPyType(); PyGraphicKatanaEngine_LinkPyType(); + PYTYPE_READY ( KatanaFlags ); PYTYPE_READY_SUB( KatanaEngine , ToolEngine ); PYTYPE_READY_SUB( GraphicKatanaEngine, GraphicTool ); @@ -85,12 +88,15 @@ extern "C" { PyModule_AddObject( module, "KatanaEngine", (PyObject*)&PyTypeKatanaEngine ); Py_INCREF( &PyTypeGraphicKatanaEngine ); PyModule_AddObject( module, "GraphicKatanaEngine", (PyObject*)&PyTypeGraphicKatanaEngine ); - + Py_INCREF( &PyTypeKatanaFlags ); + PyModule_AddObject( module, "Flags", (PyObject*)&PyTypeKatanaFlags ); // PyObject* dictionnary = PyModule_GetDict( module ); // PyObject* constant; // LoadObjectConstant( dictionnary, KtBuildGlobalRouting, "KtBuildGlobalRouting" ); // LoadObjectConstant( dictionnary, KtLoadGlobalRouting , "KtLoadGlobalRouting" ); + + PyKatanaEngine_postModuleInit(); } diff --git a/katana/src/PyKatanaEngine.cpp b/katana/src/PyKatanaEngine.cpp index d9ea2a7c..2b266fd8 100644 --- a/katana/src/PyKatanaEngine.cpp +++ b/katana/src/PyKatanaEngine.cpp @@ -19,6 +19,7 @@ #include "hurricane/viewer/ExceptionWidget.h" #include "hurricane/Cell.h" #include "katana/PyKatanaEngine.h" +#include "katana/PyKatanaFlags.h" #include # undef ACCESS_OBJECT @@ -264,19 +265,26 @@ extern "C" { } - static PyObject* PyKatanaEngine_runNegociate ( PyKatanaEngine* self ) + static PyObject* PyKatanaEngine_runNegociate ( PyKatanaEngine* self, PyObject* args ) { cdebug_log(40,0) << "PyKatanaEngine_runNegociate()" << endl; + + unsigned int flags = 0; HTRY - METHOD_HEAD("KatanaEngine.runNegociate()") - if (katana->getViewer()) { - if (ExceptionWidget::catchAllWrapper( std::bind(&KatanaEngine::runNegociate,katana,0) )) { - PyErr_SetString( HurricaneError, "EtesianEngine::runNegociate() has thrown an exception (C++)." ); + METHOD_HEAD("KatanaEngine.runNegociate()") + if (PyArg_ParseTuple(args,"I:KatanaEngine.runNegociate", &flags)) { + if (katana->getViewer()) { + if (ExceptionWidget::catchAllWrapper( std::bind(&KatanaEngine::runNegociate,katana,flags) )) { + PyErr_SetString( HurricaneError, "EtesianEngine::runNegociate() has thrown an exception (C++)." ); + return NULL; + } + } else { + katana->runNegociate( flags ); + } + } else { + PyErr_SetString( ConstructorError, "KatanaEngine.runNegociate(): Invalid number/bad type of parameter." ); return NULL; } - } else { - katana->runNegociate(); - } HCATCH Py_RETURN_NONE; } @@ -313,7 +321,7 @@ extern "C" { , "Run the layer assigment stage." } , { "runNegociatePreRouted", (PyCFunction)PyKatanaEngine_runNegociatePreRouted, METH_NOARGS , "Run the negociation stage for pre-routed of the detailed router." } - , { "runNegociate" , (PyCFunction)PyKatanaEngine_runNegociate , METH_NOARGS + , { "runNegociate" , (PyCFunction)PyKatanaEngine_runNegociate , METH_VARARGS , "Run the negociation stage of the detailed router." } , { "finalizeLayout" , (PyCFunction)PyKatanaEngine_finalizeLayout , METH_NOARGS , "Revert to a pure Hurricane database, remove router's additionnal data structures." } @@ -342,6 +350,14 @@ extern "C" { DBoLinkCreateMethod(KatanaEngine) + extern void PyKatanaEngine_postModuleInit () + { + PyKatanaFlags_postModuleInit(); + + PyDict_SetItemString( PyTypeKatanaEngine.tp_dict, "Flags", (PyObject*)&PyTypeKatanaFlags ); + } + + #endif // Shared Library Code Part. } // extern "C". diff --git a/katana/src/PyKatanaFlags.cpp b/katana/src/PyKatanaFlags.cpp new file mode 100644 index 00000000..0de7f5a7 --- /dev/null +++ b/katana/src/PyKatanaFlags.cpp @@ -0,0 +1,107 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2017-2017, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Module : "./PyKatanaFlags.cpp" | +// +-----------------------------------------------------------------+ + + +#include "katana/PyKatanaFlags.h" + + +namespace Katana { + + using std::cerr; + using std::endl; + using std::hex; + using std::ostringstream; + using Hurricane::tab; + using Hurricane::Error; + using Hurricane::Warning; + using Isobar::ProxyProperty; + using Isobar::ProxyError; + using Isobar::ConstructorError; + using Isobar::HurricaneError; + using Isobar::HurricaneWarning; + using Isobar::ParseOneArg; + using Isobar::ParseTwoArg; + + +extern "C" { + + +#define METHOD_HEAD(function) GENERIC_METHOD_HEAD(Flags,flags,function) + + +// +=================================================================+ +// | "PyKatanaFlags" Python Module Code Part | +// +=================================================================+ + +#if defined(__PYTHON_MODULE__) + + + // Standart Accessors (Attributes). + + + // Standart Destroy (Attribute). + // DBoDestroyAttribute(PyKatanaFlags_destroy,PyKatanaFlags) + + + PyMethodDef PyKatanaFlags_Methods[] = + { {NULL, NULL, 0, NULL} /* sentinel */ + }; + + + PythonOnlyDeleteMethod(KatanaFlags) + DirectReprMethod(PyKatanaFlags_Repr, PyKatanaFlags, Katana::Flags) + DirectStrMethod (PyKatanaFlags_Str, PyKatanaFlags, Katana::Flags) + DirectCmpMethod (PyKatanaFlags_Cmp, IsPyKatanaFlags, PyKatanaFlags) + DirectHashMethod(PyKatanaFlags_Hash, PyKatanaFlags) + + extern void PyKatanaFlags_LinkPyType() { + cdebug_log(20,0) << "PyKatanaFlags_LinkType()" << endl; + PyTypeKatanaFlags.tp_dealloc = (destructor) PyKatanaFlags_DeAlloc; + PyTypeKatanaFlags.tp_compare = (cmpfunc) PyKatanaFlags_Cmp; + PyTypeKatanaFlags.tp_repr = (reprfunc) PyKatanaFlags_Repr; + PyTypeKatanaFlags.tp_str = (reprfunc) PyKatanaFlags_Str; + PyTypeKatanaFlags.tp_hash = (hashfunc) PyKatanaFlags_Hash; + PyTypeKatanaFlags.tp_methods = PyKatanaFlags_Methods; + } + + +#else // End of Python Module Code Part. + + +// +=================================================================+ +// | "PyKatanaFlags" Shared Library Code Part | +// +=================================================================+ + + // Link/Creation Method. + PyTypeObjectDefinitions(KatanaFlags) + + + extern void PyKatanaFlags_postModuleInit () + { + PyObject* constant; + + LoadObjectConstant(PyTypeKatanaFlags.tp_dict,Katana::Flags::NoFlags ,"NoFlags" ); + LoadObjectConstant(PyTypeKatanaFlags.tp_dict,Katana::Flags::SlowMotion ,"SlowMotion" ); + LoadObjectConstant(PyTypeKatanaFlags.tp_dict,Katana::Flags::PreRoutedStage,"PreRoutedStage"); + LoadObjectConstant(PyTypeKatanaFlags.tp_dict,Katana::Flags::SymmetricStage,"SymmetricStage"); + } + + +#endif // Shared Library Code Part. + +} // extern "C". + +} // Katana namespace. + diff --git a/katana/src/RoutingEvent.cpp b/katana/src/RoutingEvent.cpp index f161e3ca..4bb61ef1 100644 --- a/katana/src/RoutingEvent.cpp +++ b/katana/src/RoutingEvent.cpp @@ -82,9 +82,11 @@ namespace Katana { // Process all M2 (terminal access) before any others. //if ((lhs._layerDepth == 1) and (rhs._layerDepth != 1)) return false; //if ((lhs._layerDepth != 1) and (rhs._layerDepth == 1)) return true; + if (lhs._layerDepth > rhs._layerDepth) return true; + if (lhs._layerDepth < rhs._layerDepth) return false; - if (lhs._priority > rhs._priority) return true; - if (lhs._priority < rhs._priority) return false; + if (lhs._priority > rhs._priority) return false; + if (lhs._priority < rhs._priority) return true; if (lhs._length > rhs._length) return false; if (lhs._length < rhs._length) return true; diff --git a/katana/src/katana/PyKatanaEngine.h b/katana/src/katana/PyKatanaEngine.h index ba20339f..0f1f4976 100644 --- a/katana/src/katana/PyKatanaEngine.h +++ b/katana/src/katana/PyKatanaEngine.h @@ -41,8 +41,9 @@ extern "C" { extern PyTypeObject PyTypeKatanaEngine; extern PyMethodDef PyKatanaEngine_Methods[]; - extern PyObject* PyKatanaEngine_Link ( Katana::KatanaEngine* ); - extern void PyKatanaEngine_LinkPyType (); + extern PyObject* PyKatanaEngine_Link ( Katana::KatanaEngine* ); + extern void PyKatanaEngine_LinkPyType (); + extern void PyKatanaEngine_postModuleInit (); #define IsPyKatanaEngine(v) ( (v)->ob_type == &PyTypeKatanaEngine ) diff --git a/katana/src/katana/PyKatanaFlags.h b/katana/src/katana/PyKatanaFlags.h new file mode 100644 index 00000000..1c915add --- /dev/null +++ b/katana/src/katana/PyKatanaFlags.h @@ -0,0 +1,59 @@ +// -*- C++ -*- +// +// This file is part of the Coriolis Software. +// Copyright (c) UPMC 2017-2017, All Rights Reserved +// +// +-----------------------------------------------------------------+ +// | C O R I O L I S | +// | K i t e - D e t a i l e d R o u t e r | +// | | +// | Author : Jean-Paul CHAPUT | +// | E-mail : Jean-Paul.Chaput@lip6.fr | +// | =============================================================== | +// | C++ Header : "./katana/PyKatanaFlags.h" | +// +-----------------------------------------------------------------+ + + +#ifndef PY_KATANA_FLAGS_H +#define PY_KATANA_FLAGS_H + + +#include "hurricane/isobar/PyHurricane.h" +#include "katana/Constants.h" + + +namespace Katana { + + extern "C" { + + +// ------------------------------------------------------------------- +// Python Object : "PyTransformation". + + typedef struct { + PyObject_HEAD + Katana::Flags* _object; + } PyKatanaFlags; + + +// ------------------------------------------------------------------- +// Functions & Types exported to "PyHurricane.ccp". + + extern PyTypeObject PyTypeKatanaFlags; + extern PyMethodDef PyKatanaFlags_Methods[]; + + extern PyObject* PyKatanaFlags_Link ( Katana::Flags* ); + extern void PyKatanaFlags_LinkPyType (); + extern void PyKatanaFlags_postModuleInit (); + + +# define IsPyKatanaFlags(v) ( (v)->ob_type == &PyTypeKatanaFlags ) +# define PYKATANAFLAGS(v) ( (PyKatanaFlags*)(v) ) +# define PYKATANAFLAGS_O(v) ( PYKATANAFLAGS(v)->_object ) + + + } // extern "C". + +} // Katana namespace. + +#endif // PY_KATANA_FLAGS_H diff --git a/kite/CMakeLists.txt b/kite/CMakeLists.txt index 05332ef8..5ba6993d 100644 --- a/kite/CMakeLists.txt +++ b/kite/CMakeLists.txt @@ -18,7 +18,7 @@ setup_qt() find_package(LibXml2 REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(LEFDEF REQUIRED) diff --git a/mauka/CMakeLists.txt b/mauka/CMakeLists.txt index 0c1ee3f1..47b944b6 100644 --- a/mauka/CMakeLists.txt +++ b/mauka/CMakeLists.txt @@ -15,7 +15,7 @@ setup_boost(program_options filesystem regex python) setup_qt() - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/metis/CMakeLists.txt b/metis/CMakeLists.txt index c6be2042..bc10d065 100644 --- a/metis/CMakeLists.txt +++ b/metis/CMakeLists.txt @@ -14,7 +14,7 @@ set_lib_link_mode() setup_boost() - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/nimbus/CMakeLists.txt b/nimbus/CMakeLists.txt index 70215b52..6f0d7764 100644 --- a/nimbus/CMakeLists.txt +++ b/nimbus/CMakeLists.txt @@ -14,7 +14,7 @@ setup_boost(program_options filesystem python regex) setup_qt() - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/stratus1/CMakeLists.txt b/stratus1/CMakeLists.txt index 5763e437..aac721ee 100644 --- a/stratus1/CMakeLists.txt +++ b/stratus1/CMakeLists.txt @@ -17,7 +17,7 @@ set_lib_link_mode() setup_sysconfdir("${CMAKE_INSTALL_PREFIX}") - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(VLSISAPD REQUIRED) find_package(HURRICANE REQUIRED) diff --git a/unicorn/CMakeLists.txt b/unicorn/CMakeLists.txt index 3349bd1e..cd53b09b 100644 --- a/unicorn/CMakeLists.txt +++ b/unicorn/CMakeLists.txt @@ -17,7 +17,7 @@ find_package(Libbfd) find_package(LibXml2 REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(PythonSitePackages REQUIRED) find_package(LEFDEF REQUIRED) find_package(COLOQUINTE) diff --git a/vlsisapd/CMakeLists.txt b/vlsisapd/CMakeLists.txt index 9799c64c..61fd8bda 100644 --- a/vlsisapd/CMakeLists.txt +++ b/vlsisapd/CMakeLists.txt @@ -16,7 +16,7 @@ find_package(LibXml2 REQUIRED) find_package(PythonSitePackages REQUIRED) - find_package(PythonLibs REQUIRED) + find_package(PythonLibs 2.7 REQUIRED) find_package(BISON REQUIRED) find_package(FLEX REQUIRED) find_package(Doxygen) diff --git a/vlsisapd/src/liberty/src/LibertyParserScanner.ll b/vlsisapd/src/liberty/src/LibertyParserScanner.ll index e03820d3..220a2565 100644 --- a/vlsisapd/src/liberty/src/LibertyParserScanner.ll +++ b/vlsisapd/src/liberty/src/LibertyParserScanner.ll @@ -13,11 +13,7 @@ static double floatToken; static std::string nameToken; -#ifndef FLEX_BETA - int Liberty_lineno = 1; -#else extern int Liberty_lineno; -#endif