Commit 4632b4af authored by Kevin Modzelewski's avatar Kevin Modzelewski

Change installation instructions to install libunwind locally

Also, set -Wno-extern-c-compat to silence libunwind-related warnings.
Fixes #27, hopefully for real this time.
parent a90b6f42
......@@ -59,10 +59,12 @@ There seem to be some lingering issues with the LLVM build that haven't been ide
cd ~/pyston_deps
wget http://download.savannah.gnu.org/releases/libunwind/libunwind-1.1.tar.gz
tar xvf libunwind-1.1.tar.gz
mkdir libunwind-1.1-install
cd libunwind-1.1
./configure
# disable shared libraries because we'll be installing this in a place that the loader can't find it.
./configure --prefix=$HOME/pyston_deps/libunwind-1.1-install --enable-shared=0
make -j4
sudo make install
make install
```
TODO would be nice to install this locally like the rest of the dependencies
......
......@@ -121,6 +121,12 @@ COMMON_CXXFLAGS += -Wno-unused-parameter # should use the "unused" attribute
# Or everything:
# COMMON_CXXFLAGS += -Weverything
# libunwind's include files warn on -Wextern-c-compat, so turn that off;
# ideally would just turn it off for header files in libunwind, maybe by
# having an internal libunwind.h that pushed/popped the diagnostic state,
# but it doesn't seem like that important a warning so just turn it off.
COMMON_CXXFLAGS += -I$(DEPS_DIR)/libunwind-1.1-install/include -Wno-extern-c-compat
COMMON_CXXFLAGS += -DGITREV=$(shell git rev-parse HEAD | head -c 12) -DLLVMREV=$(LLVM_REVISION)
COMMON_CXXFLAGS += -DDEFAULT_PYTHON_MAJOR_VERSION=$(PYTHON_MAJOR_VERSION) -DDEFAULT_PYTHON_MINOR_VERSION=$(PYTHON_MINOR_VERSION) -DDEFAULT_PYTHON_MICRO_VERSION=$(PYTHON_MICRO_VERSION)
......@@ -134,6 +140,8 @@ COMMON_LDFLAGS := -B../tools/build_system -L/usr/local/lib -lpthread -ldl -lcurs
# TODO should probably do the linking before MCJIT
COMMON_LDFLAGS += -Wl,-E
COMMON_LDFLAGS += -L$(DEPS_DIR)/libunwind-1.1-install/lib
# The system libstdc++ will likely be too old for Pyston, but we made a brand new one
# as part of our GCC installation. There are a couple ways to use that one instead:
# 1) Install the built libstdc++ (~/pyston_deps/gcc-4.8.2-install/lib64/libstdc++.so.6.0.18) and update the global shared library (/usr/local/x86_64-linux-gnu/libstdc++.so.6) to point to it
......
......@@ -13,18 +13,8 @@
// limitations under the License.
#define UNW_LOCAL_ONLY
#ifdef __clang__
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wextern-c-compat"
#endif
#include <libunwind.h>
#ifdef __clang__
#pragma clang diagnostic pop
#endif
#include "core/options.h"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment