its-pointless
7 years ago
committed by
Fredrik Fornwall
16 changed files with 221 additions and 60 deletions
@ -0,0 +1,3 @@ |
|||
TERMUX_SUBPKG_INCLUDE="bin/ld.gold bin/gold" |
|||
TERMUX_SUBPKG_DEPENDS="binutils" |
|||
TERMUX_SUBPKG_DESCRIPTION="gold linker" |
@ -0,0 +1,13 @@ |
|||
--- ../cache/binutils-2.30/gold/options.cc 2018-01-13 13:31:16.000000000 +0000 |
|||
+++ ./gold/options.cc 2018-03-11 23:17:59.326121534 +0000 |
|||
@@ -1227,8 +1227,8 @@ |
|||
|| this->user_set_sysroot() |
|||
|| *TARGET_SYSTEM_ROOT != '\0') |
|||
{ |
|||
- this->add_to_library_path_with_sysroot("/lib"); |
|||
- this->add_to_library_path_with_sysroot("/usr/lib"); |
|||
+ this->add_to_library_path_with_sysroot("/data/data/com.termux/files/usr/lib"); |
|||
+ this->add_to_library_path_with_sysroot("/system/lib"); |
|||
} |
|||
else |
|||
this->add_to_library_path_with_sysroot(TOOLLIBDIR); |
@ -0,0 +1,13 @@ |
|||
--- ../cache/binutils-2.30/gold/options.cc 2018-01-13 13:31:16.000000000 +0000 |
|||
+++ ./gold/options.cc 2018-03-11 23:20:26.295331766 +0000 |
|||
@@ -1227,8 +1227,8 @@ |
|||
|| this->user_set_sysroot() |
|||
|| *TARGET_SYSTEM_ROOT != '\0') |
|||
{ |
|||
- this->add_to_library_path_with_sysroot("/lib"); |
|||
- this->add_to_library_path_with_sysroot("/usr/lib"); |
|||
+ this->add_to_library_path_with_sysroot("/data/data/com.termux/files/usr/lib"); |
|||
+ this->add_to_library_path_with_sysroot("/system/lib64"); |
|||
} |
|||
else |
|||
this->add_to_library_path_with_sysroot(TOOLLIBDIR); |
@ -0,0 +1,3 @@ |
|||
TERMUX_SUBPKG_INCLUDE="lib/libLLVM*.a lib/libclang*.a lib/LTO.so include/clang" |
|||
TERMUX_SUBPKG_DESCRIPTION="C language frontend library for LLVM" |
|||
TERMUX_SUBPKG_DEPENDS="libllvm" |
@ -1,11 +1,24 @@ |
|||
TERMUX_SUBPKG_INCLUDE=" |
|||
bin/llc |
|||
bin/lli |
|||
bin/sancov |
|||
bin/sanstats |
|||
bin/llvm* |
|||
bin/obj2yaml |
|||
bin/opt |
|||
bin/verify-uselistorder |
|||
bin/yaml2obj |
|||
share/opt-viewer |
|||
bin/bugpoint |
|||
bin/clang-check |
|||
bin/scan-build |
|||
bin/scan-view |
|||
share/man/man1/llc.1 |
|||
share/man/man1/lli.1 |
|||
share/man/man1/llvm* |
|||
share/man/man1/opt.1 |
|||
share/man/man1/bugpoint.1 |
|||
share/man/man1/tblgen.1 |
|||
" |
|||
TERMUX_SUBPKG_DESCRIPTION="C language frontend for LLVM" |
|||
TERMUX_SUBPKG_DEPENDS="libllvm" |
|||
|
@ -0,0 +1,46 @@ |
|||
/*
|
|||
* Copyright (C) 2013 The Android Open Source Project |
|||
* All rights reserved. |
|||
* |
|||
* Redistribution and use in source and binary forms, with or without |
|||
* modification, are permitted provided that the following conditions |
|||
* are met: |
|||
* * Redistributions of source code must retain the above copyright |
|||
* notice, this list of conditions and the following disclaimer. |
|||
* * Redistributions in binary form must reproduce the above copyright |
|||
* notice, this list of conditions and the following disclaimer in |
|||
* the documentation and/or other materials provided with the |
|||
* distribution. |
|||
* |
|||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
|||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
|||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
|||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
|||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|||
* SUCH DAMAGE. |
|||
*/ |
|||
#ifndef ANDROID_NLTYPES_H |
|||
#define ANDROID_NLTYPES_H |
|||
|
|||
#include_next <nl_types.h> |
|||
|
|||
#ifdef __cplusplus |
|||
extern "C" { |
|||
#endif |
|||
|
|||
nl_catd catopen(const char*, int); |
|||
char* catgets(nl_catd, int, int, const char*); |
|||
int catclose(nl_catd); |
|||
|
|||
#ifdef __cplusplus |
|||
} // extern "C"
|
|||
#endif |
|||
|
|||
#endif /* ANDROID_NLTYPES_H */ |
|||
|
@ -0,0 +1,48 @@ |
|||
/*
|
|||
* Copyright (C) 2016 The Android Open Source Project |
|||
* All rights reserved. |
|||
* |
|||
* Redistribution and use in source and binary forms, with or without |
|||
* modification, are permitted provided that the following conditions |
|||
* are met: |
|||
* * Redistributions of source code must retain the above copyright |
|||
* notice, this list of conditions and the following disclaimer. |
|||
* * Redistributions in binary form must reproduce the above copyright |
|||
* notice, this list of conditions and the following disclaimer in |
|||
* the documentation and/or other materials provided with the |
|||
* distribution. |
|||
* |
|||
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS |
|||
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT |
|||
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS |
|||
* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE |
|||
* COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, |
|||
* INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, |
|||
* BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS |
|||
* OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED |
|||
* AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
|||
* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT |
|||
* OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF |
|||
* SUCH DAMAGE. |
|||
*/ |
|||
|
|||
#include <nl_types.h> |
|||
|
|||
#include <errno.h> |
|||
|
|||
__attribute__((weak,visibility("hidden"))) |
|||
nl_catd catopen(const char*, int) { |
|||
return reinterpret_cast<nl_catd>(-1); |
|||
} |
|||
|
|||
__attribute__((weak,visibility("hidden"))) |
|||
char* catgets(nl_catd, int, int, const char* message) { |
|||
return const_cast<char*>(message); |
|||
} |
|||
|
|||
__attribute__((weak,visibility("hidden"))) |
|||
int catclose(nl_catd) { |
|||
// Since we didn't hand out a valid nl_catd, you can't be returning one to us.
|
|||
errno = EBADF; |
|||
return -1; |
|||
} |
@ -0,0 +1,22 @@ |
|||
--- ../../cache/llvm-project-20170507-release_600/openmp/runtime/src/CMakeLists.txt 2018-03-02 09:50:00.000000000 +0000
|
|||
+++ ./projects/openmp/runtime/src/CMakeLists.txt 2018-03-08 03:39:14.548490023 +0000
|
|||
@@ -50,6 +50,9 @@
|
|||
if(${LIBOMP_USE_HWLOC}) |
|||
include_directories(${LIBOMP_HWLOC_INSTALL_DIR}/include) |
|||
endif() |
|||
+if(ANDROID)
|
|||
+ include_directories(${LIBOMP_SRC_DIR}/android)
|
|||
+endif()
|
|||
|
|||
# Getting correct source files to build library |
|||
set(LIBOMP_CFILES) |
|||
@@ -95,6 +98,9 @@
|
|||
libomp_append(LIBOMP_CXXFILES kmp_gsupport.cpp) |
|||
libomp_append(LIBOMP_ASMFILES z_Linux_asm.S) # Unix assembly file |
|||
endif() |
|||
+ if(ANDROID)
|
|||
+ libomp_append(LIBOMP_CXXFILES android/nltypes_stubs.cpp)
|
|||
+ endif()
|
|||
libomp_append(LIBOMP_CFILES thirdparty/ittnotify/ittnotify_static.c LIBOMP_USE_ITT_NOTIFY) |
|||
libomp_append(LIBOMP_CXXFILES kmp_debugger.cpp LIBOMP_USE_DEBUGGER) |
|||
libomp_append(LIBOMP_CXXFILES kmp_stats.cpp LIBOMP_STATS) |
@ -0,0 +1,11 @@ |
|||
--- ../cache/cfe-6.0.0.src/lib/Driver/ToolChains/Linux.cpp 2017-12-11 18:14:51.000000000 +0000
|
|||
+++ ./tools/clang/lib/Driver/ToolChains/Linux.cpp 2018-03-13 03:32:36.142985756 +0000
|
|||
@@ -816,7 +816,7 @@
|
|||
} |
|||
|
|||
bool Linux::isPIEDefault() const { |
|||
- return (getTriple().isAndroid() && !getTriple().isAndroidVersionLT(16)) ||
|
|||
+ return getTriple().isAndroid() ||
|
|||
getTriple().isMusl() || getSanitizerArgs().requiresPIE(); |
|||
} |
|||
|
@ -1,12 +1,11 @@ |
|||
diff -u -r ../llvm-5.0.0.src/tools/llvm-shlib/CMakeLists.txt ./tools/llvm-shlib/CMakeLists.txt
|
|||
--- ../llvm-5.0.0.src/tools/llvm-shlib/CMakeLists.txt 2017-07-11 03:17:44.000000000 +0200
|
|||
+++ ./tools/llvm-shlib/CMakeLists.txt 2017-09-07 23:29:50.949353365 +0200
|
|||
--- ../../cache/llvm-project-20170507-release_600/llvm/tools/llvm-shlib/CMakeLists.txt 2018-03-02 09:50:00.000000000 +0000
|
|||
+++ ./tools/llvm-shlib/CMakeLists.txt 2018-03-08 01:56:32.764107349 +0000
|
|||
@@ -37,7 +37,7 @@
|
|||
add_llvm_library(LLVM SHARED DISABLE_LLVM_LINK_LLVM_DYLIB SONAME ${SOURCES}) |
|||
|
|||
list(REMOVE_DUPLICATES LIB_NAMES) |
|||
-if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
|
|||
+if(("${CMAKE_SYSTEM_NAME}" MATCHES "^(Linux|Android)$") OR (MINGW) OR (HAIKU) OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly")) # FIXME: It should be "GNU ld for elf"
|
|||
configure_file( |
|||
${CMAKE_CURRENT_SOURCE_DIR}/simple_version_script.map.in |
|||
${LLVM_LIBRARY_DIR}/tools/llvm-shlib/simple_version_script.map) |
|||
-if(("${CMAKE_SYSTEM_NAME}" STREQUAL "Linux") OR (MINGW) OR (HAIKU)
|
|||
+if(("${CMAKE_SYSTEM_NAME}" MATCHES "^(Linux|Android)$") OR (MINGW) OR (HAIKU)
|
|||
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "FreeBSD") |
|||
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "DragonFly") |
|||
OR ("${CMAKE_SYSTEM_NAME}" STREQUAL "SunOS")) # FIXME: It should be "GNU ld for elf" |
|||
|
Loading…
Reference in new issue