Commit Graph

45 Commits

Author SHA1 Message Date
Pluto Yang 1e1bdd551a Add LoongArch CPU support 2026-07-06 13:38:08 +02:00
Xeonacid cfad36bf12 Add RISC-V cacheline fallbacks
The Linux cacheline probe first tries <linux/cache.h>, but that header is not part of the installed uapi headers on Arch Linux. When the compile probe fails, configure falls back to a host_cpu mapping and currently aborts for riscv64 with:

  Unrecognized CPU architecture (riscv64) on Linux fallback path.

Handle riscv* in both cacheline fallback maps and use a 64-byte cacheline. That matches the Linux RISC-V kernel default L1_CACHE_SHIFT value of 6 and the value reported on a riscv64 machine through getconf LEVEL1_DCACHE_LINESIZE and sysfs cache coherency_line_size.
2026-07-05 15:40:50 +02:00
Jari Sundell 44d39713d5 Clean out old cruft in autoconf scripts. 2026-06-05 00:46:47 +09:00
Jari Sundell 50a609ade9 Fixed cacheline size check. 2026-06-01 20:11:02 +09:00
Khem Raj a2e0eca6e3 scripts/common.m4: Insert spaces in shell lists
$1=$(echo "$result" | tr -d '\n')

removes all newlines without inserting spaces
That usually isn’t what we want for shell lists.
It should typically be space-separated output.

Fixes a bug seen with yocto where compiler is not a single word
but a string e.g.

ccache aarch64-yoe-linux-musl-clang++  -mcpu=cortex-a72+crc+nocrypto   --dyld-prefix=/usr -fstack-protector-strong  -O2 -D_FORTIFY_SOURCE=2 -Wformat -Wformat-security -Werror=format-security --sysroot=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/libtorrent/0.16.1/recipe-sysroot

It changes it to

ccacheaarch64-yoe-linux-musl-clang++-mcpu=cortex-a72+crc+nocrypto--dyld-prefix=/usr-fstack-protector-strong-O2-D_FORTIFY_SOURCE=2-Wformat-Wformat-security-Werror=format-security--sysroot=/mnt/b/yoe/master/build/tmp/work/cortexa72-yoe-linux-musl/libtorrent/0.16.1/recipe-sysroot

When doing c++17 checks on compiler, resulting in failure

