| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | # $NetBSD: Makefile,v 1.3 2015/04/25 20:20:32 tnn Exp $ | | 1 | # $NetBSD: Makefile,v 1.4 2015/04/25 22:06:42 tnn Exp $ |
2 | | | 2 | |
3 | PKGNAME= ${DISTNAME:S/clang/libLLVM/} | | 3 | PKGNAME= ${DISTNAME:S/clang/libLLVM/} |
4 | PKGREVISION= 1 | | 4 | PKGREVISION= 1 |
5 | | | 5 | |
6 | CONFIGURE_ARGS+= --enable-shared | | 6 | CONFIGURE_ARGS+= --enable-shared |
7 | MAKE_ENV+= ENABLE_PIC=1 | | 7 | MAKE_ENV+= ENABLE_PIC=1 |
8 | MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/Release/lib | | 8 | MAKE_ENV+= LD_LIBRARY_PATH=${WRKSRC}/Release/lib |
9 | | | 9 | |
10 | BUILD_TARGET= libs-only | | 10 | BUILD_TARGET= libs-only |
11 | INSTALL_TARGET= install-libs | | 11 | INSTALL_TARGET= install-libs |
12 | PYTHON_FOR_BUILD_ONLY= yes | | 12 | PYTHON_FOR_BUILD_ONLY= yes |
13 | | | 13 | |
14 | SUBST_CLASSES+= fix-pfx | | 14 | SUBST_CLASSES+= fix-pfx |
| @@ -23,29 +23,14 @@ SUBST_SED.fix-pfx+= -e 's,(PROJ_prefix)/ | | | @@ -23,29 +23,14 @@ SUBST_SED.fix-pfx+= -e 's,(PROJ_prefix)/ |
23 | | | 23 | |
24 | SUBST_CLASSES+= fix-cnf | | 24 | SUBST_CLASSES+= fix-cnf |
25 | SUBST_STAGE.fix-cnf= pre-configure | | 25 | SUBST_STAGE.fix-cnf= pre-configure |
26 | SUBST_MESSAGE.fix-cnf= Fixing llvm-config paths | | 26 | SUBST_MESSAGE.fix-cnf= Fixing llvm-config paths |
27 | SUBST_FILES.fix-cnf= tools/llvm-config/llvm-config.cpp | | 27 | SUBST_FILES.fix-cnf= tools/llvm-config/llvm-config.cpp |
28 | SUBST_SED.fix-cnf= -e 's|ActivePrefix + "/include"|"${PREFIX}/include/libLLVM"|g' | | 28 | SUBST_SED.fix-cnf= -e 's|ActivePrefix + "/include"|"${PREFIX}/include/libLLVM"|g' |
29 | SUBST_SED.fix-cnf+= -e 's|ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX|"${PREFIX}/lib/libLLVM"|g' | | 29 | SUBST_SED.fix-cnf+= -e 's|ActivePrefix + "/lib" + LLVM_LIBDIR_SUFFIX|"${PREFIX}/lib/libLLVM"|g' |
30 | SUBST_SED.fix-cnf+= -e 's|"-L" << ActiveLibDir|"${COMPILER_RPATH_FLAG}" << ActiveLibDir << " " << &|g' | | 30 | SUBST_SED.fix-cnf+= -e 's|"-L" << ActiveLibDir|"${COMPILER_RPATH_FLAG}" << ActiveLibDir << " " << &|g' |
31 | | | 31 | |
32 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/libLLVM | | 32 | LDFLAGS+= ${COMPILER_RPATH_FLAG}${PREFIX}/lib/libLLVM |
33 | | | 33 | |
34 | INSTALLATION_DIRS+= lib/libLLVM | | 34 | INSTALLATION_DIRS+= lib/libLLVM |
35 | | | 35 | |
36 | # XXX temporary band-aid for wrapper reordering bug until we have a proper fix | | | |
37 | # | | | |
38 | # Wrappers incorrectly reorder: | | | |
39 | # | | | |
40 | # -Wl,--whole-archive -lmystaticlib -Wl,--no-whole-archive | | | |
41 | # | | | |
42 | # to | | | |
43 | # | | | |
44 | # -Wl,--whole-archive -Wl,--no-whole-archive -lmystaticlib | | | |
45 | # | | | |
46 | # Which nullies the effect of --whole-archive. | | | |
47 | # Kludge around this by removing --no-whole-archive from the command line. | | | |
48 | # It happens to be safe in this particular case, as far as I can tell. | | | |
49 | BUILDLINK_TRANSFORM+= rm:-Wl,--no-whole-archive | | | |
50 | | | | |
51 | .include "../../lang/clang/Makefile.common" | | 36 | .include "../../lang/clang/Makefile.common" |