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

allow for build directory different than source directory #9

Merged
merged 1 commit into from
Aug 13, 2015
Merged

Conversation

sthalik
Copy link
Contributor

@sthalik sthalik commented Aug 12, 2015

The autotools machinery assumes top_srcdir to be the root of the build directory. This breaks building in different locations, like "build/" subdirectory.

@tpoechtrager
Copy link
Owner

Thanks! Please add this minor change to your PR to avoid breaking the LTO build:

diff --git a/cctools/m4/llvm.m4 b/cctools/m4/llvm.m4
index a3e28ec..29dafca 100644
--- a/cctools/m4/llvm.m4
+++ b/cctools/m4/llvm.m4
@@ -39,7 +39,7 @@ AC_DEFUN([CHECK_LLVM],
                LTO_DEF=-DLTO_SUPPORT
                # DO NOT include the LLVM include dir directly,
                # it may cause the build to fail.
-               `cp -r $LLVM_INCLUDE_DIR/llvm-c/lto.h include/llvm-c/lto.h 2>/dev/null 1>&2`
+               cp -f $LLVM_INCLUDE_DIR/llvm-c/lto.h `dirname ${0}`/include/llvm-c/lto.h
                AC_SUBST([LTO_DEF])
                AC_SUBST([LTO_RPATH])
                AC_SUBST([LTO_LIB]) ])

@sthalik
Copy link
Contributor Author

sthalik commented Aug 13, 2015

Rebased.

tpoechtrager added a commit that referenced this pull request Aug 13, 2015
allow for build directory different than source directory
@tpoechtrager tpoechtrager merged commit e0b2658 into tpoechtrager:master Aug 13, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants