Commit Graph

124 Commits

Author SHA1 Message Date
Butta d3f8fea119 libllvm: set default sysroot to TERMUX_PREFIX
The previous approach appended TERMUX_PREFIX to the empty default sysroot, which would
render those paths useless if the --sysroot command-line flag was ever set. With this
approach, clang reuses much more of the existing sysroot logic and makes it more
likely that a passed-in sysroot will work.

Also, remove the rpath for alternate architectures, as it wasn't working.
2020-03-29 23:06:18 +03:00
buttaface 3daf83feb3 libllvm: fix Android versioning regression that broke setting PIE on ARM (#5078) 2020-03-26 13:53:28 +01:00
Leonid Pliushch 496a4a290d libllvm: bump revision 2020-03-25 01:21:31 +02:00
Butta a1e1440c9d libllvm: check usr/include instead of usr/local/include for headers 2020-03-25 01:19:42 +02:00
Leonid Pliushch b4ba5fad47 libllvm: rebuild
See https://github.com/termux/termux-packages/issues/4987.
2020-03-01 01:56:21 +02:00
Butta 3af25bc2a9 Introduce TERMUX_PKG_QUICK_REBUILD
This new variable is extremely useful when iterating on creating a large package,
as otherwise you have to wipe the source and rebuild each time you make a mistake
with the patches or build.sh script.

Simply set TERMUX_PKG_QUICK_REBUILD=true in build.sh if a build fails and then the
TERMUX_PKG_SRCDIR and TERMUX_PKG_BUILDDIR will not be touched when you rebuild,
including that the patches will not be applied again. When you're done iterating,
diff for any new patches, save them, and remove this variable before rebuilding
from scratch, hopefully for the last time. ;)

An example is shown for the giant libllvm package, where other modifications are
also excluded if this variable is set.
2020-02-15 13:38:30 +05:30
its-pointless 0379a2e8fc llvm-9.0.1 2019-12-23 09:26:20 +11:00
Leonid Pliushch b436e0de81 libllvm: rebuild package 2019-12-04 14:24:21 +02:00
Henrik Grimler e3db425e59 libllvm: add experimental target avr
Works on aarch64, at least
2019-11-17 14:44:46 +01:00
its-pointless 8e72ae8a1d update to llvm9 and fix tools in rust 2019-10-22 23:47:58 +02:00
Leonid Pliushch 5c4cd6b448 Revert "libllvm: use armv7a-linux-androideabi as default target triple"
Reverting because it introduces libunwind-related issues.

This reverts commit 24f1a9a07c33abfee162f8e4fe4002d320abc908.
2019-09-23 10:42:36 +03:00
Leonid Pliushch 48af93849f libllvm: use armv7a-linux-androideabi as default target triple
Because it defaults to armv4t on ARM otherwise.
2019-09-23 00:32:57 +03:00
Butta f82e5d7244 libllvm: don't add arch-specific rpath when natively compiling 2019-09-06 19:19:20 +03:00
Leonid Pliushch e48948922b libllvm: bump revision 2019-09-06 00:49:54 +03:00
its-pointless 35715dae0f don't search multilib dir for native 2019-09-06 00:49:11 +03:00
its-pointless 5a467757d4 get search path order correct 2019-09-06 00:49:11 +03:00
its-pointless d1fcb29c6e fix ndk-multilib 2019-09-06 00:49:11 +03:00
Fredrik Fornwall 73c9a3b2b6 libllvm: Update from 8.0.0 to 8.0.1 2019-08-21 10:03:58 +02:00
Leonid Pliushch 52ceb56d3f build-package.sh: more fixes 2019-08-13 02:03:52 +03:00
Leonid Pliushch c352216c63 packages: standardize values of several control variables for build.sh
Variables

 TERMUX_PKG_PLATFORM_INDEPENDENT
 TERMUX_DEBUG
 TERMUX_PKG_HAS_DEBUG
 TERMUX_PKG_ESSENTIAL
 TERMUX_SUBPKG_ESSENTIAL
 TERMUX_PKG_NO_STATICSPLIT
 TERMUX_PKG_BUILD_IN_SRC
 TERMUX_PKG_FORCE_CMAKE
 TERMUX_PKG_HOSTBUILD

should not accept arbitrary values for marking them "enabled". Instead
they should accept boolean values which makes them easier to handle and
also makes their meaning clear.

build-package.sh should make decision based on variable's value but not on
whether it is set or empty.

