Commit Graph

24 Commits (4a6795409d1520fd3da3e909a8bcf9d7fd0927bb)

Author SHA1 Message Date
Alin Nastac d3b0459c93 lua: install luac symlink on host
Signed-off-by: Alin Nastac <alin.nastac@gmail.com>
5 years ago
Rosen Penev 4533ba6810 lua: fix linking under glibc
Compilation of liblua itself works, but when other packages link against
it, the linker starts throwing undefined references to a bunch of math
functions in libm.

First discovered in a failed attempt to transition a package to uClibc++.

Signed-off-by: Rosen Penev <rosenp@gmail.com>
[fix commit title capitalization]
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
David Bauer 9b0ce1789b lua: create lua symlink for host installation
Since the binaries for both lua as well as lua5.3 contain the version
number, invocations of the "lua" binary are failing, as it's not created
anymore for the host package.

Fixes: fe59b46 ("lua: include version number in installed files")
Signed-off-by: David Bauer <mail@david-bauer.net>
5 years ago
James Taylor eff6e10604 lua: add lua.hpp to InstallDev
This is necessary to build PowerDNS authoritative and recursor against
OpenWRT, and may avoid packages depending on lua/host unnecessarily.

Signed-off-by: James Taylor <james@jtaylor.id.au>
5 years ago
Rafał Miłecki 24645c0ee1 lua: fix build with MacOS's make
It apparently requires passing V variable explicitly.

Fixes: fe59b46ca7 ("lua: include version number in installed files")
Reported-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki fe59b46ca7 lua: include version number in installed files
This will allow installing Lua 5.1 and newer versions at the same time.

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Rafał Miłecki c0c5c63514 lua: clean up host patch fuzz
Refresh host patches to match target changes from the commit
4e800716ac ("lua: clean up patch fuzz").

Signed-off-by: Rafał Miłecki <rafal@milecki.pl>
5 years ago
Liangbin Lian 4bb9af48ca lua: lnum: fix strtoul based number parsing
Lua's LNUM patch currently doesn't parse properly certain numbers as
it's visible from the following simple tests.

On x86_64 host (stock Lua 5.1.5, expected output):

 $ /usr/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  2147483648
  8796093022208
  4294967296

On x86_64 host:

 $ staging_dir/hostpkg/bin/lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On x86_64 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  0
  0

On ath79 target:

 $ lua -e 'print(0x80000000); print(0x80000000000); print(0x100000000)'

  -2147483648
  8796093022208
  4294967296

It's caused by two issues fixed in this patch, first issue is caused by
unhadled strtoul overflow and second one is caused by the cast of
unsigned to signed Lua integer when parsing from hex literal.

Run tested on:

 * Zidoo Z9S with RTD1296 CPU (aarch64_cortex-a53)
 * qemu/x86_64
 * qemu/armvirt_64
 * ath79

Signed-off-by: Liangbin Lian <jjm2473@gmail.com>
[commit subject/message touches, fixed From to match SOB, fixed another
 unhandled case in luaO_str2i, host Lua, package bump]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
5 years ago
Jo-Philipp Wich 0e70f69a35 treewide: revise library packaging
- Annotate versionless libraries (such as libubox, libuci etc.) with a fixed
  ABI_VERSION resembling the source date of the last incompatible change
- Annotate packages shipping versioned library objects with ABI_VERSION
- Stop shipping unversioned library symlinks for packages with ABI_VERSION

Ref: https://openwrt.org/docs/guide-developer/package-policies#shared_libraries
Ref: https://github.com/KanjiMonster/maintainer-tools/blob/master/check-abi-versions.pl
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
5 years ago
Paul Wassi 3c79bb5606 package/utils/lua: cleanup source mirrors
Remove inactive mirrors from the sources list.

Signed-off-by: Paul Wassi <p.wassi@gmx.at>
6 years ago
Kevin Darbyshire-Bryant 4e800716ac lua: clean up patch fuzz
Refresh patches to tidy up fuzz.  No functional changes