Upstream-Status: Submitted [https://github.com/rakshasa/libtorrent/pull/583]
Signed-off-by: Khem Raj <raj.khem@gmail.com>
2025-10-25 11:30:56 +02:00
rakshasa dd8281204f Update common.m4. 2025-08-04 09:52:27 +02:00
Rosen Penev 8d562d53fc remove disabling ipv6
Doesn't look like it does anything.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-06-05 14:33:28 +02:00
Rosen Penev 1a79eec876 remove LT_SMP_CACHE_BYTES
This is used by the library, not here.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
2025-06-05 14:33:28 +02:00
rakshasa 9fe4d188e9 Cleaned up WindowHttpQueue. 2025-05-08 08:32:45 +02:00
rakshasa a5a1e2fde5 Updated common.m4. 2025-03-30 15:38:07 +02:00
Jari Sundell 1f01b7e94d Fix various macos issues. 2025-01-28 00:18:41 +09:00
Jari Sundell a6bc99bb82 Updated and cleaned up automake. (#1102) 2021-08-07 17:49:23 +09:00
rakshasa 3f72e27603 Replaced custom execinfo autoconf test. 2021-02-27 22:13:01 +09:00
Fabrice Fontaine 703cac9a42 Fix cross compilation, based on OpenWRT patch.
[Vincent: tweak the patch for version 0.13.6]
[Bernd: tweak the patch for version 0.13.7]

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Signed-off-by: Bernd Kuhls <bernd.kuhls@t-online.de>
[Retrieved from:
https://git.buildroot.net/buildroot/tree/package/libtorrent/0001-Fix-cross-compilation-based-on-OpenWRT-patch.patch]
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
2019-04-20 21:37:26 +02:00
Stephen Shkardoon f84670dd63 Use AC_COMPILE instead of AC_RUN to check for execinfo.h
This way enables cross compiling, since we don't need to run anything during the configure script.
2018-06-25 20:14:43 +12:00
rakshasa 81c652292a Added updated autoconf scripts. 2014-07-02 23:11:14 +09:00
rakshasa a536fc09a0 Updated autoconf scripts. 2014-04-01 11:49:19 +02:00
rakshasa 385b342deb Fixed typo in IPv6 option. 2013-11-22 23:03:00 +09:00
rakshasa 678049bc09 Fixed brackets in autoconf scripts. 2012-05-14 20:18:29 +09:00
rakshasa 4ff2483f07 Fixed libtinfow detection. 2012-02-27 17:40:08 +09:00
Extravagant f1852cd222 Updated with AC_LANG_SOURCE directives
Please see this informative thread on bug-autoconf:
http://www.mail-archive.com/bug-autoconf@gnu.org/msg03052.html
2012-02-12 22:23:40 +00:00
Jari Sundell 41d49b7c18 Merge branch 'master' into c++11
Conflicts:
	src/command_network.cc
2011-12-07 16:08:05 +09:00
Jari Sundell b2c1fe2afb Fixed stray comma in script causing invalid LT_SMP_CACHE_BYTES value to be set. 2011-11-30 19:34:29 +09:00
Jari Sundell 58727fe7fd Fixed compiler issues with gcc-4.6 c++0x. 2011-11-18 17:28:50 +09:00
rakshasa 0784d6540f * Switched to using '__builtin_popcount' for counting bits in bitfield.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1292 e378c898-3ddf-0310-93e7-cc216c733640
2011-10-02 15:57:22 +00:00
rakshasa 5a1d0be323 * Use the safe default cacheline settings for all platforms for now.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1116 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-19 21:36:44 +00:00
rakshasa 5470e50ffb * Added autoconf support for cacheline_aligned and SMP_CACHE_BYTES.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1115 e378c898-3ddf-0310-93e7-cc216c733640
2009-12-18 21:56:14 +00:00
rakshasa 667c4c3562 * Created ThreadBase holding poll manager, etc, and added a this_thread global object.
* Cleaned up main initialization, SCGI and polling code.

* Fixed a bug that would cause reading of a piece to hang if the incoming data contains only data up to the file boundary, but not the next file's data. The bug did not trigger if the file boundary and piece boundaries were the same.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1101 e378c898-3ddf-0310-93e7-cc216c733640
2009-11-12 09:28:35 +00:00
rakshasa c627d6dc0c All patches in this commit were from Josef Drexler.
* Fixes a segfault when configure finds execinfo.h.

* Fix compile errors and warnings with g++ 4.3.x.

* Fixes an interoperability issue in the get_peers handling, now it
behaves according to the clarified BEP-0005. Also fixes a minor issue
of not being able to generate error packets.

* Fix a crash in scgi_local or scgi_port when calling freeaddrinfo
with a NULL pointer.

* Only check the filename cache for loading tied torrents (e.g. from
watch dirs) but not manually loaded ones via <enter>/<bs>, to allow
loading those again (ticket #1227).

* Fix display of multi-byte characters with attributes (i.e. utf-8
filenames in the file list), and make the list aware of characters
occupying two screen positions.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1064 e378c898-3ddf-0310-93e7-cc216c733640
2008-08-26 20:42:57 +00:00
rakshasa 78f8b19aa4 * Limited the number of addresses in the outgoing pex list to 200.
* Show private flag in download info.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@988 e378c898-3ddf-0310-93e7-cc216c733640
2007-10-12 14:46:41 +00:00
rakshasa 4a449bae67 * Added configure options that allow building universal binaries.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@889 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-10 22:36:43 +00:00
rakshasa d030c5401e * Cleanup of the auto* scripts, curl and openssl checks are now done
with pkg-config.

* Minor changes to included headers and autoconf scripts required by
Solaris.

* Added const char* to VariableMap::has.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@846 e378c898-3ddf-0310-93e7-cc216c733640
2007-01-16 17:30:13 +00:00
rakshasa 407824c9c8 * Switch the order rak::advance_bidirectional iterates.
* When testing for mincore, cast the address pointer to (char*).

* Failure during syncing causes the download to stop, unless
flag_ignore_error is set.

* Trigger storage error signal for HashTorrent in
DownloadWrapper::receive_initial_hash.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@774 e378c898-3ddf-0310-93e7-cc216c733640
2006-09-10 03:28:09 +00:00
rakshasa 598455a5df * The curl bind address was being set by set_local_address(...), urgh.
* Made IPv6 stuff configurable.

* Improved the view stuff.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@672 e378c898-3ddf-0310-93e7-cc216c733640
2006-04-23 23:17:05 +00:00
rakshasa d9d27139d1 * Fixed an overflow in rak::partial_queue, and added some exceptions.
* Changed to configure script so --disable-mincore must be called
explicitly to disable it.

* API and core::Download cleanup.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@660 e378c898-3ddf-0310-93e7-cc216c733640
2006-03-31 23:02:39 +00:00
rakshasa 1e5146121e * Added "-O" flag that takes a single option, allowing ','.
* Added the errno message when a file in a torrent could not be opened.

* Added torrent::Object class which will be replacing torrent::Bencode.

* Ported to Cygwin, patch supplied by Jussi Kivilinna
<jussi.kivilinna@mbnet.fi>.

* Update display before entering the main loop, so it won't seem to be
blocking when loading torrents.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@637 e378c898-3ddf-0310-93e7-cc216c733640
2006-02-16 14:57:41 +00:00
rakshasa e8cd37ea3a * Set SO_REUSEADDR for the listening socket.
* Moved several settings to use the new variables and made the parser
better.

* Use "-O2" rather than "-O3".


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@623 e378c898-3ddf-0310-93e7-cc216c733640
2006-01-17 17:23:32 +00:00
rakshasa eb8fecbc34 * Fixed various compiler warnings.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@585 e378c898-3ddf-0310-93e7-cc216c733640
2005-10-24 10:40:55 +00:00
rakshasa 3bd99aee50 * Fixed some bugs and cleaned up the code.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@550 e378c898-3ddf-0310-93e7-cc216c733640
2005-09-01 17:12:31 +00:00
rakshasa 2a1f3e12cc * Renamed read/write stuff to down/up.
* Adding incomplete PeerConnectionSeed.

* For every new peer connection it would traverse the local bitfield
to check if it was zero'ed, instead of using a cached value. Forgot to
change over when changing it from the BitFieldExt to the normal class.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@547 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-29 18:39:34 +00:00
rakshasa b0ac469262 * Removed PeerConnection::m_taskStall, use the keepalive task instead.
* Fixed typo in USE_ALIGNED check.

* Added checks to Tracker* to make sure m_taskTimeout isn't already
inserted.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@534 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-17 19:20:38 +00:00
rakshasa 8b1afe2485 * Added byte alignment check, if required use a different means of
reading ints from ProtocolBuffer.

* Don't round the task for ThrottleScheduler to the nearest second
since it has a sub-second timeout. Change the other timeouts to first
add cached and timespan, then round to the nearest seconds.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@529 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-16 18:13:43 +00:00
rakshasa 89a090111d * Added support for variable sized fd_set's, this should remove the FD_SETSIZE limit.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@512 e378c898-3ddf-0310-93e7-cc216c733640
2005-08-01 16:20:34 +00:00
rakshasa 424a20b3f5 * Changed the API to support different Poll objects and made
PollSelect available. Started work on PollEPoll.

* Fixed a bug that caused blank characters to be inserted into the
tracker request url.

* Added display of the options field in the peer info view.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@508 e378c898-3ddf-0310-93e7-cc216c733640
2005-07-25 15:28:03 +00:00
rakshasa a2248f584f Cleaned up configure.ac and fixed it to properly handles CXXFLAGS.
Ignore SIGPIPE.

Fixed(?) bug in hash queue code when a queued torrent got
deleted. Also reorganized core::Manager to catch all
torrent::local_error's.

Fixed display bug in display::FileList which hid the last element.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@441 e378c898-3ddf-0310-93e7-cc216c733640
2005-05-26 03:25:55 +00:00