%ci:no-build
2019-08-12 18:49:13 +03:00
Leonid Pliushch 6e70277fb3 no more develsplit + provide static libraries as separate package
%ci:no-build
2019-07-28 21:17:12 +03:00
Leonid Pliushch a9b08c2cc8 libffi: disable versioning + rebuild dependent packages 2019-06-28 20:34:04 +03:00
Leonid Pliushch 3fa55cde24 libllvm & lldb: bump revision
%ci:reset-backlog
2019-06-19 21:46:11 +03:00
Henrik Grimler 940ed9d180 libllvm: add note about debug build status 2019-06-01 11:17:01 +02:00
Tom Yan 1e1167bc1f libllvm: make clang++ order -lm after -lgcc
Without this patch, libm will be linked before libgcc (which is a linker script that links to both libunwind and libgcc_real); as libm.so in our system exports unwind symbols, it prevents the built objects from being linked to the unwinders properly.

Since libm is a part of bionic, we can't ship it like we do for libc++_shared or zlib. Therefore, patching clang++ is probably the only way.
2019-05-16 20:18:48 +03:00
Leonid Pliushch 383dd9a59c libllvm: bump revision after 0d1170cc 2019-05-06 20:17:59 +03:00
Leonid Pliushch 11200afa32 add zlib to dependencies where needed 2019-04-14 16:00:23 +03:00
Leonid Pliushch f74c1c33e0 libllvm: bump revision after fixes 2019-04-06 22:53:25 +03:00
its-pointless 84abb50258 libomp x86_64 fix 2019-04-06 02:59:28 +03:00
its-pointless 99341f1f69 clang-tblgen and llvm-tblgen 2019-03-29 01:28:49 +02:00
its-pointless 59625ccecd llvm-8 and rust with back ports for llvm-8 2019-03-29 01:28:11 +02:00
its-pointless a4a2aa589a add rpath for clang as default 2019-03-16 02:06:26 +02:00
its-pointless 857cc35f35 make sysroot works properly 2019-02-27 01:49:43 +02:00
Fredrik Fornwall 6f8d64a790 Merge branch 'master' into readline 2019-02-24 20:41:00 +02:00
its-pointless 3a7767de4d fix lib search paths for x86_64 and compatiblity 2019-02-24 20:39:35 +02:00
its-pointless 50decd816b r19b update 2019-02-24 20:39:35 +02:00
Leonid Pliushch 2c16db52fc bump C++ packages for NDK-19 2019-02-23 13:57:09 +02:00
Wetitpig 7ddcce5701 No backticks 2019-02-15 18:01:09 +02:00
Wetitpig 13cec16263 Spaces to tabs 2019-02-09 21:06:31 +02:00
Wetitpig 5f8864c10d Improve formatting of parantheses for functions 2019-02-09 21:06:31 +02:00
Leonid Pliushch 46d333adba add licenses for more packages 2019-01-21 17:17:53 +02:00
Fredrik Fornwall 29fbd63e62 llvm: Update from 7.0.0 to 7.0.1 2018-12-28 00:58:45 +01:00
Fredrik Fornwall e5805d0d19 Use python3 when building llvm 2018-10-14 23:12:36 +02:00
Fredrik Fornwall 64fb69a9c8 llvm: Update from 6.0.1 to 7.0.0 2018-09-20 02:22:52 +02:00
Fredrik Fornwall f1bad037d2 libllvm: Support building with ninja 2018-08-22 07:56:49 +02:00
Fredrik Fornwall 1d012a2173 llvm: Update from 6.0.0 to 6.0.1 2018-07-01 16:55:15 +02:00
Fredrik Fornwall 627186360b Bump libllvm which uses libc++ 2018-06-26 10:49:51 +02:00
Henrik Grimler 71594b6ea5 Allow TERMUX_PKG_SRCURL and TERMUX_PKG_SHA256 to be arrays (#2506)
* build-package.sh: allow for arrays in TERMUX_PKG_{SRCURL,SHA256}

Packages that require several source archives can then set these parameters to
arrays instead of downloading them "manually" in termux_step_post_extract.

Downloaded files are extracted into subfolders in TERMUX_PKG_SRCDIR.

Tested for backward compatibility in a couple of packages and the combinations
tar + tar, zip + tar, tar + zip, zip + zip.

* perl: download perl-cross through TERMUX_PKG_SRCURL

* perl: remove $PREFIX/{lib/libperl.so,include/perl} before build

Otherwise building perl twice doesn't give the same results, symlinks are
messed up.

Also remove old remnant from when there was a Kid.pm.patch.

* bash: fix tiny typo

* ecj: remove hardcoded SHA256 and pkg version

* elfutils: download argp-standalone through TERMUX_PKG_SRCURL

* ldc: download all src archives through TERMUX_PKG_SRCURL

* libgc: download libatomic_ops through TERMUX_PKG_SRCURL

* libllvm: download all src archives through TERMUX_PKG_SRCURL

* linux-man-pages: download src archives through TERMUX_PKG_SRCURL

* ncurses: download all src archives through TERMUX_PKG_SRCURL

* pngquant: download lib sources through TERMUX_PKG_SRCURL

Use .zip for lib since the downloaded archives are otherwise both named
$TERMUX_PKG_VERSION.tar.gz and replace each other. This causes caching to
not work.
2018-06-13 02:15:26 +02:00
Henrik Grimler c1b82abd09 Add fixes for debug builds (#2296)
* build-package.sh: add possibility for debug patches and TERMUX_PKG_HAS_DEBUG

Setting TERMUX_PKG_HAS_DEBUG=no disables attempt to build debug build of
package.
Useful for example if a debug build doesn't make sense, as for python-packages
and texlive.

* aapt: skip D_FORTIFY_SOURCE=2 for libandroid-cutils when doing debug build

* lftp: skip D_FORTIFY_SOURCE=2 for debug build

* libflac: don't use -g3 for debug build

Configure script removes it otherwise.

* nano: skip -D_FORTIFY_SOURCE=2 for debug build

* vifm: skip -D_FORTIFY_SOURCE=2 for debug build

* mc: skip -D_FORTIFY_SOURCE=2 for debug build

* dropbear: add __attribute__((overloadable)) to XMEMSET and XMEMCPY if debug

* gdb: add __attribute__((overloadable)) to strchr if debug

* gnuit: add __attribute__((overloadable)) to strchr and strcpy if debug

* gperf: add __attribute__((overloadable)) to strlen if debug

* inetutils: add __attribute__((overloadable)) to strrchr and strchr if debug

* readline: add __attribute__((overloadable)) to strchr if debug

* tsocks: add __attribute__((overloadable)) to poll if debug

* units: add __attribute__((overloadable)) to strchr if debug

* liblua: fix bug in loslib.c that emerged in debug build

Use strncpy instead of strcpy.
Original error message:
loslib.c:169:3: error: 'strcpy' called with string bigger than buffer
  lua_tmpnam(buff, err);
  ^
loslib.c:122:37: note: expanded from macro 'lua_tmpnam'
       strcpy(b, LUA_TMPNAMTEMPLATE); \
                                   ^

* alpine: include our getpass.h in imap's mtest.c to declare getpass

Debug build complained about the previous implicit declaration.

* nginx: use --with-debug instead of --debug

* cboard: skip -D_FORTIFY_SOURCE=2 for debug build

* gettext: add __attribute__((overloadable)) to getcwd if debug

* oathtool: skip -D_FORTIFY_SOURCE=2 for debug build

* php: add __attribute__((overloadable)) to strlcpy and strlcat if debug

* expect: add __attribute__((overloadable)) to strchr if debug

* texlive: set TERMUX_PKG_HAS_DEBUG=no

* asciinema: set TERMUX_PKG_HAS_DEBUG=no

* libllvm: set TERMUX_PKG_HAS_DEBUG=no

Debug build fails with:
home/builder/.termux-build/libllvm/src/lib/Support/Unix/Path.inc:740:19: error: no matching function for call to 'RetryAfterSignal'                                                                                                      if ((ResultFD = sys::RetryAfterSignal(-1, open, P.begin(), OpenFlags)) < 0)

* build-package.sh: set TERMUX_PKG_REPLACES=package if debug build

Hopefully allows us to install debug packages without breaking dependecies.

Should be looked over and be made more similar to how debian does this in any case

* Update build.sh
2018-06-13 02:12:36 +02:00
Vishal Biswas 160d3aeb06 update ndk to 17 and switch some packages to clang build (#2415)
* update ndk to 17

* bump NDK version in setup-android script

* libnl: fix for ndk r17

* libpixman: use clang's __builtin_shufflevector instead of __builtin_shuffle (#1)

Required to make package build with ndk17.

* fix as for arm

* ndk17 still uses ld.bfd on aarch64

* use -fno-integrated-as for clang only

* glib: remove patch unnecessary after ndk17

* torsocks: remove unneeded patch after ndk17

* subversion: fix build as clang++ now errors out for mismatched flags

* libpulseaudio: fix build with ndk17

https://github.com/termux/termux-packages/pull/2415#issuecomment-388296684

* gst-plugins-good: disable video4linux2

ioctl is defined as __overloadable in ndk17 headers which
  conflicts with v4l2object's member ioctl

* libzmq: disable Werror to build with ndk17

* ltrace: hardcode symbol not available in ndk17

* busybox: build with clang for all arches except arm

* dropbear: build with clang instead of gcc

* gnupg: build with clang instead of gcc

* openssl: use clang for all arches except arm

* picolisp: build with clang instead of gcc

* valgrind: use clang on all arches except aarch64

* Revert "gst-plugins-good: disable video4linux2"

This reverts commit 43850b81ccf60033c25cb13dfd326c1b0528773a.
Already applied on base branch.

* libllvm: use default arm triple
2018-05-27 14:55:20 +02:00
its-pointless 0f7cb9b760 fixes lldb on arm only not working properly on i386 now 2018-05-13 01:14:10 +02:00
Fredrik Fornwall 83d687abf5 libllvm: Fix building under ubuntu 18.04 2018-04-30 01:25:14 +02:00
its-pointless abd06e6437 llvm fixes using jit and calling getProcessTriple (#2299)
* llvm fixes using jit and calling getProcessTriple

* works properly with rustc

* this allows python llvmlite to built
2018-04-07 00:50:40 +02:00
its-pointless db75340215 llvm: Update from 5.0.1 to 6.0
Also build our own libomp.
2018-03-20 23:10:53 +01:00
tomty89 7072d99dd7 Ship libgcc in ndk-sysroot and ndk-multilib (#2146) 2018-02-15 17:57:03 +01:00
Fredrik Fornwall 329aab67ca libllvm: Update from 5.0 to 5.0.1 2017-12-26 23:27:38 +01:00
Fredrik Fornwall 11e67255be libllvm: Bump revision after patch 2017-11-17 02:13:32 +01:00
Vladimir Serbinenko d13180c3f3 Add LLD package.
LLD is LLVM-based multi-platform linker. Together with cross-compiling
clang it can be used to create binaries for other platforms.
2017-11-16 23:36:10 +01:00
Vladimir Serbinenko 13a86d8959 Currently the only clang available on termux compiles for termux. This
patc allows clang to be used in cross-compilations. E.g. to compile 32-bit
binaries on 64-bit termux.
2017-11-16 23:36:10 +01:00
Fredrik Fornwall a2a151d3d1 llvm: Update src urls 2017-11-15 16:49:33 +01:00
Fredrik Fornwall 91e71e98cf llvm&clang: Update from 4.0.1 to 5.0.0 2017-09-10 21:50:24 +02:00
Fredrik Fornwall 8a175a5523 libllvm: Fix patch and bump revision 2017-09-02 02:30:19 +02:00
Vladimir Serbinenko 0b0122e72a clang: Disable calling into gcc from clang.
Clang calls into gcc if it tries to compile a language it doesn't understand.
On termux gcc is a symlink to clang, so this leads into fork loop until
the whole system runs out of memory.
2017-09-02 01:45:45 +02:00
Fredrik Fornwall 2087626916 libllvm: Bump revision after enabling openmp 2017-08-20 20:28:41 +02:00
Joakim bf6a9b28b9 clang: add OpenMP library, should now work 2017-08-20 13:48:48 +02:00
Fredrik Fornwall 6c29aaa1c7 Transition from gnustl to libc++
This will make things as std::to_string() and other C++ features
work with a modern and supported C++ library.

We package up libc++_shared.so and bump the revision of every C++
using package to make it rebuild against it.

Users who have built C++ using libraries or programs will probably
need to rebuild them if they are linked against Termux-supplied
libraries, as user code was previously linked against gnustl while
the system libraries are now using libc++, and it's not a good idea
to mix C++ standard libraries in a program.
2017-07-14 00:23:37 +02:00
Fredrik Fornwall a39f862d68 llvm&clang: Update from 4.0.0 to 4.0.1 2017-07-04 13:45:47 +02:00
Vishal Biswas c4a1b6a804 libllvm: add llvm-config helper script (#917)
* libllvm: add llvm-config helper script

* libllvm: add components to llvm-config wrapper

* libllvm: restructure llvm-config.in

* libllvm: remove unsupported gcc flags from llvm-config

* libllvm: use full libfile path for --libs

* libllvm: fix has_rtti in llvm-config

* libllvm: add cmake files path in llvm-config
2017-07-01 02:41:21 +02:00
joakim-noah a423c35db9 Small tweaks to pcre and libllvm (#1103)
* pcre: add JIT functions

* libllvm: remove unnecessary dependency on Python 2.7
2017-06-22 14:28:30 +02:00
Fredrik Fornwall a2fde239ab Use local variables in bash functions 2017-04-09 16:54:36 +02:00
Fredrik Fornwall d6e574615c llvm&clang: Update from 3.9.1 to 4.0.0 2017-03-15 16:28:36 +01:00
Fredrik Fornwall 72f69cdc35 Use termux_error_exit in more cases 2017-03-05 03:30:38 +01:00
Fredrik Fornwall 95e60146d7 libllvm: Bump revision, enable the clang split 2017-02-26 14:52:04 +01:00
Fredrik Fornwall edc3049a03 clang: Split up into several packages
Split up the previous clang package into:

- libllvm: lib/libLLVM.so
- libclang: lib/libclang.so
- clang: bin/clang and associated tools and symlinks
- llvm: The bin/llvm-* tools
2017-02-12 20:57:51 +01:00