Signed-off-by: Kevin Darbyshire-Bryant <ldir@darbyshire-bryant.me.uk>
6 years ago
Matthias Schiffer 77beaf2ec9
package: replace $(STAGING_DIR)/host with $(STAGING_DIR_HOSTPKG)
Cleanup to prepare for changing STAGING_DIR_HOSTPKG. The actual change of
STAGING_DIR_HOSTPKG (i.e., moving the host packages back into a common, not
target-specific directory) will be done after the first LEDE release, but
the cleanup will also be useful for projects like Gluon.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>
7 years ago
Felix Fietkau 720b99215d treewide: clean up download hashes
Replace *MD5SUM with *HASH, replace MD5 hashes with SHA256

Signed-off-by: Felix Fietkau <nbd@nbd.name>
7 years ago
Jo-Philipp Wich 24a7ccb056 treewide: replace jow@openwrt.org with jo@mein.io
Signed-off-by: Jo-Philipp Wich <jo@mein.io>
8 years ago
David Thornley da0226fa7e lua: Fixed broken __lt/__le operators caused by lnum patch.
This was found while investigating why luarocks does not work. It was
traced to a quite old lnum patch for 5.1.3. I compared against the
latest 5.1.4 patch - https://github.com/LuaDist/lualnum and discovered
the lessthan/lessequal evaluation was not falling through to the
call_orderTM (tag methods).

I have tested LuCI (simple tests) and used the following lua code to
validate the patch (both host and target patches supplied): -

> local my_mt = {
> __eq = function(v1, v2)
> print("__eq")
> return false
> end,
> __lt = function(v1, v2)
> print("__lt")
> return false
> end,
> __le = function(v1, v2)
> print("__le")
> return false
> end
> }
>
> function get_my(vstring)
> local my = {}
> my.string = vstring;
> setmetatable(my, my_mt);
> return my;
> end
>
> local a = get_my("1.0")
> local b = get_my("1.0")
>
> local eq_works = a == b;
> local lt_works = a < b;
> local gt_works = a > b;
>
> local lte_works = a <= b;
> local gte_works = a >= b;

Without the patch the following error will be presented: -

“attempt to compare two table values”

Signed-off-by: David Thornley <david.thornley@touchstargroup.com>
8 years ago
John Crispin 3b39bf7262 lua: host: install lnum_config.h
One of the host patches introduces the new header file lnum_config.h
included by luaconf.h, but doesn't install it.

Install it to allow building C modules for the host Lua.

Signed-off-by: Matthias Schiffer <mschiffer@universe-factory.net>

SVN-Revision: 48907
8 years ago
Felix Fietkau 64da662a88 toolchain/glibc: remove obsolete versions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48780
8 years ago
Felix Fietkau 808803f6ae lua: use $(STAGING_DIR)/host instead of $(STAGING_DIR_HOST)
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 48405
8 years ago
Luka Perkov 75078acd93 cosmetic: remove trailing whitespaces
Signed-off-by: Luka Perkov <luka@openwrt.org>

SVN-Revision: 47197
9 years ago
Steven Barth feeea1cd28 lua: honor LDFLAGS
Signed-off-by: Steven Barth <steven@midlink.org>

SVN-Revision: 46036
9 years ago
Felix Fietkau 5199a23165 lua: link library with -Bsymbolic-functions
Signed-off-by: Felix Fietkau <nbd@openwrt.org>

SVN-Revision: 45509
9 years ago
John Crispin b1e19ee445 lua: fix eglibc reference
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 45013
9 years ago
Nicolas Thill f4417f7ad8 package/*: replace occurences of 'ln -sf' to '$(LN)'
Signed-off-by: Nicolas Thill <nico@openwrt.org>

SVN-Revision: 43205
10 years ago
John Crispin 4ebf19b48f packages: clean up the package folder
Signed-off-by: John Crispin <blogic@openwrt.org>

SVN-Revision: 37007
11 years ago